Skip to content
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 #165

Closed
wants to merge 11 commits into from
Closed

Add basic functionality to read indexed FASTA files #165

wants to merge 11 commits into from

Conversation

landesfeind
Copy link
Contributor

@landesfeind landesfeind commented Nov 6, 2019

Hi,
this pull request adds basic FAIDX functionality. Importantly, not all functions are supported/wrapped but enough for my use case.

I tried to follow your coding conventions but please don't hesitate to point out anything which can be improved.

Best,
Manuel

@brainstorm brainstorm requested a review from dlaehnemann June 5, 2020 05:32
Copy link
Member

@dlaehnemann dlaehnemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brainstorm requested a review, so here it comes. Let me know, if I should have another look.

src/faidx/errors.rs Show resolved Hide resolved
src/faidx/mod.rs Show resolved Hide resolved
src/faidx/mod.rs Show resolved Hide resolved
src/faidx/mod.rs Show resolved Hide resolved
src/faidx/mod.rs Show resolved Hide resolved
@landesfeind
Copy link
Contributor Author

Dear @dlaehnemann, thank you very much for the review!
Since this pull request was generated quite a while ago and a lot of changes were introduced in the master, I cherry picked this pull-request into a separate branch and generate a new pull request. This makes further improvement easier. The superseding pull request is #214

brainstorm added a commit that referenced this pull request Aug 4, 2020
* Cherry pick the pull request for faidx

#165 (review)

* Cargo formatting

* Update faidx documentation for clarification

* Implement faidx_open test

* Run actions on faidx branch

* Remove faidx from github actions

* Activate CI for faidx branch

* update osx bindings with faidx support

* update linux bindings for faidx

* Drop faidx branch from CI actions

As requested by @brainstorm (see #214 (comment))

* Migrate faidx to use thiserror instead of snafu (#214 (comment))

* Use i64 in faidx and return byte array

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.

* Formatting using cargo fmt

* Use usize-type for position paramter in faidx

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).

* Correct typo in faidx-error: to -> too

Co-authored-by: Patrick Marks <[email protected]>
Co-authored-by: Patrick Marks <[email protected]>
Co-authored-by: Roman Valls Guimera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants