blachlylab / dhtslib

D bindings and OOP wrappers for htslib
MIT License
7 stars 1 forks source link

SAMReader.query string overloads are 1-based not 0-based #49

Closed charlesgregory closed 4 years ago

charlesgregory commented 4 years ago

Any query methods/overloads that eventually use sam_itr_querys are 1-based queries as opposed to sam_itr_queryi which is 0-based. I think we should place a debug warning in this function warning a programmer that they are using a 1-based function. We should also probably transition most of our overloads to use the 0-based version as I feel that is the natural expectation of a bam query.

jblachly commented 4 years ago

@charlesgregory do you think this is sufficient

https://github.com/blachlylab/dhtslib/commit/d5ac54f6ab7de35af4ee1a7ef8c5a65c70bbf876

or do you really want debug warnings?

charlesgregory commented 4 years ago

No this should be sufficient.