-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
36 lines (30 loc) · 983 Bytes
/
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
from datetime import date
##### Configuration #####
config["reference_genbank"] = config["reference_genbank"].rstrip("/")
config["fasta"] = config["fasta"].rstrip("/")
config["output_path"] = config["output_path"].rstrip("/")
today = date.today().strftime("%m%d%y")
##### Workflow #####
rule all:
input:
expand(config["output_path"] + "/{date}.fasta",date=today)
rule parse_reference:
input:
config["reference_genbank"]
output:
config["reference_genbank"] + ".json"
log:
config["output_path"] + "/refparser.log"
shell:
genofunk refparser -g {input} -o {output} -v &> {log}
rule annotate:
input:
reference_genbank = rules.parse_reference.output,
consensus_fasta = config["fasta"]
output:
config["fasta"] + ".coordinates",
config["fasta"] + ".edits",
log:
config["output_path"] + "/annotate.log"
shell:
genofunk annotate -g {input} -o {output} -v &> {log}