Entering edit mode
2.8 years ago
Rob
▴
170
I am using DESeq2 for differential expression analysis. I want to account for treatment and Sex. I have the following code. how and where in the code should I add sex?
dds <- DESeqDataSetFromMatrix(countData = rawdata,
colData = metadata,
design = ~ treatment)
dds <- DESeq(dds)
res <- results(dds)
It is generally expected that you read the tools manual first. Even in the "quick start" section there is an example on adding covariates to the design: https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html