deweylab / RSEM

RSEM: accurate quantification of gene and isoform expression from RNA-Seq data
http://deweylab.biostat.wisc.edu/rsem/
GNU General Public License v3.0
404 stars 117 forks source link

Assertion error in rsem-simulate-reads #75

Closed jenni-westoby closed 4 years ago

jenni-westoby commented 6 years ago

rsem-simulate-reads fails to complete the simulation with the error below:

rsem-simulate-reads: simul.h:30: int simul::sample(double*, int): Assertion `l < len' failed.

The error can be reproduced using the code below and the files in the Dropbox link (https://www.dropbox.com/sh/yeklszq4a5nkbbt/AACAGkQAOB7HdWmZI7BUPLr1a?dl=0).

reads=7512
background_noise=0.328043282265198

rsem-simulate-reads ref/reference CACGGTTAAGTA.fastq.model \
                       CACGGTTAAGTA.fastq.isoforms.results $background_noise $reads output \
                       --seed 0

My OS is Ubuntu 12.04.5. I installed RSEM using the commands below:

wget https://github.com/deweylab/RSEM/archive/v1.3.0.tar.gz
tar -xvzf v1.3.0.tar.gz
rm v1.3.0.tar.gz
cd RSEM-1.3.0
make
make install prefix=.   #installed locally due to lack of root access

I'm not a C++ programmer, but I had a quick look in simul.h and noticed the following comment:

    // interval : [,)
    // random number should be in [0, arr[len - 1])
    // If by chance arr[len - 1] == 0.0, one possibility is to sample uniformly from 0 ... len - 1

As far as I can tell, the second part (if arr[len-1] == 0.0) is not implemented in the code that follows. Perhaps this is what is causing the error?

Thank you for your help in advance!

kmnip commented 4 years ago

I have the same problem with rsem-simulate-reads. If this could be fixed, then that would be great.

bli25 commented 4 years ago

@kmnip @jenni-westoby , I fixed this bug in RSEM v1.3.3. https://github.com/deweylab/RSEM/releases/tag/v1.3.3