Skip to content

Commit

Permalink
fix by filtering nan's in test
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-easterly committed Apr 19, 2019
1 parent 5134acb commit 07004a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/travis/testNCBITaxonomyDb.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def testMapIdToDesiredRanks_Unipept(self):
# not contained in FULL_TAXONOMY_TREE
tax = testfile('unipept_sample7_taxonomy.tab')
df = pd.read_csv(tax, sep='\t')
num_ids = self.ncbi.convert_name_to_taxid(df['lca'])
num_ids = np.array(self.ncbi.convert_name_to_taxid(df['lca']))
# filter out nans - this happens in the code
num_ids = num_ids[~np.isnan(num_ids)]
for i in num_ids:
self.ncbi.map_id_to_desired_ranks(td.BASIC_TAXONOMY_TREE, i)

Expand Down

0 comments on commit 07004a0

Please sign in to comment.