Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add a script to check tree search * change max_n_below -> min_n_below * test for sbt search bug * Bump version to 2.0.0a7 * Bump SBT db version
- Loading branch information
Showing
7 changed files
with
155 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0a6 | ||
2.0.0a7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#! /usr/bin/env python | ||
""" | ||
Check SBT search by taking every leaf node in a tree and checking to make | ||
sure we can find it. | ||
""" | ||
import argparse | ||
import sourmash | ||
from sourmash import sourmash_args | ||
from sourmash.sbtmh import search_minhashes | ||
|
||
THRESHOLD=0.08 | ||
|
||
|
||
def main(): | ||
p = argparse.ArgumentParser() | ||
p.add_argument('sbt') | ||
args = p.parse_args() | ||
|
||
db = sourmash.load_sbt_index(args.sbt) | ||
threshold = THRESHOLD | ||
|
||
for leaf in db.leaves(): | ||
query = leaf.data | ||
matches = db.find(search_minhashes, query, threshold) | ||
matches = list([ x.data for x in matches ]) | ||
if query not in matches: | ||
print(query) | ||
assert 0 | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |