Open ctb opened 3 years ago
side note, save_signatures
should maybe be adjusted to require kwargs, something like
def save_signatures(sigs, fp=None, *, compression=0)
https://github.com/dib-lab/sourmash/pull/1493 provides flexible signature saving functionality that supports Zip files, directories, and sig files.
We might want to add something to this class that makes it a single function call to write a bunch of signatures. Right now it requires multiple calls b/c of the primary use case, but this is easy to fix.
Other changes might include using ZipStorage
underneath https://github.com/dib-lab/sourmash/issues/1441.
(the "single function call to write a bunch of signatures" is a good next issue!)
Some ideas rescued from https://github.com/dib-lab/sourmash/issues/1142 -
load_file_as_signatures
doesn't take a string input, per https://github.com/dib-lab/sourmash/pull/1304. This challenges it as a replacement forsourmash.signature.load_signatures
... I wonder if we can letload_file_as_signatures
take a fp, instead of a string asload_signatures
does? Then we could support file objects and (via io.StringIO) string inputs.do we we want to change
save_signatures
to require a file output, OR alternatively provide a new top-level function that requires you write to a file?