haowenz / chromap

Fast alignment and preprocessing of chromatin profiles
https://haowenz.github.io/chromap/
MIT License
192 stars 21 forks source link

core dumped with some samples #46

Open plger opened 2 years ago

plger commented 2 years ago

Hi, Thanks for the great software. I've been running chromap (-preset atac -t 8, otherwise default params) on a lot of samples from the literature, but I'm getting 'core dumped' errors on a small fraction of them, happening right after the "Loaded index successfully" message (hence seems different from #37 ). One such example is the run SRR4269915 from the SRA (the read length is not uniform across reads in this sample).

When I use the version installed from conda (0.1.3-r256), the error I get is:

25736 Aborted                 (core dumped)
free(): invalid pointer

When I use the version from the repo (0.1.3-r257; self-built), the error I get is at the same spot but slightly different:

25569 Aborted                 (core dumped)
chromap: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

I thought maybe there was something wrong with the fastq files, but I tried aligned with bowtie2 and everything went smoothly. The index was created with default params and works fine for most samples. (Running on ubuntu 18.04)

haowenz commented 2 years ago

Thanks for trying out and providing all the information for us to debug this! We were able to reproduce the error. We didn't perform many tests on this kind of input. Hopefully, we will locate and fix this issue soon.

haowenz commented 2 years ago

The issue is caused by adapter trimming in this case. Since the adapters already have been trimmed for this dataset, the lengths of reads are various. This caused some problem for the fixed seed length used in adapter trimming. This should be able to resolved by using Chromap with trimming adapters turned off (you cannot use the preset parameters as it always turns on the adapter trimming step). I will also generate a fix for this issue soon.

zhangwenda0518 commented 2 years ago

Good news, my data has successfully run in the new version,chromap-0.2.0-no-cache_x64-linux.tar.bz2

haowenz commented 2 years ago

Sorry for the long wait. This issue is now fixed in v0.2.2. Feel free to try the new version.