krakenuniq icon indicating copy to clipboard operation
krakenuniq copied to clipboard

Classify: unable to mmap: invalid argument

Open sanderdebacker opened this issue 2 years ago • 5 comments

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!

sanderdebacker avatar Nov 14 '22 09:11 sanderdebacker

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!

louis-mak0000 avatar Feb 09 '23 05:02 louis-mak0000

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. 

LilyAnderssonLee avatar Feb 23 '23 07:02 LilyAnderssonLee