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

Initial implementation of bwapy #1

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open

Initial implementation of bwapy #1

wants to merge 47 commits into from

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Dec 13, 2024

This PR gets a minimal API for running bwa aln and bwa mem on single-ended (fragment) reads. Paired reads are not supported.

The motivation is to replace the usage of https://github.com/fulcrumgenomics/bwa-aln-interactive in https://github.com/fulcrumgenomics/prymer and elsewhere. We can then use pybwa along with latest supported release of bwa.

Improved documentation (e.g. additional examples, verbose docstrings), as well as test coverage are planned to be added at a later date. I did examine differences in alignments on a few SRA samples (see this gist), with only differences in bwa mem (as described in the docs) found.

Live docs in its current form can be found here: https://pybwa--1.org.readthedocs.build/en/1/. I used sphinx since I couldn't get mkdocs to play nicely with cython code.

Finally, I made a few design decisions I'd like to highlight for posterity. I split out the options for bwa into separate classes, for the use case where we want to align reads, examine alignments, loosen/update options, then re-align, and iterate.

The BwaAlnOptions requires that the options are changed via setting properties rather than directly in the constructor. It wouldn't be hard to add this functionality in a later PR. The same occurs for BwaMemOptions, but there's a required finalize method that needs to be called before it can be used with the aligner, which either the user can call, or the align method will call (with copy=True to copy rather than modifying in-place).

Copy link

codecov bot commented Dec 16, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@nh13 nh13 force-pushed the feat/init branch 3 times, most recently from 981057d to d526cbb Compare December 16, 2024 20:32
@nh13 nh13 marked this pull request as ready for review December 16, 2024 20:33
@nh13 nh13 closed this Dec 16, 2024
@nh13 nh13 reopened this Dec 16, 2024
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
docs/installation-and-developers-documentation.md Outdated Show resolved Hide resolved
bwapy/libbwapy_utils.c Outdated Show resolved Hide resolved
bwapy/libbwapy.pyx Outdated Show resolved Hide resolved
@tfenne tfenne self-requested a review December 16, 2024 23:08
@msto
Copy link

msto commented Dec 18, 2024 via email

@nh13 nh13 requested review from geoffjentry and msto January 10, 2025 20:28
* alternative to BwaMemOptions
@nh13 nh13 requested a review from emmcauley January 13, 2025 18:29
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.

4 participants