feat: popgen-htslib crate - #216
Conversation
|
@laggycomputer -- it has struck me that we don't need to return a Vec for the "record adapter". We could instead return an opaque type that implements Iterator<Item = Option>. I bet we could get the lifetimes worked out? |
|
I'll look at the iterator later today. |
|
I can take a crack at it on Monday. Getting tests to work via tempfiles to make the htstlib readers happy fried my Friday brain. |
|
misisng_docs is now failing, but no rush. |
|
yeah -- I want to totally replace the allocating implementation with one based on Iterator. |
|
oh boy -- existing tests were also passing even though there was a bug in the crate code! |
|
I hit a road block on the iterator business. There's a lot of borrowing and flattening that would have to happen. Internally, htslib is allocating into Vec at various points but not providing IntoIter impls. It made for a bit of a nightmare. |
|
hmmm -- there is probably some way to get it to go by holding another internal index and using .skip(i).take(1) to get specific alleles. I'd have to study the htslib internals a bit more closely to see if that would be O(1) or not. |
cf0c4d4 to
abe26f6
Compare
|
@laggycomputer -- there are a handful of issues here
|
|
(The reason a genotypes iter is a good thing is that combining it with |
laggycomputer
left a comment
There was a problem hiding this comment.
We might want a note here for why we're not using safe Rust-level htslib
e6f5473 to
cb111d4
Compare
cb111d4 to
152d8f1
Compare
No description provided.