Question: Manually adding IRanges/GRanges to DESeq dataset?
gravatar for edridge
6 months ago by
edridge0 wrote:

I currently have an RNA-seq dataset where I've quantified counts by regions that don't line up neatly to existing genes. Currently, I've created a DESeq dataset from my count matrix (not from the raw alignments), and running assay(dds) resembles something like:

        Exp1    Exp2    Exp3    Exp4
ID1        2       4       8      5
ID2        9       45      3      12

And so on. It's trivial for me to take each ID name and create a corresponding annotation for it that includes the feature's chromosome, strand, and start/end coordinates. This leaves me with a data.frame in the form:

        Chrom    Strand    Start    End
ID1        IV       +      100      300
ID2        II       -      2847     2904

And so on. How do I add this annotation data to my current DESeq dataset object? My aim is to be able to visualize my significant LFC enriched sites using the GViz package as described here. However, first I just need to add these coordinate annotations. How do I do this? I know that it involves constructing a GRanges object somehow and then adding it to the rowRanges of the DESeq dataset, but I'm not yet sure how to construct this from my existing data.frame.

ADD COMMENTlink modified 6 months ago by James W. MacDonald45k • written 6 months ago by edridge0
gravatar for James W. MacDonald
6 months ago by
United States
James W. MacDonald45k wrote:

A DESeqDataSet is just an extension of a RangedSummarizedExperiment object, and you can access and replace the rowRanges slot using the rowRanges (or the ranges) operator. See the vignette for SummarizedExperiment for more information.

ADD COMMENTlink modified 6 months ago • written 6 months ago by James W. MacDonald45k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 309 users visited in the last hour