feat(encode): add gget encode module to query and download ENCODE data (#151)#231
Draft
Elarwei001 wants to merge 3 commits into
Draft
feat(encode): add gget encode module to query and download ENCODE data (#151)#231Elarwei001 wants to merge 3 commits into
Elarwei001 wants to merge 3 commits into
Conversation
scverse#151) New module `gget encode` queries the ENCODE project REST API (https://www.encodeproject.org/). Passing an ENCODE accession (experiment or file) returns the matching file(s) with download URLs, optionally filtered by assembly/file_format/output_type and downloaded with download=True; any other input is used as a free-text search returning matching ENCODE objects of a given type. Exposed via the Python API and the command line. 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 #231 +/- ##
==========================================
+ Coverage 56.14% 56.92% +0.78%
==========================================
Files 29 30 +1
Lines 9244 9349 +105
==========================================
+ Hits 5190 5322 +132
+ Misses 4054 4027 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add network-free mocked tests for _encode_get error/404 branches, the output_type filter, generic-object metadata path, accession download, search-path verbose/download warning, save CSV/JSON, and the streaming _download_files body. gget_encode.py now fully 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 #151
Summary
gget encode: New module to query and download data from the ENCODE project. Pass an ENCODE accession (e.g.ENCSR000AKSexperiment orENCFF000BXKfile) to list its file(s) with download URLs — optionally filtered byassembly,file_format, andoutput_type, and downloaded withdownload=True— or pass a free-text term to search ENCODE objects of a giventype. Available in the Python API and on the command line. Resolves issue 151.Testing
Unit tests in
tests/test_encode.pywith fixturetests/fixtures/test_encode.json; run with pytest.