Repository navigation
Don't create nmdc:DataGeneration records for biosamples that already have them in repair job - #1405
Merged
Conversation
…_filtering params Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n_set_records Use /nmdcschema/linked_instances endpoint to check per-biosample for existing DataGeneration records before creating new ones. This avoids duplicate records and is more efficient than fetching all DataGeneration records for the entire study, which can timeout for large studies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sujaypatil96
commented
Mar 12, 2026
| `sequencingStrategy` (only keeping "Metagenome" or "Metatranscriptome") and associated | ||
| project `projectStatus`. When False, all biosamples are included regardless of sequencing | ||
| strategy or project status. Defaults to True. | ||
| """ |
Collaborator
Author
There was a problem hiding this comment.
Unrelated to main logic being added in this PR. I just noticed that these params were missing documentation in the docstring so added them here.
nmdc:DataGeneration records for biosamples that already have them in repair job
…data_generation_set_records_from_gold_api_for_study-to-consider-existing-data_generation_set-records
… _translate_biosample These methods gained a required provenance_metadata parameter in a recent update to GoldStudyTranslator. The DatabaseUpdater call sites were not updated, causing a TypeError at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ration record in db updater job
…ecords_from_gold_api_for_study() test
Collaborator
Author
|
See #1402 (comment) for example output. |
…on_for_processed_sample to RuntimeApiUserClient These methods are needed by DatabaseUpdater.generate_data_generation_set_records_from_gold_api_for_study() to look up existing Pooling and LibraryPreparation records via the /nmdcschema/linked_instances endpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aclum
approved these changes
Mar 30, 2026
sujaypatil96
deleted the
1402-update-generate_data_generation_set_records_from_gold_api_for_study-to-consider-existing-data_generation_set-records
branch
March 30, 2026 22:11
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.
This PR updates the
generate_data_generation_set_records_from_gold_api_for_study()method in the database updater module such that it selectively makes data generation records only for those samples in a study that don't already have data generation records associated with them.It also picks up on whether biosamples need to be associated with the data generation records (as
has_input) or if we need to use processed samples (in case the biosamples have been through a pooling process).