[BioC] DESeq2 get coefficients for each variable in the design formula

Tran, Nhu Quynh T qtran1 at uthsc.edu
Tue Jul 1 20:03:06 CEST 2014


Hi,

I'm working on a RNA-seq data set and would like to control for age or bmi in the model together with the disease status, which I am able to do.  My question is how can I get the coefficients for both age and the disease together?  what I did was

#Adjust for age:
cds.acromegaly.age = DESeqDataSetFromMatrix(countData=acromegaly.protein.coding, colData=acromegaly.mapping, design=~age+group)
cds.acromegaly.age$age <- relevel(cds.acromegaly.age$age, "(0,40]")
acromegaly.cds.age <- DESeq(cds.acromegaly.age)
acromegaly.results.age <- results(acromegaly.cds.age)

#Get the results for group (or disease):
acromegaly.results.age <- results(acromegaly.cds.age)

#Get the results for age:
acro.age.effect <- results(acromegaly.cds.age, contrast=c("age","(40.60]", "(0.40]"))
sum(acro.age.effect$padj<0.05, na.rm=TRUE)

Then I merge those two results to get the genes that are affected by age or affected by group, and affected by both.   Is there another way? Is there coefficients for each of the independent variables.  I saw only log2FCs and p-values.
acro.age.combined <- merge(acromegaly.results.age, acro.age.effect, by.x="row.names", by.y="row.names")

Thanks,
Quynh



More information about the Bioconductor mailing list