-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSnakefile
More file actions
36 lines (28 loc) · 1000 Bytes
/
Snakefile
File metadata and controls
36 lines (28 loc) · 1000 Bytes
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
import pandas as pd
import yaml
configfile: "data/config.yaml"
samples_data = pd.read_csv(config["samples"], sep="\t").set_index("name", drop=False)
samples = [sample.replace(" ", "_") for sample in samples_data["name"].tolist()]
def get_forward_readfile(wildcards):
return samples_data.loc[wildcards.sample, "forwardreads"]
def get_reverse_readfile(wildcards):
return samples_data.loc[wildcards.sample, "reversereads"]
def get_assemblyfile(wildcards):
return samples_data.loc[wildcards.sample, "assembly"]
include: "rules/read-mapping.smk"
include: "rules/metabat.smk"
include: "rules/maxbin.smk"
include: "rules/concoct.smk"
include: "rules/blobtools.smk"
def determine_output(wildcards):
l = []
for sample in samples:
for method in config["methods"].split(","):
l.append("results/" + sample + "/" + method + "/" + method + ".done")
return l
rule read_mapping:
input:
expand("results/{sample}/mapping/{sample}.bam", sample=samples)
rule binner:
input:
determine_output