Deseq covariates with interaction
2
0
Entering edit mode
7.8 years ago
Folder40g ▴ 190

Hello

I have a design with two factors, each one with two levels. And I want to know the effect of each variable and if the interaction effect.

treatment <- c("dox_no","dox_no","dox_yes","dox_yes","dox_no","dox_no","dox_yes","dox_yes","dox_no","dox_no","dox_yes","dox_yes")
aminoacid <- c("aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes")

comparison <- cbind(treatment, aminoacid)
rownames(comparison) <- c(paste("RNA", c(1:12),sep=""))
comparison <- as.data.frame(comparison)

comparison$treatment <- factor(x = comparison$treatment, levels = c("dox_yes","dox_no"))
comparison$aminoacid <- factor(x = comparison$aminoacid, levels = c("aa_yes","aa_no"))

Then I describe the model; RNAtable is a data.frame with 12 columns (samples) and 24015 rows (genes)

RNAcount <- DESeqDataSetFromMatrix(countData = RNAtable, colData = comparison, design = ~  treatment + aminoacid + treatment:aminoacid)

deseq <- DESeq(RNAcount)

resultsNames(des) 
"Intercept" "treatment_dox_no_vs_dox_yes" "aminoacid_aa_no_vs_aa_yes" "treatmentdox_no.aminoacidaa_no"

I believe that the effect for the aminoacidad and its differential expressed genes can be extracted such way

results(deseq, contrast = c("treatment","dox_no","dox_yes"))

Is this right? How can I get the effect for the other variable and for the interaction?

Thanks

DESeq • 2.7k views
ADD COMMENT
0
Entering edit mode
7.8 years ago

results(deseq, name="aminoacid_aa_no_vs_aa_yes")

What you wrote would return the results due to treatment (you don't need the contrast, just specify the coefficient name).

ADD COMMENT
0
Entering edit mode
7.8 years ago
Folder40g ▴ 190

So,

This results(deseq, name="aminoacid_aa_no_vs_aa_yes") would give the effect on each gene due to the effect a aminoacid.

This results(deseq, name="treatment_dox_no_vs_dox_yes") would give the effect on each gene due to the effect of the treatment.

Am I right?

I do not know hot to interpret this results(deseq, name=""treatmentdox_no.aminoacidaa_no"), I understand the meaning of intereaction but I do not know hot to interpret this comparison.

Thanks once more.

ADD COMMENT
1
Entering edit mode

That's the additional change due to no doxycycline combined with no amino acid compared to what would happen if those two different conditions did not interact.

ADD REPLY
0
Entering edit mode

Thanks, I'll change the order of the factors so it will be easier to understand what the effect of the interaction means.

ADD REPLY

Login before adding your answer.

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