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

Map HPO qualifiers to HPO IDs in seqr data structure #3171

Open
jxchong opened this issue Jan 18, 2023 · 4 comments
Open

Map HPO qualifiers to HPO IDs in seqr data structure #3171

jxchong opened this issue Jan 18, 2023 · 4 comments

Comments

@jxchong
Copy link

jxchong commented Jan 18, 2023

Seqr's data structure maps HPO terms and stores the corresponding HPO IDs, however it seems to only store the qualifiers as plain text labels, without corresponding HPO IDs.

example, the data structure currently stores:

{"id": "HP:0000365",
                         "qualifiers": [{"type": "age_of_onset", "label": "Juvenile onset"},
                                        {"type": "pace_of_progression", "label": "Rapidly progressive"},
                                        {"type": "severity", "label": "Profound"},
                                        {"type": "temporal_pattern", "label": "Chronic"},
                                        {"type": "spatial_pattern", "label": "Generalized"},
                                        {"type": "laterality", "label": "Left"}
                                       ]
                        },

This is inconsistent with handling of the regular/primary/main HPO terms because the primary HPO term is stored as an ID but the qualifiers are stored only as plaintext. Ideally, the qualifiers would also be stored as IDs as IDs are unambiguous, such as below:

{"id": "HP:0000365",
                         "qualifiers": [{"type": "age_of_onset", "label": "Juvenile onset", "id": "HP:0003621" },
                                        {"type": "pace_of_progression", "label": "Rapidly progressive", "id": "HP:0003678" },
                                        {"type": "severity", "label": "Profound", "id": "HP:0012829"},
                                        {"type": "temporal_pattern", "label": "Chronic",  "id": "xxxx"},
                                        {"type": "spatial_pattern", "label": "Generalized",  "id": "xxxx"},
                                        {"type": "laterality", "label": "Left",  "id": "xxxxxx"}
                                       ]
                        },

Describe alternatives you've considered
The GREGoR export seems to do some sort of mapping of the qualifier labels to IDs, which means that if you do not go through the GREGoR export function, the qualifiers are left as plaintext.

@jxchong
Copy link
Author

jxchong commented Feb 23, 2023

Hi @hanars sorry to bug you but we need to know if this will be fixed, or if there's a reason for this behavior, or if this is something we need to manually code around. Thanks!

@hanars
Copy link
Collaborator

hanars commented Feb 23, 2023

Hi Jessica, this is low priority for us as we are already reporting the data as needed by mapping to HPO IDs at the time of report generation. A full database migration and corresponding redesign of the front end to have no practical difference on the user experience or the generated report is unfortunately something our team does not have the bandwidth to work on anytime soon.

@jxchong
Copy link
Author

jxchong commented Feb 23, 2023

ok thanks. Is there a specific reason it's designed this way? (so we know whether to consider developing a fix ourselves)

@hanars
Copy link
Collaborator

hanars commented Feb 23, 2023

Its designed this way because the data model predates these reports by years, and reports are often subject to change (or even have conflicting representations in different reports) so when adding reports we generally try to format our existing data for the report instead of migrating our data to meet a new format. If you feel strongly and want to change the underlying data structure for yourselves you should feel free, although note that the UI for editing features will need some updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants