rust-bio / rust-bio

This library provides implementations of many algorithms and data structures that are useful for bioinformatics. All provided implementations are rigorously tested via continuous integration.
https://rust-bio.github.io
MIT License
1.58k stars 204 forks source link

Aligner does not align the reverse complement? [question] #234

Open sjackman opened 5 years ago

sjackman commented 5 years ago

Firstly, thank you for rust-bio! I'm a new user, and enjoying it. I just want to confirm that bio::alignment::pairwise::Aligner does not also align the reverse complement. Is there an aligner in rust-bio that does? The workaround is straight forward enough of course: reverse complement one of the two sequences and repeat the alignment, and keep the one with the better alignment score. It seems like a common operation though, that could benefit from a function (if it doesn't already exist).

johanneskoester commented 4 years ago

Hi, indeed, it does not do that by default and your solution is what we had in mind when designing the API. If you want to contribute a more streamlined alternative way of doing both, this would of course be very welcome.

sjackman commented 4 years ago

Okay. It's something that I'll work on right now, but I'll keep it in mind, the next time that I run into this issue.