The documentation in htslib/hts.h of the multi-iterator functionality is minimal, so it is unclear how to use it and when exactly to use it rather than the existing hts_itr_t.
What is the reason for there to be a separate hts_itr_multi_t and a separate bunch of API functions for dealing with it? Is the functionality of hts_itr_t now a subset of that of hts_itr_multi_t, or does each flavour have things that the other can't do? I note that samtools/sam_view.c appears to have separate code for one region and multiple regions, which does not seem ideal.
Is the reason for the new separate hts_itr_multi_t struct simply a question of binary ABI compatibility and not wanting to add fields to the existing hts_itr_t?
If so, as HTSlib is currently in an ABI-breaking mode, it would be possible to unify the two forms of iterator by renaming hts_itr_multi_t to hts_itr_t, making hts_itr_multi_t a typedef alias of it, and adjusting the API function implementations accordingly, adding hts_itr_multi_next()/etc compatibility wrappers in htslib/hts.h as necessary.
Is this on the roadmap for the ABI-breaking HTSlib release?
The documentation in htslib/hts.h of the multi-iterator functionality is minimal, so it is unclear how to use it and when exactly to use it rather than the existing
hts_itr_t.What is the reason for there to be a separate
hts_itr_multi_tand a separate bunch of API functions for dealing with it? Is the functionality ofhts_itr_tnow a subset of that ofhts_itr_multi_t, or does each flavour have things that the other can't do? I note that samtools/sam_view.c appears to have separate code for one region and multiple regions, which does not seem ideal.Is the reason for the new separate
hts_itr_multi_tstruct simply a question of binary ABI compatibility and not wanting to add fields to the existinghts_itr_t?If so, as HTSlib is currently in an ABI-breaking mode, it would be possible to unify the two forms of iterator by renaming
hts_itr_multi_ttohts_itr_t, makinghts_itr_multi_ta typedef alias of it, and adjusting the API function implementations accordingly, addinghts_itr_multi_next()/etc compatibility wrappers in htslib/hts.h as necessary.Is this on the roadmap for the ABI-breaking HTSlib release?