andreas-wilm / lofreq3

LoFreq Version 3
MIT License
27 stars 0 forks source link

SRR3924583 fails somewhere with IndexDefect #30

Open andreas-wilm opened 3 years ago

andreas-wilm commented 3 years ago

Error: unhandled exception: index 816394 not in 0 .. 816393 [IndexDefect]

reffa=../../refs/NC_000912_Mpneumoniae.fasta
fq1=../../mycoplasma_diaz_2017_SRR3924583/SRR3924583_1.fastq.gz
fq2=../../mycoplasma_diaz_2017_SRR3924583/SRR3924583_2.fastq.gz
obam=SRR3924583.lf3.bam;
bwa mem -t 8 $reffa  $fq1 $fq2 |   samtools fixmate - - |   lofreq viterbi -f $reffa -b - |   samtools sort - |   lofreq indelqual -f $reffa -b - |   lofreq alnqual -f $reffa  -b - |   samtools view -b - -o $obam;
...
[M::mem_process_seqs] Processed 393624 reads in 54.487 CPU sec, 7.883 real sec
[M::process] read 393840 sequences (80000434 bp)...
fatal.nim(49)            sysFatal
Error: unhandled exception: index 816394 not in 0 .. 816393 [IndexDefect]
[bam_sort_core] merging from 7 files and 1 in-memory blocks...
andreas-wilm commented 3 years ago

Looks like it's viterbi:

bwa mem -t 8 $reffa  $fq1 $fq2 |   samtools fixmate - - |   lofreq viterbi -f $reffa -b - |   samtools sort - -o SRR3924583.fm.vit.srt.bam;

Already fails with

[M::process] read 393840 sequences (80000434 bp)...
fatal.nim(49)            sysFatal
Error: unhandled exception: index 816394 not in 0 .. 816393 [IndexDefect]
[bam_sort_core] merging from 7 files and 1 in-memory blocks...

Producing only SRR3924583.fm.bam for now

andreas-wilm commented 3 years ago

Offending sequence is SRR3924583.6445264. See lofreq viterbi -f $reffa -b narrowddown.bam. Sequence starts at 816,196 with cigar of 165M1D33M53S and according to mpileup ends on 816,394. Ref has 816,394 bases according to fai.

Does LoFreq try to fetch the soft clip?

andreas-wilm commented 3 years ago
nimble build --lineDir:on --debuginfo` and `gdb lofreq` to give debug binary

set args viterbi -f /data/refs/NC_000912_Mpneumoniae.fasta -b narrowddown.bam

/home/ubuntu/.nimble/pkgs/cligen-1.4.0/cligen.nim(672) dispatchviterbi
/home/ubuntu/lofreq3.git/src/lofreqpkg/viterbi.nim(218) viterbi
/home/ubuntu/lofreq3.git/src/lofreqpkg/viterbi.nim(60) getRefContext
/home/ubuntu/.choosenim/toolchains/nim-1.4.2/lib/system.nim(2496) []