Skip to content

Commit

Permalink
small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Mar 30, 2018
1 parent b5940ac commit 25bca36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion sourmash/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,6 @@ def index(args):
sys.exit(-1)

notify('loaded {} sigs; saving SBT under "{}"', n, args.sbt_name)
tree._fill_internal()
tree.save(args.sbt_name, sparseness=args.sparseness)


Expand Down
6 changes: 3 additions & 3 deletions sourmash/sbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def save(self, path, storage=None, sparseness=0.0):

nodes = {}
leaves = {}
total_nodes = len(self._nodes) + len(self._leaves)
total_nodes = len(self)
for n, (i, node) in enumerate(self):
if node is None:
continue
Expand Down Expand Up @@ -661,7 +661,7 @@ def fill_nodegraphs(node, *args, **kwargs):
self.is_ready = True

def _fill_up(self, search_fn, *args, **kwargs):
visited, queue = set(), list(reversed(list(self._leaves.keys())))
visited, queue = set(), list(reversed(sorted(self._leaves.keys())))
while queue:
node_p = queue.pop(0)

Expand Down Expand Up @@ -706,7 +706,7 @@ def print_dot(self):
edge [arrowsize=0.8];
""")

for i, node in list(self._nodes.items()):
for i, node in self._nodes.items():
if isinstance(node, Node):
print('"{}" [shape=box fillcolor=gray style=filled]'.format(
node.name))
Expand Down

0 comments on commit 25bca36

Please sign in to comment.