-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
85 lines (72 loc) · 2.47 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
import sys
from spacegraphcats.snakemake import (catlas_build, catlas_search,
catlas_extract, catlas_search_input)
sgc_config_file = 'config.yaml'
rule all:
input:
catlas_search(sgc_config_file),
catlas_extract(sgc_config_file)
rule clean:
shell:
"python -m spacegraphcats run {sgc_config_file} clean"
rule build:
input:
"data/twofoo.fq.gz"
output:
catlas_build(sgc_config_file)
shell:
"python -m spacegraphcats run {sgc_config_file} build --nolock"
rule search:
input:
catlas_search_input(sgc_config_file),
catlas_build(sgc_config_file),
output:
catlas_search(sgc_config_file)
shell:
"python -m spacegraphcats run {sgc_config_file} search --nolock"
rule extract:
input:
catlas_search(sgc_config_file),
output:
catlas_extract(sgc_config_file)
shell:
"python -m spacegraphcats run {sgc_config_file} extract_reads extract_contigs --nolock"
#
# akker-reads.abundtrim.gz is a collection of reads from podar data
# that maps to the Akkermansia muciniphila ATCC BAA-835 genome via bwa aln.
# "Real" data, with known answer. There does not appear to be significant
# overlap with other genomes in the Podar data set; so, no significant strain
# variation.
#
rule download_akker:
output:
"data/akker-reads.abundtrim.gz"
shell:
"curl -o {output} -L https://osf.io/dk7nb/download"
#
# shew-reads.abundtrim.gz is a collection of reads from podar data
# that maps to the Shewanella OS223 genome via bwa aln. "Real" data,
# with known answer. Note that there is significant overlap with the
# Shewanella OS185 genome; this is a data set with significant strain
# variation.
#
rule download_shew:
output:
"data/shew-reads.abundtrim.gz"
shell:
"curl -o {output} -L 'https://osf.io/7az9p/?action=download'"
#
# twofoo, use a synthetic mixture of reads from podar data -
# the shew-reads.abundtrim.gz (mapping to Shewanella baltica OS223) and
# akker-reads.abundtrim.gz (mapping to Akkermansia muciniphila ATCC BAA-835).
# Many of the shew-reads also map to S. baltica OS185, while the akker-reads
# do not; so this is a good mixture for testing the effects of strain variation
# on catlas foo.
rule make_twofoo:
input:
"data/shew-reads.abundtrim.gz",
"data/akker-reads.abundtrim.gz"
output:
"data/twofoo.fq.gz"
shell:
"gunzip -c {input} | gzip -9c > {output}"