-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic functionality to read indexed FASTA files (continued) #214
Conversation
To make the clippy errors go away and make this pull request work, I think you have to add Lines 1 to 9 in 61b0644
|
Hm, that one is actually there: https://github.com/landesfeind/rust-htslib/blob/faidx/hts-sys/wrapper.h#L10 Let's try with a merging of the master branch. |
You're right. Overlooked that, as well... But it still can't find the relevant structs and functions, weird. I guess merging in the master is always worth a try... |
Do the |
From looking at it, this does seem like the problem. Check out the new info at the end of the README.md section on Usage of rust-htslib. It's because using |
@landesfeind I will add updated bindings to include faidx stuff & send you a branch that you can merge into this. (I'll also include instructions for how to do the update). |
@landesfeind try merging my branch here into this branch -- that should fix build without bindgen. |
Hi @pmarks, that did the trick! Thanks a lot! Ready for merge, unless there are more ideas on code improvement :-) |
As requested by @brainstorm (see #214 (comment))
Internal C method faidx_fetch_seq64 uses i64 as type to index into large FASTA sequences. The fetch function now returns a byte array instead of a String to be more efficient. A new method was added to automatically convert to a String for convenience.
The return type of the faidx functions is changed to a Result capturing a potential failure in converting the usize into a i64 (hts_pos_t in the C API).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Manuel! Just the minor typo and we should be good to go IMHO.
@johanneskoester , seems that manual migrated to thiserror
now, any other comments on this one?
Thanks for your contribution @landesfeind 👏🏻 |
You are welcome - thank you all for the feedback! |
This pull request supersedes the #165 in using an own branch for easier integration. Most changes of @dlaehnemann (see #165 review) are incorporated.