-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
BiopythonDeprecationWarning in Bio.pairwise2 #4671
Comments
If you can write the sequences as SeqA = ["FE", "TE", ...]
SeqB = ["FE", "TE", ...] then define your alphabet as >>> alphabet = ("EE", "FE", "TE", ...) Create a substitution matrix and fill it >>> from Bio.Align import substitution_matrices
>>> a = substitution_matrices.Array(alphabet, dims=2)
>>> for key1 in alphabet:
... for key2 in alphabet:
... a[key1+key2] = yourfunction(key1, key2) Create the aligner and set its substitution matrix to the substitution matrix you just created: >>> from Bio.Align import PairwiseAligner
>>> aligner = PairwiseAligner()
>>> aligner.substitution_matrix = a and align: >>> alignments = aligner.align(["EE", "EF", "FF"], ["EE", "FF"])
>>> alignment = next(alignments)
>>> print(alignment)
EE EF FF
|| -- ||
EE -- FF |
That's a really cool implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I've been trying to resolve this deprecation by using the Bio.Align.PairwiseAligner module but have not been able to do so.
We use a python function to determine the alignment score in order to align tuples of sequence and secondary structure:
As an example:
SeqA = [('F', 'E'), ('T', 'E'), ...]
SeqB = [('F', 'E'), ('T', 'E'), ...]
How can I use a custom python function to determine the score between such tuples using Bio.Align.PairwiseAligner?
Thank you
The text was updated successfully, but these errors were encountered: