faircloth-lab/tapir

tapir test ends up with errors

Closed this issue · 3 comments

Dear Prof. Faircloth

I am trying to use tapir to get profiles from thousands of loci alignments. After successfully installing all tapir requirements, I get the following error message while executing tapir.test() in python2.7 (please see below). Do you know perhaps how can I fix this?

Many thanks!

Best wishes,

Oscar


Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import tapir
tapir.test()
Running unit tests for tapir.tests
NumPy version 1.11.0
NumPy relaxed strides checking option: False
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy
Python version 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
nose version 1.3.7
........EEE......
======================================================================
ERROR: test_cull_informative_rates (tapir.tests.test_compute.TestInformativenessCutoff)


Traceback (most recent call last):
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/tests/test_compute.py", line 117, in test_cull_informative_rates
self.threshold)[:100]
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/compute.py", line 102, in get_informative_sites
for cells in taxa.sequences():
AttributeError: 'DnaCharacterMatrix' object has no attribute 'sequences'

======================================================================
ERROR: test_full_informativeness_cutoff (tapir.tests.test_compute.TestInformativenessCutoff)

Traceback (most recent call last):
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/tests/test_compute.py", line 107, in test_full_informativeness_cutoff
observed_informative_sites = get_informative_sites(alignment, self.threshold)
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/compute.py", line 102, in get_informative_sites
for cells in taxa.sequences():
AttributeError: 'DnaCharacterMatrix' object has no attribute 'sequences'

======================================================================
ERROR: test_informativeness_cutoff (tapir.tests.test_compute.TestInformativenessCutoff)

Traceback (most recent call last):
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/tests/test_compute.py", line 101, in test_informativeness_cutoff
observed_informative_sites = get_informative_sites(alignment, self.threshold)
File "/home/oscar/.local/lib/python2.7/site-packages/tapir/compute.py", line 102, in get_informative_sites
for cells in taxa.sequences():
AttributeError: 'DnaCharacterMatrix' object has no attribute 'sequences'


Ran 17 tests in 0.092s

FAILED (errors=3)

@siriusb-nox you'll need to update to dendropy > 4.0.0. Rerunning the install instructions from the README should fix this.

Hi @jonchang, thanks very much indeed for your fast reply. Indeed, I updated dendropy as you suggested, and now tapir is working just fine!

Many thanks again, and best wishes!

Glad to hear it's working now.