Skip to content

Commit c84392d

Browse files
authored
Merge pull request #927 from microbiomedata/886-gold-etl-missing-insdc_biosample_identifiers-values-in-biosample_set-records
Pass list of sequencing projects and analysis projects to `GoldStudyTranslator` call in `generate_biosample_set_from_gold_api_for_study`
2 parents 69d1c20 + e449cd9 commit c84392d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nmdc_runtime/site/repair/database_updater.py

+12
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,20 @@ def generate_biosample_set_from_gold_api_for_study(self) -> nmdc.Database:
199199
if gbs.get("biosampleGoldId") not in nmdc_gold_ids
200200
]
201201

202+
# use the GOLD study id to fetch all sequencing project records associated with the study
203+
gold_sequencing_projects_for_study = (
204+
self.gold_api_client.fetch_projects_by_study(gold_study_id)
205+
)
206+
207+
# use the GOLD study id to fetch all analysis project records associated with the study
208+
gold_analysis_projects_for_study = (
209+
self.gold_api_client.fetch_analysis_projects_by_study(gold_study_id)
210+
)
211+
202212
gold_study_translator = GoldStudyTranslator(
203213
biosamples=missing_gold_biosamples,
214+
projects=gold_sequencing_projects_for_study,
215+
analysis_projects=gold_analysis_projects_for_study,
204216
gold_nmdc_instrument_map_df=self.gold_nmdc_instrument_map_df,
205217
)
206218

0 commit comments

Comments
 (0)