Open bluegenes opened 2 years ago
Has function 2 been added the the python API yet? I have a bare list of minhashes in a csv file that I'd like to convert into a signature object for easy db searches via the CLI interface. I would supply parameters for k-size, abund, etc.
Yes, should work!
(all of these functions are current)
1. A function that reads a sourmash signature file/database and raises exceptions if it runs into issues
returns
None
if the file cannot be loaded.db
objects areIndex
classes and have the following two key methods:siglist = db.signatures()
- return a generator of signatures in the database.db = db.select(ksize=..., moltype=...)
for getting only signatures that match.2. A function that creates a signature, where we can provide some parameters such as scaling-factor, k-size, ...
Initialize a MinHash:
Add sequence to the minhash:
mh.add_sequence(seq)
(DNA) ormh.add_protein(seq)
(protein)Build the minhash into a sourmash signature:
3. A function that compares signatures and returns the results + 4. A function to approximate Jaccard results to ANI
Using the recently added
FracMinHashComparison
dataclass:Full API Reference: https://sourmash.readthedocs.io/en/latest/api.html