Skip to content

Commit

Permalink
Fix sankey data and prov-info
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhou committed Nov 28, 2023
1 parent ab37ce0 commit 68d233e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2845,7 +2845,7 @@ def get_prov_info():
distinct_organ_hubmap_id_list.append(item['hubmap_id'])
distinct_organ_submission_id_list.append(item['submission_id'])
distinct_organ_uuid_list.append(item['uuid'])
distinct_organ_type_list.append(organ_types_dict[item['organ']]['description'].lower())
distinct_organ_type_list.append(organ_types_dict[item['organ']].lower())
internal_dict[HEADER_ORGAN_HUBMAP_ID] = distinct_organ_hubmap_id_list
internal_dict[HEADER_ORGAN_SUBMISSION_ID] = distinct_organ_submission_id_list
internal_dict[HEADER_ORGAN_UUID] = distinct_organ_uuid_list
Expand Down Expand Up @@ -3157,7 +3157,7 @@ def get_prov_info_for_dataset(id):
distinct_organ_hubmap_id_list.append(item['hubmap_id'])
distinct_organ_submission_id_list.append(item['submission_id'])
distinct_organ_uuid_list.append(item['uuid'])
distinct_organ_type_list.append(organ_types_dict[item['organ']]['description'].lower())
distinct_organ_type_list.append(organ_types_dict[item['organ']].lower())
internal_dict[HEADER_ORGAN_HUBMAP_ID] = distinct_organ_hubmap_id_list
internal_dict[HEADER_ORGAN_SUBMISSION_ID] = distinct_organ_submission_id_list
internal_dict[HEADER_ORGAN_UUID] = distinct_organ_uuid_list
Expand Down Expand Up @@ -3327,7 +3327,7 @@ def sankey_data():
for dataset in sankey_info:
internal_dict = collections.OrderedDict()
internal_dict[HEADER_DATASET_GROUP_NAME] = dataset[HEADER_DATASET_GROUP_NAME]
internal_dict[HEADER_ORGAN_TYPE] = organ_types_dict[dataset[HEADER_ORGAN_TYPE]]['description'].lower()
internal_dict[HEADER_ORGAN_TYPE] = organ_types_dict[dataset[HEADER_ORGAN_TYPE]].lower()
# Data type codes are replaced with data type descriptions
assay_description = ""
try:
Expand Down Expand Up @@ -3452,13 +3452,13 @@ def get_sample_prov_info():
organ_submission_id = None
if sample['organ_uuid'] is not None:
organ_uuid = sample['organ_uuid']
organ_type = organ_types_dict[sample['organ_organ_type']]['description'].lower()
organ_type = organ_types_dict[sample['organ_organ_type']].lower()
organ_hubmap_id = sample['organ_hubmap_id']
organ_submission_id = sample['organ_submission_id']
else:
if sample['sample_category'] == "organ":
organ_uuid = sample['sample_uuid']
organ_type = organ_types_dict[sample['sample_organ']]['description'].lower()
organ_type = organ_types_dict[sample['sample_organ']].lower()
organ_hubmap_id = sample['sample_hubmap_id']
organ_submission_id = sample['sample_submission_id']

Expand Down
1 change: 1 addition & 0 deletions src/schema/schema_triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ def get_dataset_title(property_key, normalized_type, user_token, existing_data_d

return property_key, generated_title


"""
Trigger event method of getting the uuid of the previous revision dataset if exists
Expand Down

0 comments on commit 68d233e

Please sign in to comment.