Do a subset of s4 object based on ensembl gene biotype?
2
0
Entering edit mode
mdahl3105 • 0
@mdahl3105-20386
Last seen 5.0 years ago

Hi all

I am quite new to R, but using the DESeq2 package for analyzing total RNA-seq. data.

I would like to do a heatmap of only a subset of the differentially expressed genes, i.e. only protein-coding genes.

Thus, how can I inpute information on gene_biotype into the S4 object (results of DESeq2) or directly into the dds?

The only solution I have found involve converting res to a dataframe and merging with a dataframe containing the info on gene_biotype, but as this does not subset the s4 object data I am pretty stuck.

I would very much appreciate any suggestions as intensive google-ing and reading up on various posts over many days have not yet brought me closer to a solution.

deseq2 • 522 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 8 hours ago
United States

If you can get a list of the gene IDs, gene.ids from a table that has the biotype information, you can subset a DESeqDataSet like so:

dds.sub <- dds[gene.ids,]
ADD COMMENT
0
Entering edit mode
mdahl3105 • 0
@mdahl3105-20386
Last seen 5.0 years ago

I can't believe the solution was so simple, but definitely had a rewarding detour the last days which helped me understand all elements of DESeq2 much better.

Thanks for the hint. :)

ADD COMMENT

Login before adding your answer.

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