Im using this code to make based on log2foldchange and padj value ,im getting the plot but i want those value for my reference how do i extract the same  .

    alpha <- 0.05 # Threshold on the adjusted p-value
    cols <- densCols(res$log2FoldChange, -log10(res$pvalue))
    plot(res$log2FoldChange, -log10(res$padj), col=cols, panel.first=grid(),
         main="Volcano plot", xlab="Effect size: log2(fold-change)", ylab="-log10(adjusted p-value)",
         pch=20, cex=0.6)
    abline(v=0)
    abline(v=c(-1,1), col="brown")
    abline(h=-log10(alpha), col="brown")
    
    gn.selected <- abs(res$log2FoldChange) > 2.5 & res$padj < alpha 
    text(res$log2FoldChange[gn.selected],
         -log10(res$padj)[gn.selected],
         lab=rownames(res)[gn.selected ], cex=0.4) 


when i view gn.selected i get only logical value that is true or false 

Any help or suggestion would be highly appreciated 


Update I'm doing this 

    > DF <- DF[DF$log2FoldChange > 1.5 & DF$padj < 0.05,]

is that suffice and am i doing it correctly ?


**Edit (October 24, 2018):**

This is now a Bioconductor package: https://www.biostars.org/p/335751/

---------------------------------------------
---------------------------

Your code appears to run fine on my DESeq2 results objects:
<a href="https://ibb.co/cdNecb"><img src="https://preview.ibb.co/kckMqw/yours.png" alt="yours" border="0"></a>

-----------------------------------

I normally do these simple volcano plots a different way:

    par(mar=c(5,5,5,5), cex=1.0, cex.main=1.4, cex.axis=1.4, cex.lab=1.4)
    
    topT <- as.data.frame(resultsObject)
    
    #Adjusted P values (FDR Q values)
    with(topT, plot(log2FoldChange, -log10(padj), pch=20, main="Volcano plot", cex=1.0, xlab=bquote(~Log[2]~fold~change), ylab=bquote(~-log[10]~Q~value)))
    
    with(subset(topT, padj<0.05 & abs(log2FoldChange)>2), points(log2FoldChange, -log10(padj), pch=20, col="red", cex=0.5))
    
    #with(subset(topT, padj<0.05 & abs(log2FoldChange)>2), text(log2FoldChange, -log10(padj), labels=subset(rownames(topT), topT$padj<0.05 & abs(topT$log2FoldChange)>2), cex=0.8, pos=3))
    
    #Add lines for absolute FC>2 and P-value cut-off at FDR Q<0.05
    abline(v=0, col="black", lty=3, lwd=1.0)
    abline(v=-2, col="black", lty=4, lwd=2.0)
    abline(v=2, col="black", lty=4, lwd=2.0)
    abline(h=-log10(max(topT$pvalue[topT$padj<0.05], na.rm=TRUE)), col="black", lty=4, lwd=2.0)

<a href="https://ibb.co/nyG5Hb"><img src="https://image.ibb.co/kYOViG/volcano.png" alt="volcano" border="0"></a>

--------------

There is an even better solution that I and colleagues developed using *ggplot2*, which allows you to easily fit labels into your plot using `ggrepel()`.