Hi, I am using htslib in some of the tools I write, and I am wondering if its safe to memcpy the hts_itr_t struct to be able to use it multiple times (on the same bam file, with the exact same region queried)? I am using the iterator through sam_itr_next() (i.e. hts_itr_next()), and from what I can see, the pointers within hts_itr_t do not get touched in the process. Would it be safe then to memcpy an allocated hts_itr_t struct so that the changes to the 'finished' bit as well as the 'curr_xxx' variables only occur in the copied struct rather than the source? Or is it necessary to destroy the struct and reload it for reuse?
Thanks! clw ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help