Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 03b526bc authored by Laura Denies's avatar Laura Denies
Browse files

update HMM virulence prediction report

parent 850f0c34
......@@ -2,7 +2,7 @@ pathofact:
sample: ["test_sample"] # requires user input
project: PathoFact_update_trial # requires user input
datadir: ../test_dataset # requires user input
workflow: "Tox"
workflow: "Vir"
size_fasta: 1000
scripts: "scripts"
signalp: "/work/projects/ecosystem_biology/local_tools/SignalP/signalp-5.0b/bin" # requires user input
......
......@@ -10,7 +10,7 @@ import os
rule merge_SignalPVir:
input:
Vir="{datadir}/{project}/VIRULENCE/HMM_classifier_virulence/{sample}_virulence_final_prediction.tsv",
SignalP="{datadir}/{project}/SignalP/aggregated/{sample}_SignalP_results.txt"
SignalP="{datadir}/{project}/SignalP/aggregated/{sample}_SignalP_results.tsv"
output:
"{datadir}/{project}/VIRULENCE/virulence_merged/{sample}_virulence_SignalP_prediction.tsv"
params:
......
......@@ -88,44 +88,23 @@ rule HMM_R_VIR:
"../../scripts/hmm.R"
# Give pathogenicity prediction
rule HMM_VIR_nonpath:
rule HMM_VIR_classification:
input:
"{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}.hmm_results.csv"
output:
temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_non_path.txt")
non_path=temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_non_path.txt"),
pathogenic=temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_pathogenic.txt"),
unclassified=temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_unclassified.txt")
params:
runtime=config["pathofact"]["runtime"]["short"],
mem=config["pathofact"]["mem"]["normal_mem_per_core_gb"]
shell:
"""
awk '$2 == "True" && $3 == "False" && $4 == "False"' {input} | awk '$5 = "Non-Pathogenic"' | sed 's/ /\\t/g' > {output}
awk '$2 == "True" && $3 == "False" && $4 == "False"' {input} | awk '$5 = "Non-Pathogenic"' | sed 's/ /\\t/g' > {output.non_path}
awk '$3 == "True"' {input} | awk '$5 = "Pathogenic"' | sed 's/ /\\t/g' > {output.pathogenic}
awk '$3 == "False" && $4 == "True"' {input} | awk '$5 = "Unclassified"' | sed 's/ /\\t/g' > {output.unclassified}
"""
rule HMM_VIR_pathogenic:
input:
"{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}.hmm_results.csv"
output:
temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_pathogenic.txt")
params:
runtime=config["pathofact"]["runtime"]["short"],
mem=config["pathofact"]["mem"]["normal_mem_per_core_gb"]
shell:
"""
awk '$3 == "True"' {input} | awk '$5 = "Pathogenic"' | sed 's/ /\\t/g' > {output}
"""
rule HMM_VIR_unclassified:
input:
"{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}.hmm_results.csv"
output:
temp("{datadir}/{project}/VIRULENCE/HMM_virulence/{sample}_hmm_unclassified.txt")
params:
runtime=config["pathofact"]["runtime"]["short"],
mem=config["pathofact"]["mem"]["normal_mem_per_core_gb"]
shell:
"""
awk '$3 == "False" && $4 == "True"' {input} | awk '$5 = "Unclassified"' | sed 's/ /\\t/g' > {output}
"""
rule HMM_VIR_report:
input:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment