Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prokka module can get after modules stuck if the header file longer than 20 and not separated by tab or space #85

Closed
Tracked by #88
minhtrung1997 opened this issue Feb 16, 2023 · 7 comments · Fixed by #89
Labels
bug Something isn't working priority

Comments

@minhtrung1997
Copy link

minhtrung1997 commented Feb 16, 2023

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

@fmalmeida
Copy link
Owner

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

@fmalmeida fmalmeida added bug Something isn't working priority labels Feb 16, 2023
@minhtrung1997
Copy link
Author

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

@fmalmeida
Copy link
Owner

Integron Finder should be in dev this week. Then I can go for MOB suite:

@fmalmeida
Copy link
Owner

Fixed by PR #89 .. merged to dev

@fmalmeida
Copy link
Owner

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.

@minhtrung1997
Copy link
Author

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

@fmalmeida
Copy link
Owner

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.
😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment