Filtering 2-fold differentially expressed genes
Hi,
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.
• 1,589 views
•
link
1 answer
You should use limma to compute gene expression statistics (p-value, foldchange) and use this value to filter out your data.
https://bioconductor.org/packages/release/bioc/html/limma.html
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,]
• 0 views
•
link
Log in to answer this question.
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.