--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
getBin() computes the .bai BAM index bin number, which is what limits chromosomes in .bai indices to 2^29 (~0.5 billion) bases. So the error here is because your region's coordinates are larger than that.
I guess bedtools is using the binning to speed up the intersect here. If just the < 37450 test were relaxed, I think this would work -- except that the binning would provide no speedup for regions beyond 2^29 as all intervals beyond there would lie in the smallest bottom-row bins.
To fix this, the binning algorithm used could be changed to a CSI-style one with parameters that allow it to be useful for the whole range of unsigned 32-bit chromosome lengths and still work well for shorter human-sized (2^29) chromosomes. Or the parameters could be chosen adaptively depending on each chromosome's length. This is a somewhat non-trivial engineering problem that we're still grappling with in htslib and samtools too…
../bedtools2/bin/bedtools intersect -a CTCF_opossum.bed -b monDom5.rmsk -wo
ERROR: Received illegal bin number 37450 from getBin call.
ERROR: Unable to add record to tree.
I tried both :
bedtools v2.24.0
bedtools v2.21.0
The opossum genome has large chromosomes (>0.5 Billion), with chr1 at 0.7 billion.
chrom size
chr1 748055161
chr2 541556283
chr3 527952102
chr4 435153693
chr8 312544902
chr5 304825324
chr6 292091736
chr7 260857928
chrUn 103241611
chrX 79335909
chrM 17079
This is just to report similar error (hopefully it just happens for opossum at the moment)
Thanks,