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

Document and streamline/refactor signature loading and saving #919

Closed
ctb opened this issue Mar 27, 2020 · 6 comments · Fixed by #1283
Closed

Document and streamline/refactor signature loading and saving #919

ctb opened this issue Mar 27, 2020 · 6 comments · Fixed by #1283
Labels
4.0 issues to address for a 4.0 release

Comments

@ctb
Copy link
Contributor

ctb commented Mar 27, 2020

I think this shows up in some other issues too, especially the loading, but from slack:

@taylorreiter

I’ve tried about 1 million and 1 combinations of things, and even read the code in unit tests, and can’t figure out how to write out a sourmash sig in the python api.

@olgabot:

Maybe worth writing some wrappers that take a list of signatures and a filename to save? Or a list of paths and returns all signatures?

@taylorreiter
Copy link
Contributor

I think just adding:

with open(out_sig, 'wt') as fp:

so it reads:

with open(out_sig, 'wt') as fp:
      signature.save_signatures([sig], fp)

would be really helpful!

@ctb
Copy link
Contributor Author

ctb commented Mar 28, 2020

OK!

I found this -- and this. I think the latter is probably what are referring to above, in terms of adding with ....

@ctb
Copy link
Contributor Author

ctb commented Mar 28, 2020

See #921.

@ctb
Copy link
Contributor Author

ctb commented Apr 4, 2020

ref #875

@ctb
Copy link
Contributor Author

ctb commented May 3, 2020

also see #934.

@ctb
Copy link
Contributor Author

ctb commented Jul 18, 2020

per #875 (comment),

I think sourmash_args.load_database and sourmash_args.load_file_as_signatures should become the recommended public API for loading signatures; see #1059

@ctb ctb added the 4.0 issues to address for a 4.0 release label Jan 10, 2021
@ctb ctb closed this as completed in #1283 Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 issues to address for a 4.0 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants