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
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 + family
that takes into account all of your predictors.