feat(ref): support fetching GENCODE GTFs and FASTAs (#73)#238
Draft
Elarwei001 wants to merge 3 commits into
Draft
feat(ref): support fetching GENCODE GTFs and FASTAs (#73)#238Elarwei001 wants to merge 3 commits into
Elarwei001 wants to merge 3 commits into
Conversation
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>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
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 #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(drivingtests/test_ref.py); run with pytest.