-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
Describe the bug
Hi dev team, I encouter an old error of prokka as the 76 issue. I know how to fix it in code, but I do think the author should be informed and cover all the situations
To Reproduce
Please check the log file
nextflow_log_bacannot.txt
Expected behavior
I've fixed the code like this and it runs smoothly
script:
kingdom = (params.prokka_kingdom) ? "--kingdom ${params.prokka_kingdom}" : ''
gcode = (params.prokka_genetic_code) ? "--gcode ${params.prokka_genetic_code}" : ''
rnammer = (params.prokka_use_rnammer) ? "--rnammer" : ''
models = (params.prokka_use_pgap) ? "PGAP_NCBI.hmm" : "TIGRFAMs_15.0.hmm"
if (prefix.length() <= 20) { locus_tag = prefix.replaceAll("[ .]","_") } else { locus_tag = prefix.substring(0,20).replaceAll("[ .]","_") }
"""
# save prokka version
prokka -v &> prokka_version.txt ;
# where are default prokka dbs?
dbs_dir=\$(prokka --listdb 2>&1 >/dev/null | grep "databases in" | cut -f 4 -d ":" | tr -d " ") ;
# get hmms that shall be used
# PGAP contains TIGRFAM hmm models. When not skipping PGAP, TIGRFAM is not loaded.
cp -r \$dbs_dir prokka_db
cp ${bacannot_db}/prokka_db/${models} prokka_db/hmm
# hmmpress
( cd prokka_db/hmm/ ; for i in *.hmm ; do hmmpress -f \$i ; done )
# run prokka
prokka \\
--dbdir prokka_db \\
$kingdom $gcode $rnammer \\
--outdir annotation \\
--cpus $task.cpus \\
--mincontiglen 200 \\
--prefix ${prefix} \\
--genus '' \\
--species '' \\
--strain \"${prefix}\" \\
--centre KTest --locustag ${locus_tag} \\
$assembly
# remove tmp dir to gain space
rm -r prokka_db
"""
By the way, how can I run bakta annotation if I have an official bakta db ? https://github.com/oschwengers/bakta#database
Many thanks