Commit f2d5c20f authored by Valentina Galata's avatar Valentina Galata
Browse files

adjusted paths to YAML files in rules (issue #14)

parent 0d648fe6
......@@ -16,7 +16,7 @@ rule run_deepARG:
input:"{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output:temp("{OUTDIR}/{project}/AMR/deepARG_results/{input_file}/{file_i}.out.mapping.ARG")
params: outdir="{OUTDIR}"
conda: "../../conda_environments/AMR.yml"
conda: "../../envs/DeepARG.yaml"
shell: "python {config[deep_ARG]} --align --type prot --genes --input {input} --output {wildcards.OUTDIR}/{wildcards.project}/AMR/deepARG_results/{wildcards.input_file}/{wildcards.file_i}.out"
......
......@@ -25,7 +25,7 @@ rule combine_AMR_plasmid:
Report_1=temp("{OUTDIR}/{project}/AMR/{input_file}_MGE_AMR_prediction_detail_temp.csv"),
Report_2=temp("{OUTDIR}/{project}/AMR/{input_file}_MGE_AMR_prediction_report_temp.csv")
params: outdir="{OUTDIR}"
conda: "../../conda_environments/renv.yaml"
conda: "../../envs/R.yaml"
script: "AMR_MGE.R"
rule modify_details:
......
......@@ -18,7 +18,7 @@ checkpoint splitphage:
input: "{OUTDIR}/{project}/renamed/{input_file}_Contig_ID.fna"
output: split=directory("{OUTDIR}/{project}/contig_splitted/{input_file}/")
params: outdir="{OUTDIR}"
conda: "../../conda_environments/Seqkit.yml"
conda: "../../envs/SeqKit.yaml"
shell: """
seqkit split2 -s 10000 {input} -O {wildcards.OUTDIR}/{wildcards.project}/contig_splitted/{wildcards.input_file}
"""
......@@ -27,7 +27,7 @@ rule run_VirSorter:
input: "{OUTDIR}/{project}/renamed/{input_file}_Contig_ID.fna"
output: "{OUTDIR}/{project}/MGE/phage/{input_file}/virsorter/VIRSorter_global-phage-signal.csv"
params: outdir="{OUTDIR}"
conda: "../../conda_environments/virsorter.yml"
conda: "../../envs/VirSorter.yaml"
threads: 12
shell: """
{config[virsorter]} -f {input} --ncpu {threads} --wdir {wildcards.OUTDIR}/{wildcards.project}/MGE/phage/{wildcards.input_file}/virsorter --data-dir {config[virsorter_data]}
......@@ -43,7 +43,7 @@ rule run_Virfinder:
input: "{OUTDIR}/{project}/contig_splitted/{input_file}/{file_i}.fna"
output: "{OUTDIR}/{project}/MGE/phage/{input_file}/virfinder/{file_i}.fna_gt1bp_dvfpred.txt"
params: outdir="{OUTDIR}"
conda: "../../conda_environments/virfinder.yml"
conda: "../../envs/DeepVirFinder.yaml"
threads: 12
shell: "python {config[DeepVirFinder]} -i {input} -o {wildcards.OUTDIR}/{wildcards.project}/MGE/phage/{wildcards.input_file}/virfinder -c {threads}"
......
......@@ -16,7 +16,7 @@ INPUT=config["input_file"]
rule filter_seq:
input: "{OUTDIR}/{project}/renamed/{input_file}_Contig_ID.fna"
output: "{OUTDIR}/{project}/{input_file}_filtered.fna"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
params: outdir="{OUTDIR}"
shell: "./scripts/filter.pl 1000 {input} > {output}"
......@@ -24,7 +24,7 @@ checkpoint splitplasmid:
input: "{OUTDIR}/{project}/{input_file}_filtered.fna"
output: split=directory("{OUTDIR}/{project}/MGE/plasmid_splitted/{input_file}/")
params: outdir="{OUTDIR}"
conda: "../../conda_environments/Seqkit.yml"
conda: "../../envs/SeqKit.yaml"
shell: """
seqkit split2 -s 10000 {input} -O {wildcards.OUTDIR}/{wildcards.project}/MGE/plasmid_splitted/{wildcards.input_file}
"""
......@@ -33,7 +33,7 @@ checkpoint splitplasmid:
rule run_PLASMID:
input: "{OUTDIR}/{project}/MGE/plasmid_splitted/{input_file}/{file_i}.fna"
output: temp("{OUTDIR}/{project}/MGE/plasmid/{input_file}/{file_i}_plasflow_prediction.tsv")
conda: "../../conda_environments/Plasmid.yml"
conda: "../../envs/PlasFlow.yaml"
params: outdir="{OUTDIR}"
shell: """
{config[Plasflow]} --input {input} --output {output} --threshold 0.7
......
......@@ -23,7 +23,7 @@ rule R_script:
gene_toxic=temp("{OUTDIR}/{project}/TOXIN/R_output/{input_file}_gene_table_Toxic.csv")
message: "Run external R script to join SignalP and ToxinHMM"
params: outdir="{OUTDIR}"
conda: "../../conda_environments/renv.yaml"
conda: "../../envs/R.yaml"
script: "ownHMM_library.R"
#Put the different files in the correct configuration
......
......@@ -13,7 +13,7 @@ rule combine_PathoFact:
Toxins="{OUTDIR}/{project}/Toxin_prediction_{input_file}_report.csv",
AMR_MGE="{OUTDIR}/{project}/AMR_MGE_prediction_{input_file}_report.tsv"
output: "{OUTDIR}/{project}/PathoFact_{input_file}_predictions.csv"
conda: "../../conda_environments/renv.yaml"
conda: "../../envs/R.yaml"
script: "PathoFact.R"
......
......@@ -45,7 +45,7 @@ checkpoint splitting:
output:
splits=directory("{OUTDIR}/{project}/splitted/{input_file}/")
params: outdir="{OUTDIR}"
conda: "../../conda_environments/Seqkit.yml"
conda: "../../envs/SeqKit.yaml"
shell: """
seqkit split2 -s 10000 {input} -O {wildcards.OUTDIR}/{wildcards.project}/splitted/{wildcards.input_file}
"""
......
......@@ -55,7 +55,7 @@ rule HMM_R_VIR:
shared="databases/models_and_domains/shared_domains.tsv",
ID="{OUTDIR}/{project}/renamed/{input_file}_translation.tsv"
output: "{OUTDIR}/{project}/VIRULENCE/HMM_virulence/{input_file}.hmm_results.csv"
conda: "../../conda_environments/renv.yaml"
conda: "../../envs/R.yaml"
script: "hmm.R"
......@@ -103,31 +103,31 @@ rule HMM_VIR_finalformat:
rule AAC:
input: "{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_AAC.txt"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/AAC.py --file {input} --out {output}"
rule DPC:
input: "{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_DPC.txt"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/DPC.py --file {input} --out {output}"
rule CTDC:
input: "{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_CTDC.txt"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/CTDC.py --file {input} --out {output}"
rule CTDT:
input: "{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_CTDT.txt"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/CTDT.py --file {input} --out {output}"
rule CTDD:
input: "{OUTDIR}/{project}/splitted/{input_file}/{file_i}.faa"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_CTDD.txt"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/CTDD.py --file {input} --out {output}"
rule join_matrix:
......@@ -161,7 +161,7 @@ rule join_matrix:
rule classifier:
input: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_matrix.tsv"
output: "{OUTDIR}/{project}/VIRULENCE/classifier_virulence/{input_file}/{file_i}_classifier_prediction.tsv"
conda: "../../conda_environments/biopython_env.yaml"
conda: "../../envs/Biopython.yaml"
shell: "python scripts/virulence_prediction.py {input} {output}"
def aggregate_classifier(wildcards):
......
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