This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Deseq2 differential result

I m running Deseq2 pipeline my final result file is like 18,000 genes .So how do take the differential expressed genes from my list of genes .Do i sort if based on p value or is there a way to do inside the deseq2 before getting the final list of genes

Any help or suggestion would be appreciated .

r rna-seq

This sounds like a basic R question on how to subset a dataframe to only contain the significant genes before saving the result to a file, am I right?

no not exactly , I was wondering can i get it done while running the pipeline

yes , I was wondering if I can filter result out instead of getting the final values where I would set threshold to filter result

2 answers

Usually people look at the pvalue adjusted from the results and take a threshold to decide which gene is differentially expressed.

okay so i have to decide what threshold I m going to use that is what you mean?

Yes. People use commonly <0.05 or <0.1 for padj. Look in the litterature and decide which one is the most adapted to your experiment.

Hi, I would suggest extracting the results after sorting based on the adjusted p-value.

resOrdered <- res[order(res$padj),]

where res is your result. Thank you

yes I know but as I said i have like 18000 in my list and most of them wouldn't be of much use so how do I filter out the result .Is it based on some cutoff or what other parameters ?

You can extract the result and then sort them based on the log2FC, I normally use 0.4 (FC - 1.3 times) and above for upregulated genes and -0.4 for downregulated genes. You can do this simply using excel. Thanks

I agree with Sreeraj....but stay away from excel ... much better if you write a script (can be reused quickly)

Pseudocode:

  • foreach file --> open the file

  • while open --> iterate through eachline

  • split line by tab

  • if header --> next

  • else if ((FC>1.5) OR (FC<-1.5)) AND (PADJ<0.05) --> write that line to a new file

Now do a line count of the output file.... Then check that it is the same count you would get when you use excel (but dont save anything in excel - just use the handy filter and sort options to check)

Log in to answer this question.