dnanexus-rnd / GLnexus

Scalable gVCF merging and joint variant calling for population sequencing projects
Apache License 2.0
145 stars 37 forks source link

Use const std::shared_ptr<const bcf_hdr_t>& in BCFData::dataset_range #188

Closed xunjieli closed 4 years ago

xunjieli commented 4 years ago

Pass hdr as a const std::shared_ptr reference will allow implementation to retain a ref count to the hdr pointer.

xunjieli commented 4 years ago

@mlin Hi Mike, WDYT? I have a BCFData implemented with a LRU cache. dataset_header() involves one lookup into the LRU cache (which caches the hdr and vcf file handle). My dataset_range() implementation involves getting the vcf file handle again, so it'd be very helpful if I can retain a refcount of the |hdr| param and put it with the vcf file handle in the same LRU cache.

xunjieli commented 4 years ago

Abandoning this. I've found a different approach.