Skip to content

Enhance retrieveMetadata() with genome list file input option#29

Merged
AbhirupaGhosh merged 5 commits into
mainfrom
add-genome-list-input
Jul 10, 2026
Merged

Enhance retrieveMetadata() with genome list file input option#29
AbhirupaGhosh merged 5 commits into
mainfrom
add-genome-list-input

Conversation

@AbhirupaGhosh

@AbhirupaGhosh AbhirupaGhosh commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Updated retrieveMetadata() to allow reading from a specified file if provided. Added checks for file existence and trimmed whitespace from genome IDs. This is the only defining step for the restricted list of genomes that the user is willing to use to build a model.

An example application is benchmarking using specific genomes.

Description

What kind of change(s) are included?

  • Feature (adds or updates new capabilities)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • I have added comments to my code to help provide understanding.
  • I have added a test which covers the code changes found within this PR.
  • I have deleted all non-relevant text in this pull request template.
  • Reviewer assignment: Tag a relevant team member to review and approve the changes.

Updated retrieveMetadata() to allow reading from a specified file if provided. Added checks for file existence and trimmed whitespace from genome IDs. 
This is the only defining step for the restricted list of genomes that the user is willing to use to build a model. 

An example application is benchmarking using specific genomes.
AbhirupaGhosh and others added 3 commits June 24, 2026 21:26
Updated the 'prepareGenomes' function to use 'genome_id_file' parameter correctly.
prepareGenomes() accepted a genome_id_file argument but hardcoded NULL in
its internal retrieveMetadata() call, silently ignoring the file. Pass it
through so the restricted genome list flows through the pipeline. Also
document the new parameter and drop a duplicate log message.
@eboyer221

Copy link
Copy Markdown
Contributor

Pushed a small fix to this branch (815c7b9): prepareGenomes() was accepting a genome_id_file argument but hardcoding genome_id_file = NULL in its internal retrieveMetadata() call, so the file was ignored when going through the wrapper (it worked when calling retrieveMetadata() directly). Changed it to pass the argument through, so the restricted genome list now flows through the whole pipeline (metadata → filtered → download). Also documented the new param on both functions and dropped a duplicate log message. Should be ready to re-test.

Covers PR #29: prepareGenomes() must forward genome_id_file to
retrieveMetadata(), the missing-file guard, and ID-line parsing.
Docker-free (mocked), so it runs in CI.

@eboyer221 eboyer221 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The genome-list-from-file feature works which we confirmed with a live run (100 IDs from a file → metadata retrieved, 100/100). Added a one-line fix so prepareGenomes() passes the file through to retrieveMetadata() is in, plus updated docs and a regression test so it can't silently break again.

The intermittent 'more columns than column names' error @epbrenner identified is unrelated to this PR. It's in the BV-BRC data-pull code that this PR doesn't touch (it happens on main too) and is caused by occasional API errors with no retry. He is adding a separate follow-up issue to address that, rather than blocking this PR.

@AbhirupaGhosh AbhirupaGhosh merged commit 5e6cf36 into main Jul 10, 2026
1 of 7 checks passed
@eboyer221 eboyer221 deleted the add-genome-list-input branch July 10, 2026 20:45
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