Hello I have analyzed my microarray data using R language , and my final data including p-value and fold change is ready. I am used to save the data as an excel file to sort my data. However, this time I want to try to obtain these data using R. How can I obtain data from this table with the following conditions:
- p-value < 0.05
- logfc >1.2 or <-1.2
Also, I was wondering to know what is the difference between p-value and adjusted p-value in expression studies results?
Thanks for your help. Should I add the other rule with &? I mean log fc Higher than 1.2 or lower that -1.2. How should I say this? Also, I found an instruction which used "topTable" from limma package. The point is that I should define an 'Absolut fold change' to it. What is Absolut fold change?
My command already has both cases for fold change covered, as it uses the
abs()
function to get the absolute values of the fold change column. Therefore, any negative value will be made positive, thus allowing the values between -1.2 and 1.2 to be properly ignored. If theabs
function wasn't being used, then yes, you could include the rule for the opposite direction as well, e.g.:df <- df[df$p < 0.05 & df$logfc > 1.2 & df$logfc < -1.2,]
Thanks a lot. Interestingly, when I try to obtain my data using such codes, I get no results in response. However, when I save my table as an excel file, there are plenty of genes with my criteria. I think your first suggestion about avoiding post-hoc filtering is the answer.