feat(ref): return NCBI assembly reports via gget ref (#179)#237
Draft
Elarwei001 wants to merge 3 commits into
Draft
feat(ref): return NCBI assembly reports via gget ref (#179)#237Elarwei001 wants to merge 3 commits into
Elarwei001 wants to merge 3 commits into
Conversation
Add an `assembly_report` mode to `gget ref` (Python API and CLI). When enabled, the positional argument is interpreted as an NCBI assembly accession (e.g. GCF_000001405.40) and the NCBI assembly report is fetched and parsed, mapping sequence/chromosome names across the Ensembl/short, GenBank, RefSeq and UCSC naming conventions. - New `gget.assembly_report()` helper and `ref(..., assembly_report=True)`. - CLI: `gget ref <accession> --assembly_report [--csv]`. - Returns a pandas DataFrame by default, list of dicts / JSON with json=True. - Tests + fixtures (live NCBI, small SARS-CoV-2 assembly) and docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #237 +/- ##
==========================================
+ Coverage 56.14% 56.36% +0.21%
==========================================
Files 29 29
Lines 9244 9295 +51
==========================================
+ Hits 5190 5239 +49
- Misses 4054 4056 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add a network-free TestAssemblyReportOffline class that mocks requests to cover assembly_report (accession validation, parent-dir and report HTTP errors, no-folder/missing-header errors, parsing, verbose, and json/save/CSV branches) and the ref(assembly_report=True) delegation. All PR-added lines are now covered except the json_package.dump rename deep in the Ensembl network save path (un-coverable network-free). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #179
Summary
gget ref: Added support for fetching NCBI assembly reports (fixes issue 179).Testing
Argument-level unit tests added via fixture entries in
tests/fixtures/test_ref.json(drivingtests/test_ref.py); run with pytest.