Quicker way to contrast multiple genotypes with treatment in DeSeq2
1
0
Entering edit mode
bdy8 ▴ 10
@bdy8-16982
Last seen 5.8 years ago

Hi Bioconducter Land

My query is similar to this other post (A: DESEq2 comparison with mulitple cell types under 2 conditions) which Michael Love provided a great answer to. I understand fully how to do this I was just wondering if there is a quicker/cleaner way to run through all my comparisons in DeSeq2. 

Like the question pasted above, I want to compare all my genotypes (12 genotypes) for my treatment (disease exposed). I am therefore joining the two factors and using contrast to analyse these. This obviously will require a large number of contrasts to be made for all the genotypes. 

dds$group <- factor(paste0(dds$genotype, dds$treatment))
design(dds) <- ~ group
dds <- DESeq(dds)
resultsNames(dds)
results(dds, contrast=c("group","P1Exposed","P2Exposed")) 
results(dds, contrast=c("group","P1Exposed","P3Exposed")) 
 etc etc

As such, apart from constructing a loop or manually entering and saving all the results tables, is there a quicker/neater way to do this? I have been playing around with a few ideas and really wanted to know if anyone had a specific way to do this or whether how I am doing it is redundant due to there being a function present which would allow this analyses to be done quicker. 

Just for everyones information of why I am doing this, after extracting all the contrasts I am going to group genotypes by a arbitrary risk category made from experimental data (low, medium and high) and look at the response of all the low risk genotypes VS the high risk genotypes to pull out risk specific gene changes for these. I then am going to see how these identified genes change between other risk categories. I understand I could include this grouping factor in the dds object instead (i.e. instead of 12 genotypes it would be 3 risk categories) but I would lose the genotype structure of the data which would result in a form of pseudo-replication due to including non-independant genotype replicates as independant samples. I would be interested to hear peoples views on this as well. 

As always, thank you for anyone who has the time to provide an opinion or answer on this. I look forward to peoples comments and apologise if I have missed something simple which is already out there on this subject. 

Ben Young 

 

 

 

deseq2 DeSeq2 • 1.1k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 day ago
United States

Dear Ben,

Short answer is that we don't have any functionality to avoid constructing a loop to perform multiple contrasts.

ADD COMMENT
0
Entering edit mode

thanks so much Michael. I just wanted to check to make sure I was not missing anything. 

A loop it is. 

ADD REPLY

Login before adding your answer.

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