fbreitwieser / krakenuniq

🐙 KrakenUniq: Metagenomics classifier with unique k-mer counting for more specific results
GNU General Public License v3.0
222 stars 44 forks source link

Classify: unable to mmap: invalid argument #120

Open sanderdebacker opened 1 year ago

sanderdebacker commented 1 year ago

With the following command: krakenuniq --db /mnt/f/KrakenUniq --threads 3 --output /mnt/f/SAMPLE.krakenuniq --preload-size 7G SAMPLE.fastq.gz

I get this output and error: /home/visitor/bin/krakenuniq/classify -d /mnt/f/KrakenUniq/database.kdb -i /mnt/f/KrakenUniq/database.idx -t 3 -o /mnt/f/SAMPLE.krakenuniq -x 7G -a /mnt/f/KrakenUniq/taxDB -p 12 Database /mnt/f/KrakenUniq/database.kdb classify: unable to mmap /mnt/f/KrakenUniq/database.kdb: Invalid argument

The directory KrakenUniq contains the database.kdb file as well as all the kmer_distrib files, database.kdb.counts, database.idx, and taxDB. These were donwloaded from https://benlangmead.github.io/aws-indexes/k2 as the main page suggests.

krakenuniq version = v1.0.2

Anyone encountered this before and knows why the database.kdb file is invalid?

Cheers!

louis-mak0000 commented 1 year ago

I have the exact same issue. I tried with reducing preload size with no luck. Anyone figured out? Thanks!

Command:

$ krakenuniq --db DBDIR --thread 1 --report-file REPORTFILE.tsv --preload-size 200M sample.fastq.gz

Output:

Warning: Overwriting REPORTFILE.tsv.
/home/biouser/miniconda3/envs/bioinfo/libexec/classify -d ./DBDIR/database.kdb -i ./DBDIR/database.idx -x 200M -r REPORTFILE.tsv -a ./DBDIR/taxDB -p 12
 Database ./DBDIR/database.kdb
classify: unable to mmap ./DBDIR/database.kdb: Invalid argument

With the following command: krakenuniq --db /mnt/f/KrakenUniq --threads 3 --output /mnt/f/SAMPLE.krakenuniq --preload-size 7G SAMPLE.fastq.gz

I get this output and error: /home/visitor/bin/krakenuniq/classify -d /mnt/f/KrakenUniq/database.kdb -i /mnt/f/KrakenUniq/database.idx -t 3 -o /mnt/f/SAMPLE.krakenuniq -x 7G -a /mnt/f/KrakenUniq/taxDB -p 12 Database /mnt/f/KrakenUniq/database.kdb classify: unable to mmap /mnt/f/KrakenUniq/database.kdb: Invalid argument

The directory KrakenUniq contains the database.kdb file as well as all the kmer_distrib files, database.kdb.counts, database.idx, and taxDB. These were donwloaded from https://benlangmead.github.io/aws-indexes/k2 as the main page suggests.

krakenuniq version = v1.0.2

Anyone encountered this before and knows why the database.kdb file is invalid?

Cheers!

LilyAnderssonLee commented 1 year ago

The same error happened to me by using the standard krakenuniq database and --preload-size 500M. But the error disappears when using a 20 times smaller database.   So I suspect that --preload-size didn't really play a role in solving the limited memory issue. 

Krupa-17 commented 1 week ago

Hello - did you manage to solve this? I am currently having the same issue

sanderdebacker commented 1 week ago

Hello - did you manage to solve this? I am currently having the same issue

No, and since I haven't received any support here, I've moved on to other tools that have a more responsive community (Centrifuge for example).

salzberg commented 1 week ago

This appears to have something to do with either your available RAM or your available disk space. I wish we had a support team, but we don't. @sanderdebacker, if you understood the challenges of supporting a tool with 1000s of users when the original developers (Derrick Wood, Florian Breitwieser) left my lab many years ago, and when NIH doesn't provide funds for ongoing support of software, perhaps you'd be a little less harsh.