forked from snakemake-workflows/rna-seq-star-deseq2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
49 lines (32 loc) · 1.31 KB
/
Snakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import pandas as pd
from snakemake.utils import validate, min_version
##### set minimum snakemake version #####
min_version("5.1.2")
##### load config and sample sheets #####
configfile: "config.yaml"
validate(config, schema="schemas/config.schema.yaml")
samples = pd.read_table(config["samples"]).set_index("sample", drop=False)
validate(samples, schema="schemas/samples.schema.yaml")
units = pd.read_table(config["units"], dtype=str).set_index(["sample", "unit"], drop=False)
units.index = units.index.set_levels([i.astype(str) for i in units.index.levels]) # enforce str in index
validate(units, schema="schemas/units.schema.yaml")
##### target rules #####
rule all:
input:
expand(["results/diffexp/{contrast}.diffexp.tsv",
"results/diffexp/{contrast}.ma-plot.svg"],
contrast=config["diffexp"]["contrasts"]),
"results/pca.svg",
"qc/multiqc_report.html"
##### setup singularity #####
# this container defines the underlying OS for each job when using the workflow
# with --use-conda --use-singularity
singularity: "docker://continuumio/miniconda3"
##### setup report #####
report: "report/workflow.rst"
##### load rules #####
include: "rules/common.smk"
include: "rules/trim.smk"
include: "rules/align.smk"
include: "rules/diffexp.smk"
include: "rules/qc.smk"