How to extract counts from a DESeq dataset ordered by a specific sample?
1
1
Entering edit mode
Anita ▴ 10
@d7717de0
Last seen 7 months ago
Belgium

Hello, I have an experiment where I'm comparing a batch A versus B (in biological triplicate: A1/A2/A3/B1/B2/B3). I create the DESeqDataSet, filter by low expression and rRNA, and use VST as a normalization method.

dds <- DESeqDataSetFromMatrix(countData = round(S216_Count_data),                               
                              colData = exp_design,                                        
                              design = ~ Replicate + Treatment)

After that, I'd like to extract the counts from the normalized dds arranged by one of the samples, concretely A1. I tried like this, but I don't think I can select a DESeqDataSet object as if it was a matrix.

norcou <- counts(dds,normalized=TRUE)

head(norcou[order(norcou$A1, decreasing = TRUE), ])

How could I do this? Any help appreciated. Thanks a lot!!


Solution found, I used:

head(norcou[order(norcou[,"A1"], decreasing = TRUE), ], 50)
DESeq2 Transcriptomics • 465 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 32 minutes ago
United States

When you extract the counts from a DESeqDataSet, you get a matrix, not a data.frame, so using counts$A1 won't work. You could use counts[,"A1"] instead.

0
Entering edit mode

Exactly what I needed, thanks a lot <3

ADD REPLY

Login before adding your answer.

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