8000 Reimplement the current alignment::Aligner without breaking API by TianyiShi2001 · Pull Request #379 · rust-bio/rust-bio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reimplement the current alignment::Aligner without breaking API #379

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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

TianyiShi2001
Copy link
Member

Faster global, local, semiglobal alignment with less space usage. Related to #354 and #355 (review).

All tests are unchanged and passed. No breaking changes. The API is completely unchanged.

Old(a1b1143):

test bench_aligner_wc_global     ... bench: 549,914,573 ns/iter (+/- 66,950,334)
test bench_aligner_wc_local      ... bench: 648,835,834 ns/iter (+/- 93,166,340)
test bench_aligner_wc_semiglobal ... bench: 622,027,993 ns/iter (+/- 43,517,887)

New:

test bench_aligner_wc_global     ... bench: 117,967,967 ns/iter (+/- 11,637,569)
test bench_aligner_wc_local      ... bench: 220,659,055 ns/iter (+/- 18,904,199)
test bench_aligner_wc_semiglobal ... bench: 152,071,703 ns/iter (+/- 11,597,219)

I didn't implement the "custom" alignment bacause it seemed not very useful. I haven't seen this type of alignment other than in SeqAn and rust-bio. Maybe this will be discussed in another issue.

@TianyiShi2001
Copy link
Member Author
TianyiShi2001 commented Oct 3, 2020

TODO

  • update docs
  • deprecation warning of with_capacity methods
  • bypass clippy warning with justification

@TianyiShi2001
Copy link
Member Author

This will partially fix #377

@TianyiShi2001
Copy link
Member Author

I want to deprecate with_capacity because the time taken to initialize a few vectors is almost negligible when compared to the alignment computation as a whole.

In addition, if the aligner first aligns large sequences and allocates a big capacity, and then aligns short sequences, there will be a significant waste of memory

ChallengeDev210 pushed a commit to ChallengeDev210/rust-bio that referenced this pull request Aug 1, 2022
@maxall41
Copy link

This is really great work! Has any progress been made on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0