Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rough cut code to go from LCA database to SBT #1039

Closed
ctb opened this issue Jun 22, 2020 · 0 comments · Fixed by #1059
Closed

rough cut code to go from LCA database to SBT #1039

ctb opened this issue Jun 22, 2020 · 0 comments · Fixed by #1059

Comments

@ctb
Copy link
Contributor

ctb commented Jun 22, 2020

#! /usr/bin/env python
import sourmash
import sys
from sourmash.lca.lca_db import load_single_database

lcafile = sys.argv[1]
sbtfile = sys.argv[2]

db, _, _ = load_single_database(lcafile)

tree = sourmash.create_sbt_index()

for sig in db.signatures():
    tree.insert(sig)

tree.save(sbtfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant