-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSnakefile
49 lines (32 loc) · 1.14 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
from pathlib import Path
from snakemake.utils import min_version
# Snakemake version when Singularity support was added
min_version("5.0.0")
# ======================================================
# Config files
# ======================================================
configfile: "config.yaml"
# ======================================================
# Global variables
# ======================================================
RULES_DIR = Path("rules")
IS_MULTIPLEXED = config["multiplexed"]
GB = 1024
include: str(RULES_DIR / "common.smk")
if IS_MULTIPLEXED:
SAMPLES = barcode_parser(config["barcodes"])
else:
SAMPLES = [config["sample_name"]]
# ======================================================
# Rules
# ======================================================
rule all:
input:
expand("docs/report_{sample}.html", sample=SAMPLES),
# the snakemake files that run the different parts of the pipeline
if IS_MULTIPLEXED:
include: str(RULES_DIR / "demux.smk")
include: str(RULES_DIR / "subsample.smk")
include: str(RULES_DIR / "align.smk")
include: str(RULES_DIR / "mykrobe.smk")
include: str(RULES_DIR / "reports.smk")