Skip to content

Commit

Permalink
filter valid project ids in gold translator
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaypatil96 committed Jan 17, 2025
1 parent 3373659 commit d9902df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nmdc_runtime/site/translation/gold_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def __init__(
# biosamples on their `projects` field
valid_project_ids = {
project.get("projectGoldId")
for biosample in self.biosamples
for project in biosample.get("projects", [])
for project in projects
if project.get("sequencingStrategy") in SEQUENCING_STRATEGIES
and project.get("projectStatus")
in ("Permanent Draft", "Complete and Published")
}
# Filter projects to only those with `projectGoldId` in valid_project_ids
self.projects = [
Expand Down

0 comments on commit d9902df

Please sign in to comment.