Search
Question: Manually adding IRanges/GRanges to DESeq dataset?
0
18 months ago by
edridge0
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.

modified 18 months ago by James W. MacDonald48k • written 18 months ago by edridge0
0
18 months ago by
United States
James W. MacDonald48k 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.