-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
104 lines (90 loc) · 2.43 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#TODO adjust bamstats/basecounter rules so it doesn't need to load the
# biopet module (lwo priority; wait for bioconda submissions?)
#TODO make memory configurable? (low priority; not for all tools, probably)
import pandas as pd
import resources.ownUtils as ou
config = ou.checkConfig(config)
source = srcdir("")
workdir: config["workdir"]
sampleSheet = pd.read_table(config["sampleSheet"], index_col=[0,1])
ou.checkSampleSheet(sampleSheet)
onstart:
shell("echo Output directory: $(pwd)")
onsuccess:
print("\n\nPIPELINE COMPLETED SUCCESSFULLY\n")
shell("echo Output directory: $(pwd)")
print("\n")
onerror:
print("\n\nPIPELINE FAILED\n")
shell("echo Output directory: $(pwd)")
print("\n")
rule all:
input:
ou.determineOutput(config, sampleSheet)
output:
"pipeline_summary.json"
resources:
mem=lambda wildcards, attempt: attempt * 3
script:
"scripts/pipeline_summary.py"
include: "rules/md5.smk"
include: "rules/merge_fastq.smk"
include: "rules/star.smk"
include: "rules/bam_index.smk"
include: "rules/htseq-count.smk"
include: "rules/merge_counts.smk"
include: "rules/count_metrics.smk"
include: "rules/bamstats.smk"
include: "rules/hisat2.smk"
include: "rules/featurecounts.smk"
include: "rules/varscan.smk"
include: "rules/vcf_index.smk"
include: "rules/basecounter.smk"
include: "rules/qc.smk"
include: "rules/markduplicates.smk"
include: "rules/split_n_cigar_reads.smk"
include: "rules/baserecalibrator.smk"
include: "rules/printreads.smk"
include: "rules/haplotypecaller.smk"
include: "rules/salmon.smk"
include: "rules/centrifuge.smk"
include: "rules/rnaseq_stats.smk"
include: "rules/validate_fastq.smk"
include: "rules/validate_annotation.smk"
"""
output structure:
QC/
{sample}/
{lane}/
metrics/
{fastqc output}
{sample}_{lane}{group}.fastq.gz
raw_metrics/
{fastqc output}
merged/
{sample}_merged.fastq
cleaned/
metrics/
{fastqc output}
{sample}_cleaned.fastq
{mapper}/
metrics/{sample}
bamstats.json
bamstat.summary.json
{sample}/
{sample}_{mapper}.bam
{sample}_{mapper}.bam.bai
expression_measures_{mapper}/
{type}/
metrics/
-TBD-
{sample}/
{sample}.tsv
all_samples.tsv
variantcalling_{mapper}/
{variantcaller}/
{sample}/
metrics/
{sample}.vcf.gz
{sample}.vcf.gz.tbi
"""