Skip to content

Commit

Permalink
Merge pull request #1 from shenwei356/speedup
Browse files Browse the repository at this point in the history
accelerate rank query
  • Loading branch information
nick-youngblut authored Feb 9, 2020
2 parents 6b86cef + 22eb954 commit a3ec9f8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gtdb_to_taxdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ def __str__(self):

def get_rank(self, vertex):
""" Getting rank based on GTDB prefixes """
for r in self.__ranks:
if vertex.startswith(r):
return self.__ranks[r]
return 'subspecies'
return self.__ranks.get(vertex[0:3], 'subspecies')

def iter_graph(self, vertex):
""" General iteration of all nodes in the graph """
Expand Down

0 comments on commit a3ec9f8

Please sign in to comment.