Toxin_report.smk 1.14 KB
Newer Older
Laura Denies's avatar
Laura Denies committed
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
#Toxin

import glob
import os

#################################
# Combine Toxin HMM and SignalP #
#################################

# Put Toxin HMM results in the correct format & join SignalP and Toxin HMM files
rule R_script:
    input:
        input_HMM="{datadir}/{project}/TOXIN/HMM_toxin/{sample}.Input_HMM_R.csv",
        translation="{datadir}/{project}/renamed/{sample}_translation.tsv",
        signalP="{datadir}/{project}/SignalP/aggregated/{sample}_SignalP_results.tsv",
        library=config["pathofact"]["tox_lib"]
    output:
        gene_library="{datadir}/{project}/Toxin_gene_library_{sample}_report.tsv",
        gene_toxic="{datadir}/{project}/Toxin_prediction_{sample}_report.tsv"
    log:
        "{datadir}/{project}/TOXIN/R_output/{sample}_gene_table_library.log"
    message:
        "Run external R script to join SignalP and ToxinHMM and create Toxin report (incl. confidence levels)"
    params:
        outdir="{datadir}",
        runtime=config["pathofact"]["runtime"]["short"],
        mem=config["pathofact"]["mem"]["normal_mem_per_core_gb"]
    conda:
        "../../envs/R.yaml"
    script:
        "../../scripts/ownHMM_library.R"