Question: Filtering 2-fold differentially expressed genes
gravatar for vinayjrao
12 months ago by
vinayjrao170 wrote:


I am working with a microarray dataset, which is in the format -

Control      Control2      Treatment      Treatment2

The dataset has been log transformed. I want to know if there a way to filter the data such that I get genes whose fold difference is greater than 2 fold in Treatment as compared to Control.

For this purpose, I have already calculated the rowMeans() of each replicate to give

Control      Treatment

Thank you.

microarray R • 271 views
ADD COMMENTlink modified 12 months ago by Nicolas Rosewick8.8k • written 12 months ago by vinayjrao170

It is better to do DE analysis first, then after that if necessary you can include a Fold change filter. Try to use limma for your analysis, it has a very good manual.

ADD REPLYlink written 12 months ago by Benn8.0k
gravatar for Nicolas Rosewick
12 months ago by
Belgium, Brussels
Nicolas Rosewick8.8k wrote:

You should use limma to compute gene expression statistics (p-value, foldchange) and use this value to filter out your data.

Otherwise you can do something like this :

# control_samples # vector of control sample names
# treatment_samples # vector of treatment sample names
# M # gene expression matrix

fc <- rowMeans(M[,colnames(M) %in% control_samples]) / rowMeans(M[,colanames(M) %in% treatment_samples])

M.filtered <- M[ fc > 2,]
ADD COMMENTlink written 12 months ago by Nicolas Rosewick8.8k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1043 users visited in the last hour