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

updated annotation (not tested)

parent a17cbe8b
No related branches found
No related tags found
1 merge request!76Merge "cleanup" branch with "master" branch
......@@ -143,7 +143,45 @@ rule annotation_rgi:
# 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} || "
"rgi main --input_sequence {input.faa} --output_file {params.obname} --input_type protein --local -a {params.alignment_tool} --clean -n {threads} && "
") 2> {log.err} > {log.out}"
"date) 2> {log.err} > {log.out}"
##################################################
# CRISPR
rule casc:
input:
os.path.join(RESULTS_DIR, "assembly/{rtype}/{tool}/ASSEMBLY.fasta")
output:
os.path.join(RESULTS_DIR, "annotation/casc/{rtype}/{tool}/ASSEMBLY.results.txt")
log:
out="logs/annotation_casc_{rtype}.{tool}.out.log",
err="logs/annotation_casc_{rtype}.{tool}.err.log"
threads:
config["casc"]["threads"]
conda:
os.path.join(ENV_DIR, "analysis.yaml")
shell:
"(date && "
"export PATH={config[casc][path]} && "
"export PERL5LIB={config[casc][perl5lib]} && "
"casc -i {input} -o $(dirname {output}) -n {threads} --conservative && "
"date) 2> {log.err} > {log.out}"
rule minced:
input:
os.path.join(RESULTS_DIR, "assembly/{rtype}/{tool}/ASSEMBLY.fasta")
output:
txt=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/ASSEMBLY.results.txt"),
gff=os.path.join(RESULTS_DIR, "annotation/minced/{rtype}/{tool}/ASSEMBLY.results.gff")
log:
out="logs/annotation_minced_{rtype}.{tool}.out.log",
err="logs/annotation_minced_{rtype}.{tool}.err.log"
conda: "../envs/analysis.yaml"
shell:
"(date && "
"export PATH={config[minced][path]} && "
"minced {input} {output.txt} {output.gff} && "
"date) 2> {log.err} > {log.out}"
##################################################
# PlasFlow
......@@ -169,7 +207,8 @@ rule annotation_plasflow:
input:
os.path.join(RESULTS_DIR, "annotation/plasflow/{rtype}/{tool}/input.fasta")
output:
os.path.join(RESULTS_DIR, "annotation/plasflow/{rtype}/{tool}/plasflow.tsv")
tmp=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:
out="logs/annotation_plasflow_{rtype}.{tool}.out.log",
err="logs/annotation_plasflow_{rtype}.{tool}.err.log"
......@@ -185,7 +224,6 @@ rule annotation_plasflow:
"PlasFlow: predict: {input}"
shell:
"(date && "
"PlasFlow.py --input {input} --output {output}.tmp --threshold {params.threshold} &> {log} && "
"date) 2> {log.err} > {log.out} && "
"cut -f3,4,6- {output}.tmp > {output} && "
"rm {output}.tmp*"
\ No newline at end of file
"PlasFlow.py --input {input} --output {output.tmp} --threshold {params.threshold} &> {log} && "
"cut -f3,4,6- {output.tmp} > {output.tsv} && "
"date) 2> {log.err} > {log.out}"
......@@ -24,6 +24,15 @@ rule PROTEINS:
os.path.join(RESULTS_DIR, "annotation/rgi/{rtype_tool}/rgi.txt"),
rtype_tool=["%s/%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS]
)
# crispr
expand(
os.path.join(RESULTS_DIR, "annotation/casc/{rtype_tool}/ASSEMBLY.results.txt"),
rtype_tool=["%s/%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS]
)
expand(
os.path.join(RESULTS_DIR, "annotation/minced/{rtype_tool}/ASSEMBLY.results.txt"),
rtype_tool=["%s/%s" % (rtype, tool) for rtype, tool in READ_ASSEMBLERS]
)
# plasflow
expand(
os.path.join(RESULTS_DIR, "annotation/plasflow/{rtype_tool}/plasflow.tsv"),
......
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