Snakefile 2.58 KB
Newer Older
Laura Denies's avatar
Laura Denies committed
1
#Snakefile
Laura Denies's avatar
Laura Denies committed
2

3
configfile: "config.yaml"
Laura Denies's avatar
Laura Denies committed
4
DATA_DIR=config["pathofact"]["datadir"]
5

6
if config["pathofact"]["workflow"] == "complete":
7
    include:
8
        "workflows/Combine_PathoFact_workflow.smk"
9 10 11 12
    rule all:
        input:
            expand(
                [
Laura Denies's avatar
Laura Denies committed
13 14 15 16
                    os.path.join(DATA_DIR,"{project}/PathoFact_intermediate/AMR/{sample}_AMR_MGE_prediction_detailed.tsv"),
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/Toxin_gene_library_{sample}_report.tsv"),
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/PathoFact_{sample}_predictions.tsv"),
                    os.path.join(DATA_DIR,"{project}/logs/{sample}_compressed.zip")
17
                ],
Laura Denies's avatar
Laura Denies committed
18
                 project=config["pathofact"]["project"], sample=config["pathofact"]["sample"]
19
            )
20
elif config["pathofact"]["workflow"] == "Tox":
21
    include:
22
        "workflows/Toxin_workflow.smk"
23 24 25 26
    rule all:
        input:
            expand(
                [
Laura Denies's avatar
Laura Denies committed
27 28 29
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/Toxin_prediction_{sample}_report.tsv"),
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/Toxin_gene_library_{sample}_report.tsv"),
                    os.path.join(DATA_DIR,"{project}/logs/Tox_{sample}_compressed.zip")
30
                ],
Laura Denies's avatar
Laura Denies committed
31
                project=config["pathofact"]["project"], sample=config["pathofact"]["sample"]
32
            )
33
elif config["pathofact"]["workflow"] == "Vir":
34
    include:
35
        "workflows/Virulence_workflow.smk"
36 37 38
    rule all:
        input:
            expand(
Laura Denies's avatar
Laura Denies committed
39
                [
Laura Denies's avatar
Laura Denies committed
40 41
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/Virulence_prediction_{sample}_report.tsv"),
                    os.path.join(DATA_DIR,"{project}/logs/VF_{sample}_compressed.zip")
Laura Denies's avatar
Laura Denies committed
42
                ],
Laura Denies's avatar
Laura Denies committed
43
                project=config["pathofact"]["project"], sample=config["pathofact"]["sample"]
44
            )                    
45
elif config["pathofact"]["workflow"] == "AMR":
46
    include:
47
        "workflows/AMR_workflow.smk"
48 49 50 51
    rule all:
        input:
            expand(
                [
Laura Denies's avatar
Laura Denies committed
52 53 54
                    os.path.join(DATA_DIR,"{project}/PathoFact_report/AMR_MGE_prediction_{sample}_report.tsv"),
                    os.path.join(DATA_DIR,"{project}/PathoFact_intermediate/AMR/{sample}_AMR_MGE_prediction_detailed.tsv"),
                    os.path.join(DATA_DIR,"{project}/logs/AMR_{sample}_compressed.zip")
55
                ],
Laura Denies's avatar
Laura Denies committed
56
                project=config["pathofact"]["project"], sample=config["pathofact"]["sample"]
57
            )
Laura Denies's avatar
Laura Denies committed
58
else:
59
    raise Exception("Unknown workflow option: %s" % config["pathofact"]["workflow"])