jguhlin / minimap2-rs

Rust bindings to minimap2 library
Other
51 stars 11 forks source link

feat(htslib): initial implementation of htslib support #14

Closed eharr closed 1 year ago

eharr commented 1 year ago

Hi @jguhlin - the other pull request was getting a bit messy and I wasn't confident enough of my git skills to force-push. If you're okay with this new PR I can close the other one. Otherwise I'll try the force-push route.

There's now a doctest/example in the htslib.rs of the API.

The test suite takes all of the reads from the test_data/*.sam files and realigns them to compare the results. It seems to give the same results for all of them.

The one thing that doesn't seem to quite work is unmappable reads. The default behaviour of minimap for SAM output is to return a record for reads that don't map, but this doesn't seem to be the case here. I've worked around it by creating the the Record in rust and returning that.

I also couldn't get mm_write_sam3 to work which afaik means that all of the MMF* flags are ignored during the construction of the sam record. This is something I could revisit at a later point.

Btw - would it be possible to get a LICENSE added to the repo?

jguhlin commented 1 year ago

@eharr Everything is merged and I've closed the other one. License file added (to match with the Cargo.toml specified licenses).

eharr commented 1 year ago

Thank you!!

jguhlin commented 1 year ago

Yep, give me a day or two and I'll push out a new release, want to futz around with the SSE compilation some more.