Prokka module can get after modules stuck if the header file longer than 20 and not separated by tab or space
minhtrung1997 opened this issue ยท 7 comments
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
Thanks for the whole report. Your fix seems perfect. I would just like to give it a try and see how things look like before merging. Would you like to open a PR yourself with your bugfix? Then GitHub would actually be able to see your contribution and add you in the list of contributors.
Also, for bakta, to activate it instead of Prokka, you only need one parameter, see here: https://bacannot.readthedocs.io/en/latest/manual/#bakta-annotation
Thanks very much for your offer, but I'm more waiting for Update version with new tool such as MOB and Integron Finder
Best Regards
Thanks very much for your offer, but I'm more waiting for Update version with new tool such as MOB and Integron Finder Best Regards
Hi @minhtrung1997 ,
Even though things are still not merged in a new release (mainly due to lack of time) as I need some more testings and cleanup before doing it, mainly in docs, you can if desire, already use such tools from dev
branch which should already be more less 90% ready for next release.
yeah, 2 weeks ago I have run the dev branch code, which has been claimed to merge mob and integron on the company system, there is a bug. I will give the log 3h later
Hi @minhtrung1997 ,
Thanks for testing it.
Maybe would be worth to create a new ticket then or even re-opening the ticket adding the tool related to the bug.
๐