Entering edit mode
                    3.7 years ago
        Rob
        
    
        ▴
    
    180
    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