gymreklab / chips

Simulation tool for ChIP- and other -seq experiments
GNU General Public License v3.0
12 stars 3 forks source link

map error running simreads #40

Closed avilella closed 5 years ago

avilella commented 5 years ago

See below, any ideas?


export LD_LIBRARY_PATH=$HOME/tulip-1.10.1/htslib/lib && $HOME/tulip-1.10.1/src/tulip simreads -f /home/dnanexus/Genomes/Homo_sapiens/NCBI/GRCh38Decoy/GRCh38Decoy.fa -p /home/dnanexus/CEGX_Run701/CEGX_Run701-12345678/CEG99_701_01PC-230652576/CEG99-701-01PC_S97_L00.bml.GRCh38.karyo.deduplicated.mqge1.redu.c.CEG99-701-01IC_S1_L00.bml.GRCh38.karyo.deduplicated.mqge1.redu.nm.e166.test.fbpe.macs2_peaks.narrowPeak -t bed -c 5 --model foo.json -o sim                                                                                                                               
[tulip-1.10.1] ProgressMeter: Running simulate with the following model
K: 6.06943 Theta: 15.49
f: 1.24449e-05
s: 0.104336
pcr rate: 1
[tulip-1.10.1] ProgressMeter: Loading the input ChIP-seq peak file (and BAM file if given)
[tulip-1.10.1] ProgressMeter: Simulating reads based on the input profile
terminate called after throwing an instance of 'std::out_of_range'
  what():  map::at
Aborted
Pandaman-Ryan commented 5 years ago

Hi,

Thank you for reporting this.

Do you mind sharing one or two lines of your bed file as an example? I just tested Tulip with the same parameters, but with my own bed file as below. Tulip seemed working as expected. The scores are at the 7th column, so I set "-c 7".

Here is a snapshot of my bed file: chr16 2033853 2034536 . 0 . 4134.43858711662 -1 3.9948594986723 337 chr17 80023569 80024183 . 0 . 1782.57228920476 -1 3.9948594986723 240 chr14 94425674 94426251 . 0 . 1532.02567737673 -1 3.9948594986723 267 chr7 4681376 4681959 . 0 . 1531.39262496533 -1 3.9948594986723 290

avilella commented 5 years ago

Could it be that using a reference with lots of small contigs (GRCh38Decoy) causes the crash? I tried with GRCh37 with only the chromosomal sequences, and it worked.

Pandaman-Ryan commented 5 years ago

Hi @avilella

We have fixed this bug. You can download the latest version from our github (https://github.com/gymreklab/tulip.git) and compile Tulip from its source code. We will include this update in our next tarball release as well.

Thank you so much for your input and advice.

Cheers,