Skip to content

Commit

Permalink
Merge d1196a7 into 20cbcaa
Browse files Browse the repository at this point in the history
  • Loading branch information
ebolyen committed Oct 11, 2019
2 parents 20cbcaa + d1196a7 commit 9ded352
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions gneiss/plot/tests/test_dendrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def test_cache_ntips(self):

t._cache_ntips()

self.assertEquals(t.leafcount, 4)
self.assertEquals(t.children[0].leafcount, 2)
self.assertEquals(t.children[1].leafcount, 2)
self.assertEquals(t.children[0].children[0].leafcount, 1)
self.assertEquals(t.children[0].children[1].leafcount, 1)
self.assertEquals(t.children[1].children[0].leafcount, 1)
self.assertEquals(t.children[1].children[1].leafcount, 1)
self.assertEqual(t.leafcount, 4)
self.assertEqual(t.children[0].leafcount, 2)
self.assertEqual(t.children[1].leafcount, 2)
self.assertEqual(t.children[0].children[0].leafcount, 1)
self.assertEqual(t.children[0].children[1].leafcount, 1)
self.assertEqual(t.children[1].children[0].leafcount, 1)
self.assertEqual(t.children[1].children[1].leafcount, 1)


class TestUnrootedDendrogram(unittest.TestCase):
Expand Down
8 changes: 4 additions & 4 deletions gneiss/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ def test_biom_match(self):
exp_df = pd.DataFrame(exp_table.to_dataframe())
res_df = pd.DataFrame(res_table.to_dataframe())

exp_df = exp_df.reindex_axis(sorted(exp_df.columns), axis=1)
res_df = res_df.reindex_axis(sorted(res_df.columns), axis=1)
exp_df = exp_df.reindex(sorted(exp_df.columns), axis=1)
res_df = res_df.reindex(sorted(res_df.columns), axis=1)

pdt.assert_frame_equal(exp_df, res_df)

exp_md = exp_md.reindex_axis(sorted(exp_md.index), axis=0)
res_md = res_md.reindex_axis(sorted(res_md.index), axis=0)
exp_md = exp_md.reindex(sorted(exp_md.index), axis=0)
res_md = res_md.reindex(sorted(res_md.index), axis=0)

pdt.assert_frame_equal(res_md, exp_md)

Expand Down
2 changes: 1 addition & 1 deletion gneiss/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _dense_match_tips(table, tree):
_tree.bifurcate()
_tree.prune()
sorted_features = [n.name for n in _tree.tips()]
_table = _table.reindex_axis(sorted_features, axis=1)
_table = _table.reindex(sorted_features, axis=1)
return _table, _tree


Expand Down

0 comments on commit 9ded352

Please sign in to comment.