Skip to content

Commit

Permalink
fix(utils): correctly handle katsu experiment stats
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Apr 12, 2024
1 parent 3a7491d commit 40f4e60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bento_beacon/utils/beacon_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def add_overview_stats_to_response():

def package_biosample_and_experiment_stats(stats):
phenopacket_dts_stats = stats.get("phenopacket", {}).get("data_type_specific", {})
experiment_stats = stats.get("experiment", {})
experiment_stats = stats.get("experiment", {}).get("data_type_specific", {}).get("experiments", {})

biosamples = phenopacket_dts_stats.get("biosamples", {})
biosamples_count = biosamples.get("count", 0)
sampled_tissue = biosamples.get("sampled_tissue", {})

experiments_count = experiment_stats.get("count", 0)
experiment_type = experiment_stats.get("data_type_specific", {}).get("experiment_type", {})
experiment_type = experiment_stats.get("experiment_type", {})

# convert to bento_public response format
sampled_tissue_data = [{"label": key, "value": value} for key, value in sampled_tissue.items()]
Expand Down

0 comments on commit 40f4e60

Please sign in to comment.