samtools: Numerical result out of range
1
0
Entering edit mode
3.1 years ago
Gregor Rot ▴ 540

I am working with a SAM file (created with hisat2) with header:

@SQ     SN:chr1A        LN:594006513
@SQ     SN:chr1B        LN:693261537
...

When doing sorting and indexing, I get this error with samtools:

[E::hts_idx_check_range] Region 536907741..536907892 cannot be stored in a bai index. Try using a csi index with min_shift = 14, n_lvls >= 6
[E::sam_index] Read 'read_id' with ref_name='chr1A', ref_length=594006513, flags=16, pos=536907742 cannot be indexed
samtools index: failed to create index for "test.bam": Numerical result out of range

However the read falls inside the chr1A ref sequence. Any ideas why this happens? Thanks

samtools • 2.4k views
ADD COMMENT
2
Entering edit mode
3.1 years ago

you cannot use a BAI index for a reference length > 512Mb in length. see samtools 1.0 'index' : CSI index vs BAI index ?

ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2461 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6