Accessing data in within a DESeqDataSet class from DESeq2 library
1
0
Entering edit mode
8.3 years ago

I am new to R and using DESeqDataSet. I am following the example in 1.2.3 of this tutorial. So below are my commands:

>library(DESeq2)
>library("BIobase")
>library("pasilla")
>data("pasillaGenes")
>countData <- counts(pasillaGenes)
>colData <- pData(pasillaGenes)[,c("condition", "type")]
>dds <- DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~condition)
>dds

class: DESeqDataSet 
dim: 14470 7 
metadata(0):
assays(1): counts
rownames(14470): FBgn0000003 FBgn0000008 ... FBgn0261574 FBgn0261575
rowRanges metadata column names(0):
colnames(7): treated1fb treated2fb ... untreated3fb untreated4fb
colData names(2): condition type

How can I access the data within dds? There is no countData(dds) or some other obvious public class function. Is the data now in a private class variable?

RNA-Seq R • 5.9k views
ADD COMMENT
3
Entering edit mode
8.3 years ago
counts(dds)
ADD COMMENT
1
Entering edit mode

How would I have known this? ?DESeqDataSet and printing out dds does not show it as a class member? Thanks!

ADD REPLY
1
Entering edit mode

counts() is a generic now, I think. Before that was the case, I remember it being mentioned as an accessor (i.e., a public method).

Edit: Yup, these accessors are now in the BiocGenerics package. One would have to have followed along with things for the past few years to have known that :(

ADD REPLY

Login before adding your answer.

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