JensUweUlrich / ReadBouncer

Fast and scalable nanopore adaptive sampling
GNU General Public License v3.0
33 stars 2 forks source link

1.2.0 - getting core dump on classify test #51

Closed matthewlinks closed 2 years ago

matthewlinks commented 2 years ago

I'm trying to check that my install is working by working through some of the examples in the readme.

When trying to get the classify example to work I'm running into a problem after the filters are built and it tries to start classifying.

User@server:~/readbouncer/29Aug2022/1.2.0/ReadBouncer-1.2.0-Linux/bin$ ./ReadBouncer --config ~/readbouncer/conf/classify_example.toml
IBF-build processed 2 sequences (8.09135 Mbp) in 0.194196 seconds (0.617932 Kseq/m, 2499.95 Mbp/m)
 - 2 sequences in 82 bins were written to the IBF
IBF-build processed 2 sequences (5.69078 Mbp) in 0.0590251 seconds (2.03303 Kseq/m, 5784.77 Mbp/m)
 - 2 sequences in 29 bins were written to the IBF
IBF-build processed 4 sequences (9.75088 Mbp) in 0.0994459 seconds (2.41337 Kseq/m, 5883.13 Mbp/m)
 - 4 sequences in 52 bins were written to the IBF
IBF-build processed 102 sequences (25.6866 Mbp) in 0.82183 seconds (7.4468 Kseq/m, 1875.32 Mbp/m)
 - 102 sequences in 318 bins were written to the IBF

Classification results of: /home/User/readbouncer/data/SampleZMCDataSet.fasta

free(): invalid size
Aborted (core dumped)

My toml

usage               = "classify"
output_directory    = '/home/User/readbouncer/data/classify_example/output'
log_directory       = '/home/User/readbouncer/data/classify_example/log'

[IBF]

kmer_size     = 13
fragment_size = 100000
threads       = 3
target_files  = ['/home/User/readbouncer/data/Zymo-Refs/Bacillus_subtilis_complete_genome.fasta', '/home/User/readbouncer/data/Zymo-Refs/Enterococcus_faecalis_complete_genome.fasta', '/home/User/readbouncer/data/Zymo-Refs/Escherichia_coli_complete_genome.fasta']
deplete_files = ['/home/User/readbouncer/data/Zymo-Refs/Saccharomyces_cerevisiae_draft_genome.fasta']
read_files    = ['/home/User/readbouncer/data/SampleZMCDataSet.fasta']
exp_seq_error_rate = 0.1

InterleavedBloomFilterLog.txt shows info messages about successfully storing IBF to file.

When I check output_directory the .ibf files are created and non-zero. The _classified.fasta and unclassified.fasta are 0 as per the issue.

configLog.toml ends with

[classify]
chunk_length = 250
max_chunks = 5
exp_seq_error_rate = 0.10000000000000001
fragment-size = 100000
threads = 3
kmer-size = 13
read_files = ["/home/User/readbouncer/data/SampleZMCDataSet.fasta"]
deplete_files = [
"""
/home/User/readbouncer/data/Zymo-Refs/Saccharomyces_cerevisia\
e_draft_genome.fasta\
""",
]
target_files = [
"""
/home/User/readbouncer/data/Zymo-Refs/Bacillus_subtilis_comple\
te_genome.fasta\
""",
"""
/home/User/readbouncer/data/Zymo-Refs/Enterococcus_faecalis_co\
mplete_genome.fasta\
""",
"""
/home/User/readbouncer/data/Zymo-Refs/Escherichia_coli_complet\
e_genome.fasta\
""",
]

Any guidance?

thanks

JensUweUlrich commented 2 years ago

Hi @matthewlinks

I'm actually looking into the code and try to figure out what the issue is. I could reproduce the error on Linux, but as far as I can see, it only occurs when using "classify". The "target" usage for adaptive sampling seems to be unaffected.

merfre commented 1 year ago

Hello @JensUweUlrich

Sorry for another message, I am just having the same error when doing a playback run despite updating to version 1.2.1:

sudo /home/merfre/ReadBouncer/build/ReadBouncer-1.2.1-Linux/bin/ReadBouncer --config ./test2_config.toml

709 bins were loaded in 0.122398 seconds from the IBF 28831 bins were loaded in 4.1305 seconds from the IBF Trying to connect to MinKNOW Host : 127.0.0.1 Port : 9502 Connecting to MinKNOW using the token: 7e068aa2-88e7-472c-b039-9c024443678b Connection successfully established! Waiting for device to start sequencing! Please start the sequencing run now! Sequencing has begun. Starting live signal processing! Connecting to Guppy basecall server on address : localhost:5555 Start receiving live signals thread Start basecalling thread Start read classification thread Start sending unblock messages thread free(): invalid size Aborted

I am using the same basecalling set up that we previously messaged about in #40 .

Thank you for all the help

JensUweUlrich commented 1 year ago

@merfre

It seems that you built ReadBouncer on your system. I guess you need to delete the whole build directory and repeat the entire build process. If you want to avoid that, you can also download pre-built binaries for Linux x64 and start immediately.

merfre commented 1 year ago

@JensUweUlrich

I tried that again (deleted the entire readbouncer directory and compiled using the instructions on the readme) and got the same error:

sudo /home/merfre/ReadBouncer/build/bin/ReadBouncer --config ./test2_config.toml

709 bins were loaded in 0.106683 seconds from the IBF 28831 bins were loaded in 4.89535 seconds from the IBF Trying to connect to MinKNOW Host : 127.0.0.1 Port : 9502 Connecting to MinKNOW using the token: b3050d0b-f996-4b92-abdc-bd4e1de3aa0f Connection successfully established! Waiting for device to start sequencing! Please start the sequencing run now! Sequencing has begun. Starting live signal processing! Connecting to Guppy basecall server on address : localhost:5555 Start receiving live signals thread Start basecalling thread Start read classification thread Start sending unblock messages thread munmap_chunk(): invalid pointer Aborted

I then tried with the pre-built binaries for my system and had the same error occur:

sudo /home/merfre/Downloads/ReadBouncer-1.2.1-Linux_x64/ReadBouncer-1.2.1-Linux/bin/ReadBouncer --config ./test2_config.toml

709 bins were loaded in 0.123347 seconds from the IBF 28831 bins were loaded in 4.58021 seconds from the IBF Trying to connect to MinKNOW Host : 127.0.0.1 Port : 9502 Connecting to MinKNOW using the token: b3050d0b-f996-4b92-abdc-bd4e1de3aa0f Connection successfully established! Waiting for device to start sequencing! Please start the sequencing run now! Sequencing has begun. Starting live signal processing! Connecting to Guppy basecall server on address : localhost:5555 Start receiving live signals thread Start basecalling thread Start read classification thread Start sending unblock messages thread munmap_chunk(): invalid pointer Aborted

JensUweUlrich commented 1 year ago

That's strange. Could you delete and rebuild the IBF index files with version 1.2.1. Maybe the files have been corrupted while saving using the version 1.2.0.