edgeR - how to convert DGELRT and other classes to .csv files
2
1
Entering edit mode
@cellbiologyhelp-9411
Last seen 6.3 years ago

I am using edgeR to look for differential expression.  I am struggling to export data generated in edgeR (specifically DGELRT-class information, produced after the QL F-test) and convert it to .csv file.

The edgeR package has excellent documentation for working within the package.  My only frustrating is exporting data, it does not seem there is an easy way to get the results of the QL F-test.  I do not see this addressed in the examples contained the user guide.  The user manual addresses subsetting, but this simply makes another DGELRT class. I cannot find the Extract option in the baseline package.  I am unclear of what the “baseline package” is, as there is edgeR and edge in Bioconductor.

Can anyone help me or provide me with resources/guidance to take a DGELRT value and make it a data object in R (to be written as a .csv file)?

edgeR differential expression file conversion • 2.8k views
4
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 19 hours ago
The city by the bay

Try the topTags function. For example, if you have a DGELRT object named results:

out <- topTags(results, n=Inf)
write.csv(out, file="blah.csv")


Check out the man pages to get specific options, e.g., if you don't want sorting by p-value.

0
Entering edit mode

Thank you Aaron. I am wondering if you know how to write the .csv file with both the topTags (statistical analysis) and the original counts read ( in the "\$fitted. value") together into one csv file?

0
Entering edit mode
@cellbiologyhelp-9411
Last seen 6.3 years ago

This is exactly what I wanted to do!!! Thank you for prompt response!!