I've generated a volcano plot using DeSeq2 results and would like to specifically highlight a subset of genes by providing a list of gene IDs

    Dataset$condition <- relevel(Dataset$condition, "Ctrl")
    res <- lfcShrink(DatasetProcessed, contrast=c("condition","Treat","Ctrl")) 
    with(res, plot(log2FoldChange, -log10(pvalue), pch=16, cex=0.6, main="Volcano plot", xlim=c(-5,5)))

Given a list of geneIDs (corresponding to IDs in res) that I have converted into a vector, how can I then highlight these in the volcano plot?

    gene_list <- scan("genelist.txt", what="", sep="\n") 
    gene_list <- as.vector(gene_list)






As always seems to be the case, I figured out the answer five minutes after asking the question...

    with(res, plot(log2FoldChange, -log10(pvalue), pch=16, cex=0.6, main="Volcano plot", xlim=c(-5,5))) 
    gene_list <- scan("genelist.txt", what="", sep="\n")
    gene_list <- as.vector(gene_list) 
    with(subset(res, rownames(res) %in% gene_list), points(log2FoldChange, -log10(pvalue), pch=20, col="orange"))

Hopefully this will help someone else down the line

