exporting the results of edgeR into a text file using R
1
1
Entering edit mode
8.1 years ago
ashkan ▴ 160

I have done differential expression analysis using edgeR. now I am trying to export its output ,which looks like the small example, into a text file. I used this code : wirte.table(ltr, file="genes.txt") to export but did not work.

small example:

> topTags(lrt)
Coefficient:  TissueT 
              gene_ID     logFC    logCPM       LR        PValue           FDR
6769  ENSG00000133110  6.350164 10.952685 976.3333 2.503832e-214 4.605299e-210
8491  ENSG00000143546 -5.544069  9.190249 762.0486 9.630025e-168 8.856253e-164
11057 ENSG00000163220 -5.304425 10.255550 759.9131 2.805151e-167 1.719838e-163
8639  ENSG00000144476  6.874676  5.656485 751.3280 2.063670e-165 9.489269e-162
5528  ENSG00000124225  5.292294  8.728008 741.7265 2.525650e-163 9.290856e-160
10073 ENSG00000156453  6.212131  5.829142 729.6710 1.056166e-160 3.237676e-157
3320  ENSG00000106366  5.029834 13.904191 705.1793 2.235802e-155 5.874729e-152
2580  ENSG00000101670  5.075895  7.026149 662.5557 4.154631e-146 9.552017e-143
13827 ENSG00000174343  6.243975  5.039587 640.1431 3.110468e-141 6.356759e-138
12094 ENSG00000166922  7.799969  4.681274 634.3902 5.546206e-140 1.020114e-136

do you guys know how to do that?

rna-seq • 4.1k views
ADD COMMENT
0
Entering edit mode

Define "did not work".

ADD REPLY
0
Entering edit mode

gave this error:

write.table(lrt, file="genes.txt") Error in data.frame(coefficients = c(-9.96401242298739, -18.319253914062, : arguments imply differing number of rows: 18393, 1, 4

ADD REPLY
2
Entering edit mode

Please try to understand what object that stores the information regarding the DEGs and then try to get the output. You need to learn what are the typical structure of the objects that are defined in your edgeR analysis. Then only you can able to clearly exploit it.

ADD REPLY
5
Entering edit mode
8.1 years ago
Benn 8.3k

I think you need to write the topTags(lrt) to a file:

write.table(topTags(lrt), file="genes.txt")
ADD COMMENT

Login before adding your answer.

Traffic: 2126 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