[Biopython] pairwise2 and cpairwise2

Peter Cock p.j.a.cock at googlemail.com
Thu May 23 14:42:06 UTC 2013


On Thu, May 23, 2013 at 3:33 PM, Ivan Gregoretti <ivangreg at gmail.com> wrote:
> Hello Peter,
>
> I installed Biopython form biopython-1.61.tar.gz. No customisation, just
>
> python setup.py build
> python setup.py test
> sudo python setup.py install
>
> Is there a way to show that pairwise2 is not falling back to pure python?
> Alignment feels a bit slow in my machine.
>
> Thank you,
>
> Ivan

If the C version not available,

Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_45
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import pairwise2
>>> from Bio import cpairwise2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name cpairwise2

If the C version is installed, this should work:

Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import pairwise2
>>> from Bio import cpairwise2
>>> pairwise2.rint is cpairwise2.rint
True
>>> pairwise2._make_score_matrix_fast is cpairwise2._make_score_matrix_fast
True

Peter



More information about the Biopython mailing list