Skip to content
Snippets Groups Projects
Commit 2ab9da0b authored by Valentina Galata's avatar Valentina Galata
Browse files

made FAA temp in rgi input rules; other minor changes (issue #29)

parent 5a7350e8
No related branches found
No related tags found
2 merge requests!69Add PlasFlow and RGI,!67WIP: Checkpoint snakefile
......@@ -233,6 +233,7 @@ rule plasflow:
# RGI #
#######
# RGI input: proteins
# NOTE: remove stop codon symbol "*"
# NOTE: one rule per assembly to have a workaround for the issue with file paths
# should be resolved properly later
rule rgi_input_flye:
......@@ -247,7 +248,7 @@ rule rgi_input_metaspades_hybrid:
input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades_hybrid/lr_no_barcode-sr_ONT3_MG_xx_Rashi_S11/contigs.faa"))
output:
os.path.join(RESULTS_DIR, "analysis/rgi/metaspades_hybrid.faa")
temp(os.path.join(RESULTS_DIR, "analysis/rgi/metaspades_hybrid.faa"))
shell:
"sed 's/\*$//' {input} > {output}"
......@@ -255,7 +256,7 @@ rule rgi_input_metaspades:
input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades/ONT3_MG_xx_Rashi_S11/final.contigs.faa"))
output:
os.path.join(RESULTS_DIR, "analysis/rgi/metaspades.faa")
temp(os.path.join(RESULTS_DIR, "analysis/rgi/metaspades.faa"))
shell:
"sed 's/\*$//' {input} > {output}"
......@@ -263,7 +264,7 @@ rule rgi_input_megahit:
input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/megahit/ONT3_MG_xx_Rashi_S11/final.contigs.faa"))
output:
os.path.join(RESULTS_DIR, "analysis/rgi/megahit.faa")
temp(os.path.join(RESULTS_DIR, "analysis/rgi/megahit.faa"))
shell:
"sed 's/\*$//' {input} > {output}"
......@@ -300,10 +301,11 @@ rule rgi_prot:
message:
"AMR prediction w/ RGI: {input}"
shell:
# NOTE: to make sure that the correct DB is used
"rgi clean --local &> {log} && "
"rgi load --card_json {input.db} --local &>> {log} && "
"rgi database --version --local &>> {log} && "
# NOTE: https://github.com/arpcard/rgi/issues/93
# NOTE: https://github.com/arpcard/rgi/issues/93: KeyError: 'snp'
# need to run the CMD twice
"rgi main --input_sequence {input.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} &>> {log} || "
"rgi main --input_sequence {input.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} &>> {log}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment