Hello
I am a newbie and I have the following experimental factors as below. I read very carefully the different posts and tutorial but I am still uncertain on how to design my experiment formula.
I wanted to know how to use DSEQ2 to look at the paired samples to see which genes are being differentially expressed when compared to Baseline eg:
Q1) Baseline Vs Day1: list of DE genes
Q2) Baseline Vs Day2: list of DE genes
Q3) Baseline Vs Day3: list of DE genes
eg: design(dds)=~ Patient.ID + Timepoint
Is that right ??? How do you get the DE list of genes for each Q1-Q3 above ?? Can Someone please help ? Thank you in advance >df
Patient.ID library Timepoint 1 1 A Baseline 2 1 A Day1 3 1 A Day2 4 1 A Day3 5 2 A Baseline 6 2 A Day1 7 2 A Day2 8 2 A Day3 9 4 A Baseline 10 4 A Day1 11 4 A Day2 12 4 A Day3 13 5 B Baseline 14 5 B Day1 15 5 B Day2 16 5 B Day3 17 10 B Baseline 18 10 B Day1 19 10 B Day2 20 10 B Day3 21 11 B Baseline 22 11 B Day1 23 11 B Day2 24 11 B Day3 25 13 C Baseline 26 13 C Day1 27 13 C Day2 28 13 C Day3 29 17 C Baseline 30 17 C Day1 31 17 C Day2 32 17 C Day3 33 18 C Baseline 34 18 C Day1 35 18 C Day2 36 18 C Day3
Thanks Michael for your answers and time.
A follow up question:
How do I compare:
Q1) Baseline Vs Day1 for a given library : list of DE genes
a) For Library A only :Baseline Vs Day1: list of DE genes
a) For Library B only :Baseline Vs Day1: list of DE genes
a) For Library C only :Baseline Vs Day1: list of DE genes
Would it be something like:
a) contrast=c("Timepoint", "Library", "Day1", "Baseline", "A")
b) contrast=c("Timepoint", "Library", "Day1", "Baseline", "B")
a) contrast=c("Timepoint", "Library", "Day1", "Baseline", "C")
Thank you very much again in advance
Your first post didn't mention wanting library-specific changes over time controlling for individual, so the design I recommended doesn't work for this.
Instead you should use the setup and design that I discuss in this section of the vignette:
https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#group-specific-condition-effects-individuals-nested-within-groups
Thanks Michael
I tried the last few hours to get this working with the link you sent. I keep getting:
"Error in checkFullRank(modelMatrix) :
the model matrix is not full rank, so the model cannot be fit as specified."
I changed the colnamesin my above design to
when I run:
DESeqDataSetFromMatrix(countData = a, colData = b, design=formula(~ grp + grp:ind + grp:cnd))
Error in checkFullRank(modelMatrix) :
the model matrix is not full rank, so the model cannot be fit as specified.
Levels or combinations of levels without any samples have resulted in
column(s) of zeros in the model matrix.
Any ideas
Thanks in advance
Can you show your code? I can’t tell what you are doing, if you are following all the steps. You will need to remove two columns of the matrix as described in that section because you have 4 patients for the first group but 3 patients for the other groups. There is some mention of this if you read to the end of the section.
Thanks Michael
Its no longer giving me the error, the missing columns was causing the problem and it is written down in your docs, my apologizies.
I modified the input file inline with equal columns across the groups as below. When convenient would you or someone please check my code below?
My questions are:
I wanted to do a paired analysis to find DE genes:
a) between Day0 and Day1 in Group1
b) between Day0 and Day1 in Group2
c) between Day0 and Day1 in Group3
d) between Day0 and Day1 in Group4
and the same for Day0 and Day7 in each Group1-4
Thank you very much and apologizies for the inconvenience
You should have terms for all of these comparisons in
resultsNames(dds)
and you can just useresults(dds, name="...")
to pull them out.Thanks Michael. Works very nicely.
One thing I am not sure about, how does DESEQ2 know which timepoints the user wants to do the paired analysis between ?
For example not just "Day0 Versus Day1" but also "Day1 versus Day7"
Thanks as always for your help and time.
All coefficients are comparisons are against baseline (day 0). To compare day 7 with day 1 you can use ‘contrast’ with a list and the two coefficients as the elements in the list. See ?results