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

Replace pairwise2 with PairwiseAligner #37

Merged

Conversation

Ulthran
Copy link
Contributor

@Ulthran Ulthran commented Oct 18, 2024

No description provided.

@Ulthran Ulthran linked an issue Oct 18, 2024 that may be closed by this pull request
@Ulthran
Copy link
Contributor Author

Ulthran commented Nov 19, 2024

Avoiding the weird alignment parsing seems impossible in the new Biopython. To get the sequences with dashes you have to call Alignment.format and it then has big complicated functions for iterating over the alignment and displaying it but it never exposes the exact strings we want. Checkout format_pretty and the clustal format_alignment for reference.

@kylebittinger
Copy link
Member

You should be able to use __getitem__ to access the aligned sequences. For example, if a is an alignment object, then a[0] and a[1] should give the aligned sequences as strings. See here in the docs for the Alignment class.

@kylebittinger kylebittinger merged commit 5909a47 into master Nov 21, 2024
7 checks passed
@kylebittinger kylebittinger deleted the 36-replace-biopairwise2-with-bioalignpairwisealigner branch November 21, 2024 15:46
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.

Replace Bio.pairwise2 with Bio.Align.PairwiseAligner
2 participants