refresh-bio / kmer-db

Kmer-db is a fast and memory-efficient tool for large-scale k-mer analyses (indexing, querying, estimating evolutionary relationships, etc.).
GNU General Public License v3.0
83 stars 17 forks source link

build step failed after throwing an instance of 'std::bad_alloc' #24

Open rmormando opened 9 months ago

rmormando commented 9 months ago

I am trying to build a kmer db using the k-mer output from KMC but I keep getting an error.

This is the command I am running:

./kmer-db build -from-kmers ./KMC.list ./output/KMC_out.db

Where the list looks like this:

Sample1
Sample2
Sample3
...

And the files in the directory are like this:

Sample1.kmc_pre
Sample1.kmc_suf
Sample2.kmc_pre
Sample2.kmc_suf
Sample3.kmc_pre
Sample3.kmc_suf
...

But I get this error when I try to run it:

Kmer-db version 1.11.1 (07.03.2023)
S. Deorowicz, A. Gudys, M. Dlugosz, M. Kokot, and A. Danek (c) 2018

Analysis started at Thu Dec 14 23:19:36 2023

Database building mode (from k-mers)
Processing samples...
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

Is there a quick fix for this?

agudys commented 5 months ago

Hello!

I will take a look on -from-kmers mode - maybe something got messed up in on of the last releases.

Best, Adam

jov131 commented 4 weeks ago

I got a similar error while running all2all module:

kmer-db all2all -t 4 samples_ct.txt ct_km25

Kmer-db version 1.11.1 (07.03.2023) All versus all comparison Loading k-mer database samples_ct.txt... terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)

The service is equipped with 40G RAM. Is there anyway to solve this problem?