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

add a sig grep command? #1075

Closed
ctb opened this issue Jul 3, 2020 · 3 comments · Fixed by #1864
Closed

add a sig grep command? #1075

ctb opened this issue Jul 3, 2020 · 3 comments · Fixed by #1864

Comments

@ctb
Copy link
Contributor

ctb commented Jul 3, 2020

It'd be nice to be able to find signatures in files by md5... and also search by name, filename, etc.

ref #993

@ctb
Copy link
Contributor Author

ctb commented Jun 12, 2021

FWIW, this can be hacked together with picklists #1587, sourmash sig extract, and grep on picklists.

@ctb
Copy link
Contributor Author

ctb commented Jun 19, 2021

This is a handy command for taking e.g. a manifest or CSV output from sourmash sig describe and searching based on a name, to produce a picklist:

csvtk grep -p Campylobacter -r -f name all.csv > picklist.csv

the picklist can then be used with something like

sourmash sig extract --picklist picklist.csv:md5:md5 -o picked.zip

@ctb
Copy link
Contributor Author

ctb commented Jun 26, 2021

@bluegenes and I talked a bit in a teleconference about the idea of adding generic pattern matching for inclusion/exclusion of signatures from search, building off of picklists and manifests. Hot take UX:

sourmash gather --exclude GCA_0583288 ...
sourmash gather --include GCA_0583288 ...

this could be readily implemented as part of the picklist API.

(NOTE: moved to #1865)

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

Successfully merging a pull request may close this issue.

1 participant