tseemann / prokka

:zap: :aquarius: Rapid prokaryotic genome annotation
850 stars 226 forks source link

prokka setup db #599

Open annavet opened 3 years ago

annavet commented 3 years ago

Hallo. Can you help me? anna@anna-G3-3590:~$ prokka Name: Prokka 1.14.5 by Torsten Seemann torsten.seemann@gmail.com Synopsis: rapid bacterial genome annotation Usage: prokka [options] General: --help This help --version Print version and exit --citation Print citation for referencing Prokka --quiet No screen output (default OFF) --debug Debug mode: keep all temporary files (default OFF) Setup: --dbdir [X] Prokka database root folders (default '/var/lib/prokka/db') --listdb List all configured databases --setupdb Index all installed databases --cleandb Remove all database indices --depends List all software dependencies Outputs: --outdir [X] Output folder [auto] (default '') --force Force overwriting existing output folder (default OFF) --prefix [X] Filename output prefix [auto] (default '') --addgenes Add 'gene' features for each 'CDS' feature (default OFF) --addmrna Add 'mRNA' features for each 'CDS' feature (default OFF) --locustag [X] Locus tag prefix [auto] (default '') --increment [N] Locus tag counter increment (default '1') --gffver [N] GFF version (default '3') --compliant Force Genbank/ENA/DDJB compliance: --addgenes --mincontiglen 200 --centre XXX (default OFF) --centre [X] Sequencing centre ID. (default '') --accver [N] Version to put in Genbank file (default '1') Organism details: --genus [X] Genus name (default 'Genus') --species [X] Species name (default 'species') --strain [X] Strain name (default 'strain') --plasmid [X] Plasmid name or identifier (default '') Annotations: --kingdom [X] Annotation mode: (default 'Bacteria') --gcode [N] Genetic code / Translation table (set if --kingdom is set) (default '0') --prodigaltf [X] Prodigal training file (default '') --gram [X] Gram: -/neg +/pos (default '') --usegenus Use genus-specific BLAST databases (needs --genus) (default OFF) --proteins [X] FASTA or GBK file to use as 1st priority (default '') --hmms [X] Trusted HMM to first annotate from (default '') --metagenome Improve gene predictions for highly fragmented genomes (default OFF) --rawproduct Do not clean up /product annotation (default OFF) --cdsrnaolap Allow [tr]RNA to overlap CDS (default OFF) Matching: --evalue [n.n] Similarity e-value cut-off (default '1e-09') --coverage [n.n] Minimum coverage on query protein (default '80') Computation: --cpus [N] Number of CPUs to use [0=all] (default '8') --fast Fast mode - only use basic BLASTP databases (default OFF) --noanno For CDS just set /product="unannotated protein" (default OFF) --mincontiglen [N] Minimum contig size [NCBI needs 200] (default '1') --rfam Enable searching for ncRNAs with Infernal+Rfam (SLOW!) (default '0') --norrna Don't run rRNA search (default OFF) --notrna Don't run tRNA search (default OFF) --rnammer Prefer RNAmmer over Barrnap for rRNA prediction (default OFF) anna@anna-G3-3590:~$ prokka --version prokka 1.14.5 anna@anna-G3-3590:~$ prokka --listdb [13:19:12] Looking for databases in: /var/lib/prokka/db [13:19:12] Kingdoms: [13:19:12] Genera: Enterococcus Escherichia Staphylococcus [13:19:12] HMMs: [13:19:12] CMs: Archaea Bacteria Viruses anna@anna-G3-3590:~$ prokka \

/home/anna/genomes/7p-81/assemblies/91/scaffolds.fasta \ --outdir /home/anna/genomes/7p-81/annotation/prokka --addgenes --addmrna --genus Pseudomonas --strain 7p_81prokka \

[13:24:31] This is prokka 1.14.5 [13:24:31] Written by Torsten Seemann torsten.seemann@gmail.com [13:24:31] Homepage is https://github.com/tseemann/prokka [13:24:31] Local time is Wed Nov 17 13:24:31 2021 [13:24:31] You are anna [13:24:31] Operating system is linux [13:24:31] You have BioPerl 1.7.7 Argument "1.7.7" isn't numeric in numeric lt (<) at /usr/bin/prokka line 259. [13:24:31] System has 12 cores. [13:24:31] Will use maximum of 8 cores. [13:24:31] Annotating as >>> Bacteria <<< [13:24:31] The sequence databases have not been indexed. Please run 'prokka --setupdb' first. anna@anna-G3-3590:~$ To solve the above issue. I did prokka --setupdb/ Could you please guide me on how to resolve this issue? I must admit that I am a fairly new Linux user, so the problem very well could be on my end. I would really appreciate. Thank you for your time.

Regards, Anna Vetrova

colin-heberling commented 2 years ago

I'm having the same issue. I've used prokka for years in the past on a different set of servers without any issues, so this error is new to me.

I did prokka --setupdb as suggested by the program, which seems to have been successful, but trying to run prokka on a set of contigs still gives the same error message "The sequence databases have not been indexed. Please run 'prokka --setupdb' first." Could the error have to do with the BioPerl version numeric comparison error, or is this separate?

Below is my output from prokka --setupdb, which I believe worked fine:

[21:41:47] Appending to PATH: /usr/bin
[21:41:47] Cleaning databases in /var/lib/prokka/db
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.phd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.phi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.phr
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.pin
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.pog
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.psd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.psi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Enterococcus.psq
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.phd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.phi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.phr
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.pin
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.pog
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.psd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.psi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Escherichia.psq
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.phd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.phi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.phr
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.pin
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.pog
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.psd
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.psi
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/genus/Staphylococcus.psq
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Archaea.i1f
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Archaea.i1i
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Archaea.i1m
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Archaea.i1p
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Bacteria.i1f
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Bacteria.i1i
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Bacteria.i1m
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Bacteria.i1p
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Viruses.i1f
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Viruses.i1i
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Viruses.i1m
[21:41:47] Deleting unwanted file: /var/lib/prokka/db/cm/Viruses.i1p
[21:41:47] Cleaning complete.
[21:41:47] Looking for 'makeblastdb' - found /usr/bin/makeblastdb
[21:41:48] Determined makeblastdb version is 002009 from 'makeblastdb: 2.9.0+'
[21:41:48] Making genus BLASTP database: /var/lib/prokka/db/genus/Enterococcus
[21:41:48] Running: makeblastdb -hash_index -dbtype prot -in \/var\/lib\/prokka\/db\/genus\/Enterococcus -logfile /dev/null
[21:41:48] Making genus BLASTP database: /var/lib/prokka/db/genus/Escherichia
[21:41:48] Running: makeblastdb -hash_index -dbtype prot -in \/var\/lib\/prokka\/db\/genus\/Escherichia -logfile /dev/null
[21:41:48] Making genus BLASTP database: /var/lib/prokka/db/genus/Staphylococcus
[21:41:48] Running: makeblastdb -hash_index -dbtype prot -in \/var\/lib\/prokka\/db\/genus\/Staphylococcus -logfile /dev/null
[21:41:48] Looking for 'hmmpress' - found /usr/bin/hmmpress
[21:41:48] Determined hmmpress version is 003003 from '# HMMER 3.3 (Nov 2019); http://hmmer.org/'
[21:41:48] Looking for 'cmpress' - found /usr/bin/cmpress
[21:41:48] Determined cmpress version is 001001 from '# INFERNAL 1.1.3 (Nov 2019)'
[21:41:48] Pressing CM database: /var/lib/prokka/db/cm/Viruses
[21:41:48] Running: cmpress \/var\/lib\/prokka\/db\/cm\/Viruses
Working...    done.
Pressed and indexed 239 CMs and p7 HMM filters (239 names and 239 accessions).
Covariance models and p7 filters pressed into binary file:  /var/lib/prokka/db/cm/Viruses.i1m
SSI index for binary covariance model file:                 /var/lib/prokka/db/cm/Viruses.i1i
Optimized p7 filter profiles (MSV part)  pressed into:      /var/lib/prokka/db/cm/Viruses.i1f
Optimized p7 filter profiles (remainder) pressed into:      /var/lib/prokka/db/cm/Viruses.i1p
[21:41:49] Pressing CM database: /var/lib/prokka/db/cm/Bacteria
[21:41:49] Running: cmpress \/var\/lib\/prokka\/db\/cm\/Bacteria
Working...    done.
Pressed and indexed 1127 CMs and p7 HMM filters (1127 names and 1127 accessions).
Covariance models and p7 filters pressed into binary file:  /var/lib/prokka/db/cm/Bacteria.i1m
SSI index for binary covariance model file:                 /var/lib/prokka/db/cm/Bacteria.i1i
Optimized p7 filter profiles (MSV part)  pressed into:      /var/lib/prokka/db/cm/Bacteria.i1f
Optimized p7 filter profiles (remainder) pressed into:      /var/lib/prokka/db/cm/Bacteria.i1p
[21:41:49] Pressing CM database: /var/lib/prokka/db/cm/Archaea
[21:41:49] Running: cmpress \/var\/lib\/prokka\/db\/cm\/Archaea
Working...    done.
Pressed and indexed 152 CMs and p7 HMM filters (152 names and 152 accessions).
Covariance models and p7 filters pressed into binary file:  /var/lib/prokka/db/cm/Archaea.i1m
SSI index for binary covariance model file:                 /var/lib/prokka/db/cm/Archaea.i1i
Optimized p7 filter profiles (MSV part)  pressed into:      /var/lib/prokka/db/cm/Archaea.i1f
Optimized p7 filter profiles (remainder) pressed into:      /var/lib/prokka/db/cm/Archaea.i1p
[21:41:49] Looking for databases in: /var/lib/prokka/db
[21:41:49] * Kingdoms:
[21:41:49] * Genera: Enterococcus Escherichia Staphylococcus
[21:41:49] * HMMs:
[21:41:49] * CMs: Archaea Bacteria Viruses

I can use prokka --listdb and it appears to be able to find the indexes, so it doesn't make sense that running the main program gives the 'database not indexed' error:

[21:46:48] Looking for databases in: /var/lib/prokka/db
[21:46:48] * Kingdoms:
[21:46:48] * Genera: Enterococcus Escherichia Staphylococcus
[21:46:48] * HMMs:
[21:46:48] * CMs: Archaea Bacteria Viruses
arif-tanmoy commented 2 years ago

Hi, I faced the same issues with Bioperl. I solved it with the modification of the prokka script (added in a comment here). https://github.com/tseemann/prokka/issues/593#issuecomment-950135805

About the database issue, I faced it on a server too. Based on my experience, it happens when you are installing the program using conda: conda install -c conda-forge -c bioconda -c defaults prokka

Prokka looks for databases in two locations: 1) in $ENV and 2) the folder where prokka binary is. If you know perl well, have a look in the prokka script (line 238): $dbdir = $ENV{'PROKKA_DBDIR'} || abs_path("$FindBin::RealBin/../db");

I solved it by installing the whole thing using the Debian instructions. This will install the program in your $HOME. sudo apt-get install libdatetime-perl libxml-simple-perl libdigest-md5-perl git default-jre bioperl sudo cpan Bio::Perl git clone https://github.com/tseemann/prokka.git $HOME/prokka $HOME/prokka/bin/prokka --setupdb

Then, I saved the prokka location in a bash variable, for example - prokka=$HOME/prokka/bin/prokka This way, you can call the program $prokka instead of using prokka (try testing it by $prokka -h). All other options remain the same.

I work with the Ubuntu system btw. Good luck.