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"))
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.