RNA-seq: Change conditions for comparison
1
0
Entering edit mode
2.6 years ago

Hi,

I have 8 samples in 3 replicates. WT, NTC (non targeting control), NF2-PTEN DKO, PTEN-TP53 DKO, NF2-TP53 DKO, NF2 SKO, PTEN SKO and TP53 SKO

After LFCShrink, resLFC <- lfcShrink(dds, coef = 2, type="apeglm"), I get

[1] "Intercept"                         "Knockout_NF2.PTEN.DKO_vs_NF2.SKO" 
[3] "Knockout_NF2.TP53.DKO_vs_NF2.SKO"  "Knockout_NTC_vs_NF2.SKO"          
[5] "Knockout_PTEN.SKO_vs_NF2.SKO"      "Knockout_PTEN.TP53.DKO_vs_NF2.SKO"
[7] "Knockout_TP53.SKO_vs_NF2.SKO"      "Knockout_WT_vs_NF2.SKO" 

when I use resultsNames argument.

I want to compare the samples to NTC instead of NF2.SKO. How do I do that? I tried:

cond <- factor(rep(1:8, each=3));
dds$cond = relevel(cond, 3);
resultsNames(DESeq(dds)) 

But whatever number I try in the relevel argument, it gives me the same result for resultsNames. i.,e all my samples are compared to NF2.SKO.

Please help. Thanks!

RNA-seq • 611 views
ADD COMMENT
1
Entering edit mode
2.6 years ago

If you want everything compared to NTC, you need to convert Knockout to a factor and set NTC as the first level.

dds$Knockout <- factor(dds$Knockout)
dds$Knockout <- relevel(dds$Knockout, "NTC")

And then run your differential expression and lfcShrink code as usual.

ADD COMMENT
0
Entering edit mode

Hi rpolicastro ,

Thanks for the response. I tried the code you mentioned:

dds <- DESeq(ddsTxi2)
dds
dds$Knockout <- factor(dds$Knockout)
dds$Knockout <- relevel(dds$Knockout, "NTC")
resultsNames(dds)

and still getting the same result:

[1] "Intercept"                         "Knockout_NF2.PTEN.DKO_vs_NF2.SKO"
[3] "Knockout_NF2.TP53.DKO_vs_NF2.SKO"  "Knockout_NTC_vs_NF2.SKO"
[5] "Knockout_PTEN.SKO_vs_NF2.SKO"      "Knockout_PTEN.TP53.DKO_vs_NF2.SKO"
[7] "Knockout_TP53.SKO_vs_NF2.SKO"      "Knockout_WT_vs_NF2.SKO"
ADD REPLY
1
Entering edit mode

You need to set the factor levels before you run the DESeq function.

ADD REPLY
1
Entering edit mode

This worked. Thanks a ton!

ADD REPLY

Login before adding your answer.

Traffic: 1606 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