Hello,
I'm currently trying to use Deseq2 but I'm getting confused with some of the conditions. I have multiple individuals that are either Sick or Healthy (that is the main condition I want to use for comparison)
However, those individuals can be also classified into families. For example, Individual 1, 2, 3 and 4 are part of family 1 while individual 5,6,7 and are part of family 2.
Additionally, I sometimes have biological replicates for my individuals. The experiment was based on 3 visits but of course due to experimental issues, not all visit are available for all sample. In summary, my metadata table looks like this:
sample condition family individual
M05-01-V1 Sick M05 M05-01
M05-02-V1 Healthy M05 M05-02
M05-02-V2 Healthy M05 M05-02
M05-02-V3 Healthy M05 M05-02
M05-03-V1 Healthy M05 M05-03
M05-03-V2 Healthy M05 M05-03
M05-03-V3 Healthy M05 M05-03
M05-04-V1 Sick M05 M05-04
M05-04-V2 Sick M05 M05-04
M05-04-V3 Sick M05 M05-04
M06-01-V1 Healthy M06 M06-01
M06-01-V2 Healthy M06 M06-01
M06-02-V1 Sick M06 M06-02
M06-02-V3 Sick M06 M06-02
M06-03-V1 Sick M06 M06-03
M06-04-V2 Healthy M06 M06-04
M06-04-V3 Healthy M06 M06-04
M08-01-V1 Sick M08 M08-01
M08-01-V2 Sick M08 M08-01
M08-01-V3 Sick M08 M08-01
M08-02-V1 Healthy M08 M08-02
M08-02-V2 Healthy M08 M08-02
M08-02-V3 Healthy M08 M08-02
M08-03-V1 Healthy M08 M08-03
My question would be, how could I compare what changes in term of expression between my conditions using both family belonging and biological replicate information as confunder? I did it already for the family level using that piece of code:
ddsMF <- dds
design(ddsMF) <- formula(~ individual + condition)
print('Running DESeq on multi-factor data.')
ddsMF <- DESeq(ddsMF)
resultsNames(ddsMF)
resMF <- results(ddsMF, contrast=c("condition", "Sick", "Healthy"))
summary(resMF)
But I wondered how I could also include the biological replicate information. Thanks a lot for your help,
Ben
2 answers
It looks like this applies to your situation
The solution with the individuals nested within groups actually doesn't work for me. My individual are either sick or healthy. They don't have 2 conditions (which is required here to make that approach work).
Including individual in the model doesn't work neither as individual are within family. I can control for family just by including a blocking term as I have, but not for the replicate measurements per individual. Once you add individual it will be confounded with family, and you won't be able to estimate fixed effects due to the confounding.
Apparently Michael Love recommends: "If you want to control for correlations within condition, but compare across that condition, DESeq2 doesn't have a framework for that. You really need mixed effects modeling. So the best choice here within Bioconductor is to use limma-voom with duplicateCorrelation, which allows for modeling the correlations of samples, e.g. from within familiar here."
But it's very confusing to me. So I think I will either pick the median of my replicates or subset my dataset to remove the replicate.
Ben
Log in to answer this question.
By including 'individual' in your model, you are already including information about biological replicates. It looks like you just want a model such as
~ conditions + individual + familythat takes into account all of your predictors.