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] autodetect FASTA/FASTQ files if given as signatures #1078

Merged
merged 5 commits into from
Jul 13, 2020

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Jul 3, 2020

Raise a nicer exception if the file given to _load_databases can be loaded as a FASTA/FASTQ file.

Fixes #460

  • 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?

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #1078 into master will increase coverage by 0.84%.
The diff coverage is 93.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1078      +/-   ##
==========================================
+ Coverage   92.06%   92.91%   +0.84%     
==========================================
  Files          72       74       +2     
  Lines        5397     5702     +305     
==========================================
+ Hits         4969     5298     +329     
+ Misses        428      404      -24     
Impacted Files Coverage Δ
sourmash/signature.py 92.66% <66.66%> (+1.91%) ⬆️
sourmash/lca/command_classify.py 85.71% <75.00%> (+0.38%) ⬆️
sourmash/lca/lca_utils.py 92.80% <85.00%> (-3.76%) ⬇️
sourmash/commands.py 86.64% <91.66%> (+0.38%) ⬆️
sourmash/lca/command_summarize.py 90.00% <91.83%> (+2.78%) ⬆️
sourmash/sig/__main__.py 93.38% <93.50%> (+0.67%) ⬆️
sourmash/sourmash_args.py 95.37% <94.96%> (+0.43%) ⬆️
sourmash/__init__.py 100.00% <100.00%> (ø)
sourmash/cli/compare.py 100.00% <100.00%> (ø)
sourmash/cli/gather.py 100.00% <100.00%> (ø)
... and 29 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 f18f16c...ec96742. Read the comment docs.

@ctb ctb changed the title [WIP] autodetect FASTA/FASTQ files if given as signatures [MRG] autodetect FASTA/FASTQ files if given as signatures Jul 4, 2020
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.

again, this review contains a "hey @ctb, why did you you do a thing a certain way??" :)

Comment on lines 411 to 412
except:
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it better to pass here, then try again below (rather than try/except within the exception)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in this case, because we have so many things to try. if we did nested try/excepts it would end up indenting to the right.

Copy link
Contributor

Choose a reason for hiding this comment

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

great, thanks!

@ctb ctb merged commit b846ffe into master Jul 13, 2020
@ctb ctb deleted the autodetect_fasta_etc branch July 13, 2020 16:45
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.

make sourmash load_signatures FASTA-aware
2 participants