NCGG-MGC / IMSindel

IMSindel: An accurate intermediate-size indel detection tool incorporating de novo assembly and gapped global-local alignment with split read analysis
https://www.nature.com/articles/s41598-018-23978-z
MIT License
15 stars 0 forks source link

pairwise_consensus.rb:65:in `*': negative argument (ArgumentError) #10

Closed guillaumecharbonnier closed 4 years ago

guillaumecharbonnier commented 4 years ago

Hi, I have tried IMSindel for the first time on three samples. One of them fails with the errors below. Here is the link to download the files to reproduce the issue (expire 2020-01-01): https://filesender.renater.fr/?s=download&token=f93af986-5d61-2980-1120-4f76f32ea1db The bam file was produced using default bwa-mem like my other working samples.

$ sudo docker run --rm -v ~/IMSindel/data:/data imsindel --bam /data/Jurkat_SRR1509753_H3K27ac.bam --chr 1 --outd /data --indelsize 10000 --reffa /data/Homo_sapiens.GRCh38.dna_sm.chromosome.1.fa
[sudo] password for gcharbonnier: 
>Parameters:
Avg. base quality:      20
Maping quality: 20
Read group:     within 3bp
paired B and F: within 5bp
Support reads for making consensus sequence:    3
mimimum clipping fragment base: 5bp
support clip length:    5bp
bam:    /data/Jurkat_SRR1509753_H3K27ac.bam
chr:    1
outd:   /data
indelsize:      10000
reffa:  /data/Homo_sapiens.GRCh38.dna_sm.chromosome.1.fa
glsearch:       glsearch36
glsearch mat:   /opt/IMSindel/lib/../data/mydna.mat
mafft:  mafft
samtools:       samtools
temp:   /dev/shm
thread: 2
exclude-region:

>1. collecting indel related reads...
samtools view -F 1024 -f 2 /data/Jurkat_SRR1509753_H3K27ac.bam 1
#backward_clips:        37643
#forward_clips: 36006
#non_clips:     12281
>1. collecting indel related reads...done
>2. collecting unmapped reads...
samtools view -F 1024 -f 8 /data/Jurkat_SRR1509753_H3K27ac.bam 1
mate_unmapped_read_names: 0
samtools view -F 1024 -f 4 /data/Jurkat_SRR1509753_H3K27ac.bam 1
Insert size
Avg:    147.0096557302462
SD:     22.614548027900266
#unmapped reads:        0
>2. collecting unmapped reads...done
>3. considering support reads...
#backward clip with support reads:      667
#forward clip with support reads:       644
#non_clips with suport reads:   297
>3. considering support reads...done
>4. making consensus seqs from support reads...
#backward clip with consensus:  667 --> 659
#forward clip with consensus:   644 --> 637
#shot indel with consensus:     297 --> 56
>4. making consensus seqs from support reads...done
>5. making consensus seq from B and F..
^[[Amaking consensus seq for long deletion...done
>6. detection of indels...
#paired long indel candidates:  1180
#unpaired long indel candidates:        98
#short indel candidates:        56
*** error [wm_align.c:510] - check_score error. -40 != -60 ***
*** error [wm_align.c:510] - check_score error. -40 != -60 ***
....... SAME ERROR HERE REPEATED MULTIPLE TIMES ........
*** error [wm_align.c:510] - check_score error. -40 != -60 ***
*** error [wm_align.c:510] - check_score error. -40 != -60 ***
/opt/IMSindel/lib/ims_indel/pairwise_consensus.rb:65:in `*': negative argument (ArgumentError)
        from /opt/IMSindel/lib/ims_indel/pairwise_consensus.rb:65:in `make_consensus'
        from /opt/IMSindel/lib/ims_indel/indel_detector.rb:96:in `block in detect_indels'
        from /opt/IMSindel/lib/ims_indel/indel_detector.rb:62:in `each'
        from /opt/IMSindel/lib/ims_indel/indel_detector.rb:62:in `each_with_index'
        from /opt/IMSindel/lib/ims_indel/indel_detector.rb:62:in `detect_indels'
        from /opt/IMSindel/lib/ims_indel/indel_detector.rb:15:in `indel_call'
        from /opt/IMSindel/lib/ims_indel.rb:108:in `run_detect_indels'
        from /opt/IMSindel/lib/ims_indel.rb:34:in `run'
        from /opt/IMSindel/bin/imsindel:44:in `<main>'
holrock commented 4 years ago

Thank you for report. We'll check your files soon.

holrock commented 4 years ago

I fixed the error. Could you test the new version?

guillaumecharbonnier commented 4 years ago

Thanks, your fix solved the issue. I have made a conda package for IMSindel: https://anaconda.org/guillaumecharbonnier/imsindel If you tag a git release I can submit the package to bioconda to reach a wider audience.

holrock commented 4 years ago

Thanks! I added tag .

guillaumecharbonnier commented 4 years ago

Thanks, could you also add a license allowing redistribution for the repository?

holrock commented 4 years ago

Sorry for late response. We added licence(MIT) file.

guillaumecharbonnier commented 4 years ago

Thanks, IMSindel is now available in Bioconda: https://anaconda.org/bioconda/imsindel