extraction significant genes
1
0
Entering edit mode
5.4 years ago

Hi

I want to extract the list of genes (significant results) having FDR <0.05 and FC > 10.0 or FC<0.10 from file which have all expressed genes. how can i do it ?

R RNA-Seq • 1.1k views
ADD COMMENT
0
Entering edit mode

You need to elaborate on what expression data you have. Is it RNASeq? Microarrays? Do you have access to quantification counts?

ADD REPLY
4
Entering edit mode
5.4 years ago
Benn 8.3k

If I understand correctly, you want to read a file in R and select some criteria. Without knowing how your file looks like it will be a bit of guessing...

So, I will assume you have a tab delim text file with a header. To import this file in R:

tableFromFile <- read.table("file_name.txt", header = T, stringsAsFactors = F)

Then you'll have to select on your criteria, I assume your column names are FDR and FC like in your question. Something like this will work (can't test it, since I don't have no example).

SigGenes <- tableFromFile[tableFromFile$FDR < 0.05 & tableFromFile$FC > 10 | tableFromFile$FC < 0.1,]

This way you have selected all rows, if you only want the gene names just select only that column.

ADD COMMENT
0
Entering edit mode

yes i have RNA seq data. and in file p value q value fc value and fpkm value column present. here is some lines shown.

"GeneName","feature","id","fc","pval","qval","Drought_sensitive_G1","Drought_sensitive_G2","Drought_tolerant_G3","Drought_tolerant_G4","Drought_tolerant_G5","Drought_tolerant_G6" ".","gene","MSTRG.10469",0.329488903619917,0.00142832748896338,0.259910259261526,2.5003,2.232766,0.135729,0,0,0.190792 ".","gene","MSTRG.10698",0.241268839517611,0.000317188508969446,0.136790531924965,2.923064,3.810668,0,0,0,0 ".","gene","MSTRG.13119",0.352790048999932,0.000539677563831664,0.180199910439792,1.701282,2.229747,0,0,0,0 ".","gene","MSTRG.13337",0.681896653988615,0.00204281315386956,0.295375398034284,19.546333,15.836477,12.656379,13.152587,15.144008,12.34343 ".","gene","MSTRG.14016",0.25669290807353,0.00196804175129006,0.29428213874073,4.482871,4.906847,0.389837,0.673042,1.040834,0.530697

ADD REPLY
0
Entering edit mode

To modify the code Benn posted to your file simply use "read.csv()" instead of "read.table()" and use "qval" instead of "FDR" and "fc" instead of "FC".

ADD REPLY
0
Entering edit mode

I have done. now my next question is that Can i change the threshhold value of fc and q val? Can I choose the q value <0.3 ?because the criteria which i have mentioned above for fc and qval gave too much low numbers of genes.

ADD REPLY
0
Entering edit mode

No you cannot change the threshold, at least not if you want to take statistics seriously and consider to publish it in a journal. You have tested a hypothesis, and 0.05 is what is generally accepted as a threshold for significance (There is no reason at forehand why you should use 0.3 as a threshold). Running the analysis first with 0.05, and then changing it to 0.3 because you don't like what you get from 0.05 is malpractice. If you want to do that, just skip statistics at all.

ADD REPLY

Login before adding your answer.

Traffic: 2860 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6