Skip to content

Setting up the DGE analysis

Charlotte Soneson edited this page Nov 14, 2022 · 12 revisions

The analysis report templates

contain the basic code to perform differential expression analysis with edgeR, differential transcript usage analysis with DRIMSeq and gene set analysis with camera. However, you need to modify the config.yaml file to perform the desired analysis of your data.

In particular, you have to specify the design formula and the contrast(s) you would like to use, based on the variables defined in the metadata text file.

You can also make additional modifications to the Rmd files (e.g., change filtering parameters, add diagnostic plots), but make sure that the reports save a list of SummarizedExperiment objects, in order to use these for the suggested downstream visualization. Please note that the parameters specified in the Rmd templates (e.g. for filtering) are (reasonable) defaults, but may need to be modified.

Geneset analyses

The user needs to define the set of genesets that will be used with camera (use the "genesets" variable for this.). See the The Molecular Signatures Database (MSigDB) for an explanation of the different gene set collections. Also note that only the following organisms are supported for an msigdbr-based geneset analysis:

> msigdbr::msigdbr_show_species()
 [1] "Bos taurus"               "Caenorhabditis elegans"   "Canis lupus familiaris"   "Danio rerio"             
 [5] "Drosophila melanogaster"  "Gallus gallus"            "Homo sapiens"             "Mus musculus"            
 [9] "Rattus norvegicus"        "Saccharomyces cerevisiae" "Sus scrofa"

The user can also turn off the geneset analyses by setting run_camera: False in the config.yaml file.

Checking the design and contrasts

ARMOR provides the checkinputs rule, which will let you check that the specified design matrix and contrasts are valid before running the statistical analysis. The rule will parse the design and contrast specifications in the config.yaml file together with the metadata file and print out the resulting design and contrast matrices to your console. To run, simply type

snakemake --use-conda --cores 1 checkinputs

(or exclude --use-conda if you are managing the software separately). Note that the target will not be considered out-of-date unless the config.yaml or metadata files changed, but you can force snakemake to execute the rule by adding -f to the call.