Syntax of DESeq2 contrast argument for all pairwise comparisons
1
0
Entering edit mode
@nataliehull-12372
Last seen 7.8 years ago

I'm trying to use DESeq2 to determine if an OTU is enriched by treatments from 16S rRNA sequence data.  I imported OTU counts for each library (otu), and metadata information for each library (meta).  One of my metadata columns is a factor with 5 levels (factors).  I want to do all pairwise comparisons for all 5 factor levels.

 

I've tried to do it this way:

dds = DESeqDataSetFromMatrix(countData = otu, colData = meta, design = ~factors, betaPrior = FALSE)

The rownames in my metadata are the same as the colnames in the otu table, but I get an error:

Error in FUN(X[[i]], ...) :   assay colnames() must be NULL or equal colData rownames()

 

I also tried using phyloseq this way:

dds = phyloseq_to_deseq2(phyloseq(otu,meta), design = ~factors)

dds = DESeq(dds, design = ~ factors)

This method only compared the first and last factor levels, but I want all the comparisons.

 

I need help with the syntax for the contrast argument.

Thanks!

 

deseq2 contrast matrix • 1.2k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States
"rownames in my metadata are the same as the colnames in the otu table" Can you show that this is the case? That is what the error is coming from, SummarizedExperiment found a mismatch.
ADD COMMENT

Login before adding your answer.

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