Skip to content

feat(ref): support fetching GENCODE GTFs and FASTAs (#73)#238

Draft
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/ref-seq-gencode-73
Draft

feat(ref): support fetching GENCODE GTFs and FASTAs (#73)#238
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/ref-seq-gencode-73

Conversation

@Elarwei001

Copy link
Copy Markdown
Contributor

Resolves #73

Summary

gget ref: Added support for fetching reference GTFs and FASTAs from GENCODE (fixes issue 73).

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:48
Add a `source` argument to `gget ref` (Python API and CLI) to select the
reference database: "ensembl" (default, unchanged) or "gencode" (human and
mouse only).

- With source="gencode", `release` is the GENCODE release number (mouse "M"
  prefix added automatically) and defaults to the latest release.
- `which` supports gtf, dna (primary assembly genome), cdna (transcripts),
  ncrna (lncRNA transcripts) and pep (translations); cds is not provided by
  GENCODE and raises a clear error.
- Returns the same dict/list structure as the Ensembl path (with a
  `gencode_release` field). Tests + fixtures (live GENCODE FTP) 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.51%. Comparing base (5cf607f) to head (da4c7a1).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #238      +/-   ##
==========================================
+ Coverage   56.14%   56.51%   +0.37%     
==========================================
  Files          29       29              
  Lines        9244     9321      +77     
==========================================
+ Hits         5190     5268      +78     
+ Misses       4054     4053       -1     

☔ 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 TestGencodeRefOffline class that mocks requests and
find_FTP_link to cover _find_latest_gencode_release (human/mouse release
resolution and error paths) and _gencode_ref (species and 'which'
validation, link found/not-found, ftp/json save, release resolution),
plus the ref() source validation and GENCODE delegation. All PR-added
lines are now covered.

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