DESeq2 with baseline correction for gene expression differences
1
0
Entering edit mode
R1337 • 0
@09efc7cb
Last seen 2.1 years ago
Switzerland

Dear Community,

I have problably a relatively simple question, but I am quite new to DESeq2 and unfortunately couldn't find an answer to my question. I have the following dataset:

  • Sample /Genotype / Injury / Condition
  • 1 / WT / NO / WT_NO
  • 2 / WT / YES / WT_YES
  • 3 / KO / NO / KO_NO
  • 4 / KO / YES. / KO_YES
  • List item

...

I followed the guidelines for DESeq2 and could create a dds file

 dds <- DESeqDataSetFromMatrix(countData = rawCountTable,
                              colData = sampleInfo,
                              design = ~  Condition)

and then could extract the groups I would like to compare with

KO_YES_vs_KO_NO <- results(dds2, contrast=c("Condition", "KO_YES", "KO_NO") , independentFiltering=TRUE, alpha=0.05, pAdjustMethod="BH", parallel=TRUE)

However, the last comparison I would like to do is between the injury groups so WT_YES to KO_YES. For this I need a baseline correction (WT_NO and KO_NO). I am not sure how to add it into the DESeq command and unfortunately couldn't find anything to address this issue. I hope someone can help!

Thank you for any advice!

DESeq2 edgeR Transcriptomics • 1.4k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 day ago
United States

If you want to test the ratio of ratios, this would be an interaction term between two factor variables, see the vignette section and a number of support site posts on "ratio of ratios".

ADD COMMENT
0
Entering edit mode

Thank you Michael for your response! I managed to use ratio of ratios and updated my code like the following

dds <- DESeqDataSetFromMatrix(countData = rawCountTable3,
                             colData = sampleInfo3,
                              design = ~Genotype + Injury + Genotype:Injury)

If I run then

resultsNames(dds)

I receive the options:

[1] "Intercept"               "Genotype_WT_vs_KO"      "Injury_Injury_vs_Ctrl"   "GenotypeWT.InjuryInjury"

I am not sure which of these to combine for my results command

results(dds, contrast=list("xxx", "yyy"))

( I want to. compare ratios of KO Injury (normalized to KO Ctrl) to WT injury (normalized to WT Ctrl).

Thank you!

ADD REPLY
1
Entering edit mode

It is just the interaction term that is the ratio of ratios. Use results(..., name=""). But first read over the vignette note on factor levels (you have KO as the reference and WT as the effect, which is backwards).

ADD REPLY
0
Entering edit mode

Great thank you!

I have updated the levels now I get as a result from resultsNames(dds)

[1] "Intercept"                "Genotype_KO_vs_WT"       "InjuryInjury_vs_Ctrl"    "GenotypeKO.InjuryInjury"
``

and then I simply run:

res <- results(dds, name = "Intercept")

...and "res" represents then the fold changes and p values for normalized KO injury / normalized WT injury?

Thank you!

ADD REPLY
0
Entering edit mode

hi, no this is really off you are testing the intercept not the interaction, I'd recommend working with a statistician by the way. I can't provide statistical consultation here, due to limits on my time, I have to focus on software related issues only.

ADD REPLY

Login before adding your answer.

Traffic: 455 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6