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

Convert to/from Mash sketch format #99

Closed
lskatz opened this issue Jan 9, 2017 · 11 comments
Closed

Convert to/from Mash sketch format #99

lskatz opened this issue Jan 9, 2017 · 11 comments

Comments

@lskatz
Copy link

lskatz commented Jan 9, 2017

Hi @ctb, I was wondering if you could make a Sourmash subcommand to convert back and forth between YAML and the format used for Mash sketches. This would help increase compatibility between Mash and Sourmash.

@ctb
Copy link
Contributor

ctb commented Jan 9, 2017 via email

@lskatz
Copy link
Author

lskatz commented Jan 9, 2017

Ok. So to import a mash sketch to Sourmash, I would use the mash info -d command to make a dump and then sourmash import_csv?

@ctb
Copy link
Contributor

ctb commented Jan 9, 2017 via email

@lskatz
Copy link
Author

lskatz commented Jan 9, 2017

Thanks!

@lskatz lskatz closed this as completed Jan 9, 2017
@ctb
Copy link
Contributor

ctb commented Jan 10, 2017 via email

@ctb
Copy link
Contributor

ctb commented Jan 20, 2017

I've hacked together a script, utils/mash-to-sourmash-sig.py, that reads the output of 'mash info -d' and outputs it to a sourmash signature. See #121. It's hacky for the moment but seems to basically work - I'll improve it before #121 is committed, and add some tests.

Refs:

@lskatz
Copy link
Author

lskatz commented Jan 15, 2019

Hi @ctb , is there a new version of this command line script for converting JSON<=>MSH? I don't see this script in the latest version but I would like to use it again.

Traceback (most recent call last):
  File "/scicomp/home/gzu2/src/mashtree/bin/mash-to-sourmash-sig.py", line 20, in <module>
    E = sourmash_lib.Estimators(ksize=ksize, n=num, is_protein=False)
AttributeError: 'module' object has no attribute 'Estimators'

@lskatz lskatz reopened this Jan 15, 2019
@ctb
Copy link
Contributor

ctb commented Jan 15, 2019 via email

@lskatz
Copy link
Author

lskatz commented Jan 15, 2019

Oh that's great! However, I got an error Unrecognized command for sig, import, and signature

Unrecognized command

sourmash <command> [<args>]

** Commands include:

compute <filenames>         Compute MinHash signatures for sequences in files.
compare <filenames.sig>     Compute similarity matrix for multiple signatures.
search <query> <against>    Search a signature against a list of signatures.
plot <matrix>               Plot a distance matrix made by 'compare'.
gather                      Search a metagenome signature for multiple
                                 non-overlapping matches.

** Taxonomic classification utilities:

   Run 'sourmash lca' for the taxonomic classification routines.

** Sequence Bloom Tree (SBT) utilities:

index                   Index a collection of signatures for fast searching.
sbt_combine             Combine multiple SBTs into a new one.
categorize              Identify best matches for many signatures using an SBT.
watch                   Classify a stream of sequences.

** Other information:

info                        Sourmash version and other information.

Use '-h' to get subcommand-specific help, e.g.

sourmash compute -h

** Documentation is available at https://sourmash.readthedocs.io/

@lskatz
Copy link
Author

lskatz commented Jan 15, 2019

sourmash version 2.0.0a11
- loaded from path: /scicomp/home/gzu2/bin/anaconda2/lib/python2.7/site-packages/sourmash

@ctb
Copy link
Contributor

ctb commented Jan 15, 2019 via email

@ctb ctb closed this as completed Mar 9, 2019
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

No branches or pull requests

2 participants