fhcrc / seqmagick

An imagemagick-like frontend to Biopython SeqIO
http://seqmagick.readthedocs.org
GNU General Public License v3.0
112 stars 22 forks source link

Bio.pairwise2 will be deprecated #96

Closed lukaszsobala closed 1 year ago

lukaszsobala commented 1 year ago

Hello,

My software versions are:

When I run any command involving seqmagick, I get the following warning:

[conda_dir]/lib/python3.10/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module. warnings.warn(

Any chance of changing this for forward compatibility?

Thanks

jgallowa07 commented 1 year ago

Hello @lukaszsobala - thanks for pointing this out! Do you have a good idea about how Bio.Align.PairwiseAligner would be used in place of the Bio.pairwise2 module? I believe the issue is only in this function

I'd happily oversee / review a PR. Otherwise, we'll do our best to get this in the near future.

lukaszsobala commented 1 year ago

To be honest, I am not much of a programmer and I don't know a great deal about how your software works at the back end, so as much as I'd like to help out by creating a PR, I can't promise anything...

lukaszsobala commented 1 year ago

This looks solved now, I updated my seqmagick from mamba and it stopped shouting at me.

Thank you!

eduamf commented 1 year ago

I like to use Bio.pairwise2 in NLP. Is there an equivalent way to do this:

def gen_pop(word1, word2, chars):
    # first step
    alignments = pairwise2.align.globalms(word1, word2, 1, -0.5, -0.5, -0.5)
    print(format_alignment(*alignments[0]))

using Bio.Align?