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

annotation: fixed rgi rule (processed input)

parent 2e0757aa
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ rule annotation_prodigal:
output:
os.path.join(RESULTS_DIR, "annotation/prodigal/{rtype}/{tool}/proteins.faa")
log:
"logs/prodigal.{rtype}.{tool}.log"
"logs/annotation.prodigal.{rtype}.{tool}.log"
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS)
......@@ -31,10 +31,10 @@ rule annotation_rgi:
db=os.path.join(DB_DIR, "rgi/card.json"),
setup="status/rgi_setup.done" # NOTE: to make sure that the same DB is used for all targets
output:
faa=temp(os.path.join(RESULTS_DIR, "annotation/rgi/{rtype}/{tool}/input.faa"))
faa=temp(os.path.join(RESULTS_DIR, "annotation/rgi/{rtype}/{tool}/input.faa")),
txt=os.path.join(RESULTS_DIR, "annotation/rgi/{rtype}/{tool}/rgi.txt")
log:
"logs/rgi.{rtype}.{tool}.log",
"logs/annotation.rgi.{rtype}.{tool}.log",
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS)
......@@ -52,8 +52,8 @@ rule annotation_rgi:
"sed 's/\*$//' {input} > {output.faa} && "
"rgi database --version --local && "
# NOTE: https://github.com/arpcard/rgi/issues/93: KeyError: 'snp' --> re-run
"rgi main --input_sequence {input.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} || "
"rgi main --input_sequence {input.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} && "
"rgi main --input_sequence {output.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} || "
"rgi main --input_sequence {output.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} && "
"date) &> {log}"
##################################################
......@@ -66,7 +66,7 @@ rule annotation_casc:
output:
os.path.join(RESULTS_DIR, "annotation/casc/{rtype}/{tool}/ASSEMBLY.POLISHED.results.txt")
log:
"logs/casc.{rtype}.{tool}.log"
"logs/annotation.casc.{rtype}.{tool}.log"
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS)
......@@ -88,10 +88,10 @@ rule annotation_minced:
asm=os.path.join(RESULTS_DIR, "assembly/{rtype}/{tool}/ASSEMBLY.POLISHED.fasta"),
jar=os.path.join(MOD_DIR, "minced/minced.jar")
output:
txt=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/ASSEMBLY.POLISHED.results.txt"),
gff=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/ASSEMBLY.POLISHED.results.gff")
txt=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/minced.txt"),
gff=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/minced.gff")
log:
"logs/minced.{rtype}.{tool}.log"
"logs/annotation.minced.{rtype}.{tool}.log"
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS)
......@@ -116,7 +116,7 @@ rule annotation_plasflow:
tmp=temp(os.path.join(RESULTS_DIR, "annotation/plasflow/{rtype}/{tool}/plasflow.tsv.tmp")),
tsv=os.path.join(RESULTS_DIR, "annotation/plasflow/{rtype}/{tool}/plasflow.tsv")
log:
"logs/plasflow.{rtype}.{tool}.log"
"logs/annotation.plasflow.{rtype}.{tool}.log"
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS)
......@@ -146,7 +146,7 @@ rule annotation_barrnap:
fa=os.path.join(RESULTS_DIR, "annotation/barrnap/{rtype}/{tool}/{kingdom}.fa"),
gff=os.path.join(RESULTS_DIR, "annotation/barrnap/{rtype}/{tool}/{kingdom}.gff")
log:
"logs/barrnap.{rtype}.{tool}.{kingdom}.log"
"logs/annotation.barrnap.{rtype}.{tool}.{kingdom}.log"
wildcard_constraints:
rtype="|".join(READ_TYPES),
tool="|".join(ASSEMBLERS),
......@@ -166,7 +166,7 @@ rule annotation_barrnap:
rule annotation_hmm_kegg:
input:
faa=os.path.join(RESULTS_DIR, "annotation/prodigal/{rtype}/{tool}/proteins.faa"),
hmm=config["hmm"]["dbs"]["kegg"]
hmm=os.path.join(DB_DIR, config["hmm"]["kegg"])
output:
os.path.join(RESULTS_DIR, "annotation/hmm/kegg/{rtype}/{tool}/hmm.tblout")
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