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: ...@@ -233,6 +233,7 @@ rule plasflow:
# RGI # # RGI #
####### #######
# RGI input: proteins # RGI input: proteins
# NOTE: remove stop codon symbol "*"
# NOTE: one rule per assembly to have a workaround for the issue with file paths # NOTE: one rule per assembly to have a workaround for the issue with file paths
# should be resolved properly later # should be resolved properly later
rule rgi_input_flye: rule rgi_input_flye:
...@@ -247,7 +248,7 @@ rule rgi_input_metaspades_hybrid: ...@@ -247,7 +248,7 @@ rule rgi_input_metaspades_hybrid:
input: input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades_hybrid/lr_no_barcode-sr_ONT3_MG_xx_Rashi_S11/contigs.faa")) os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades_hybrid/lr_no_barcode-sr_ONT3_MG_xx_Rashi_S11/contigs.faa"))
output: output:
os.path.join(RESULTS_DIR, "analysis/rgi/metaspades_hybrid.faa") temp(os.path.join(RESULTS_DIR, "analysis/rgi/metaspades_hybrid.faa"))
shell: shell:
"sed 's/\*$//' {input} > {output}" "sed 's/\*$//' {input} > {output}"
...@@ -255,7 +256,7 @@ rule rgi_input_metaspades: ...@@ -255,7 +256,7 @@ rule rgi_input_metaspades:
input: input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades/ONT3_MG_xx_Rashi_S11/final.contigs.faa")) os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/metaspades/ONT3_MG_xx_Rashi_S11/final.contigs.faa"))
output: output:
os.path.join(RESULTS_DIR, "analysis/rgi/metaspades.faa") temp(os.path.join(RESULTS_DIR, "analysis/rgi/metaspades.faa"))
shell: shell:
"sed 's/\*$//' {input} > {output}" "sed 's/\*$//' {input} > {output}"
...@@ -263,7 +264,7 @@ rule rgi_input_megahit: ...@@ -263,7 +264,7 @@ rule rgi_input_megahit:
input: input:
os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/megahit/ONT3_MG_xx_Rashi_S11/final.contigs.faa")) os.path.abspath(os.path.join(RESULTS_DIR, "annotation/proteins/megahit/ONT3_MG_xx_Rashi_S11/final.contigs.faa"))
output: output:
os.path.join(RESULTS_DIR, "analysis/rgi/megahit.faa") temp(os.path.join(RESULTS_DIR, "analysis/rgi/megahit.faa"))
shell: shell:
"sed 's/\*$//' {input} > {output}" "sed 's/\*$//' {input} > {output}"
...@@ -300,10 +301,11 @@ rule rgi_prot: ...@@ -300,10 +301,11 @@ rule rgi_prot:
message: message:
"AMR prediction w/ RGI: {input}" "AMR prediction w/ RGI: {input}"
shell: shell:
# NOTE: to make sure that the correct DB is used
"rgi clean --local &> {log} && " "rgi clean --local &> {log} && "
"rgi load --card_json {input.db} --local &>> {log} && " "rgi load --card_json {input.db} --local &>> {log} && "
"rgi database --version --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 # 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} || "
"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