Skip to content

feat(ref): return NCBI assembly reports via gget ref (#179)#237

Draft
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/ref-ncbi-assembly-report-179
Draft

feat(ref): return NCBI assembly reports via gget ref (#179)#237
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/ref-ncbi-assembly-report-179

Conversation

@Elarwei001

Copy link
Copy Markdown
Contributor

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 (driving tests/test_ref.py); run with pytest.

Elarwei001 and others added 2 commits June 24, 2026 22:41
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>
@codecov-commenter

codecov-commenter commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.36%. Comparing base (5cf607f) to head (a871709).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
gget/gget_ref.py 98.07% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@Elarwei001 Elarwei001 marked this pull request as draft June 25, 2026 03:44
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