Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass list of sequencing projects and analysis projects to GoldStudyTranslator call in generate_biosample_set_from_gold_api_for_study #927

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nmdc_runtime/site/repair/database_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,20 @@ def generate_biosample_set_from_gold_api_for_study(self) -> nmdc.Database:
if gbs.get("biosampleGoldId") not in nmdc_gold_ids
]

# use the GOLD study id to fetch all sequencing project records associated with the study
gold_sequencing_projects_for_study = (
self.gold_api_client.fetch_projects_by_study(gold_study_id)
)

# use the GOLD study id to fetch all analysis project records associated with the study
gold_analysis_projects_for_study = (
self.gold_api_client.fetch_analysis_projects_by_study(gold_study_id)
)

gold_study_translator = GoldStudyTranslator(
biosamples=missing_gold_biosamples,
projects=gold_sequencing_projects_for_study,
analysis_projects=gold_analysis_projects_for_study,
gold_nmdc_instrument_map_df=self.gold_nmdc_instrument_map_df,
)

Expand Down