How to extract top DEG and their sample values
1
0
Entering edit mode
ecg1g15 ▴ 30
@ecg1g15-19970
Last seen 4.1 years ago

I would like to know how to extract a dataframe containing the most Differentially Expressed Genes of my dataset but also the values for each sample, so I can use those for further analysis and visualisation plots.

After running this, I understand I see the genes with padj, Logfold basemean ETC

dds <- DESeq(dds)
res <- results(dds)
res

However, the output desired somwthing like this :

df

Genes            padj     Sample1     Sample2    Sample3     ...
Gene 1         0.0001      23423         42423        234234
Gene 2         0.001        23                 234            4234
Gene 3         0.01           2342             575          56756
...

Or just knowing how to extract the list of top DEG and their values across samples?

Thanks

DESeq2 RNASeq • 806 views
ADD COMMENT
2
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 7 weeks ago
Republic of Ireland

Again, this is not related, specifically, to any issue with DESeq2, and would be more suited to a general bioinformatics or coding forum.

You can retrieve the 'normalised' counts via the DESeq2::counts() function (check the manual page for this function). If you want the transformed expression levels, then take a look at vst() and rlog(). These are all mentioned in the vignette. After that, you just need a few simple sub-setting commands in order to align the test statistics to these counts / expression levels.

Kevin

ADD COMMENT

Login before adding your answer.

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