Search
Question: Quicker way to contrast multiple genotypes with treatment in DeSeq2
0
gravatar for bdy8
6 weeks ago by
bdy80
bdy80 wrote:

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 

 

 

 

ADD COMMENTlink modified 6 weeks ago by Michael Love20k • written 6 weeks ago by bdy80
1
gravatar for Michael Love
6 weeks ago by
Michael Love20k
United States
Michael Love20k wrote:

Dear Ben,

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

ADD COMMENTlink written 6 weeks ago by Michael Love20k

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

A loop it is. 

ADD REPLYlink written 29 days ago by bdy80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 400 users visited in the last hour