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

[MRG] add --from-file option to sourmash sketch commands #1362

Merged
merged 4 commits into from
Mar 4, 2021

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Mar 4, 2021

This PR adds sourmash sketch dna|protein|translate --from-file list_of_files.txt.

Per @klamens request here, #1338 (comment)

Checklist

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@ctb
Copy link
Contributor Author

ctb commented Mar 4, 2021

Ready for review @bluegenes!

@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #1362 (0f83830) into latest (4f43288) will increase coverage by 5.33%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1362      +/-   ##
==========================================
+ Coverage   88.80%   94.13%   +5.33%     
==========================================
  Files         123       96      -27     
  Lines       18207    14650    -3557     
  Branches     1405     1409       +4     
==========================================
- Hits        16169    13791    -2378     
+ Misses       1800      621    -1179     
  Partials      238      238              
Flag Coverage Δ
python 94.13% <100.00%> (+0.02%) ⬆️
rust ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sourmash/cli/compare.py 100.00% <ø> (ø)
src/sourmash/cli/index.py 100.00% <ø> (ø)
src/sourmash/cli/lca/index.py 100.00% <ø> (ø)
src/sourmash/cli/sketch/dna.py 100.00% <100.00%> (ø)
src/sourmash/cli/sketch/protein.py 100.00% <100.00%> (ø)
src/sourmash/cli/sketch/translate.py 100.00% <100.00%> (ø)
src/sourmash/command_sketch.py 85.02% <100.00%> (+0.75%) ⬆️
tests/test_sourmash_sketch.py 100.00% <100.00%> (ø)
src/core/src/lib.rs
src/core/src/signature.rs
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f43288...0f83830. Read the comment docs.

Comment on lines +574 to +575
sigdata = fp.read()
siglist = list(signature.load_signatures(sigdata))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reasoning behind using this syntax vs load_file_as_signatures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah! no, not really, I just wrote these tests before load_file_as_signatures was available, and since it's internal test code I'm not as worried about using the public API.

Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! file lists are so handy

@ctb ctb merged commit 5e66db9 into latest Mar 4, 2021
@ctb ctb deleted the add/sketch_from_file branch March 4, 2021 14:05
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 this pull request may close these issues.

2 participants