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

Conditional select menus (pulldowns, LinkML enums, etc) #302

Open
turbomam opened this issue Apr 19, 2022 · 8 comments
Open

Conditional select menus (pulldowns, LinkML enums, etc) #302

turbomam opened this issue Apr 19, 2022 · 8 comments

Comments

@turbomam
Copy link
Contributor

turbomam commented Apr 19, 2022

NMDC use case:

In addition to the MIxS environmental triad of EnvO terms, NMDC also describes the origin of biosamples with 5-part GOLD paths.

Interactive GOLD paths explorer: https://gold.jgi.doe.gov/ecosystemtree?mode=organism

Journal article: https://www.researchgate.net/publication/328539814_Genomes_OnLine_database_GOLD_v7_updates_and_new_features

There are thousands of valid combinations of the five GOLD path ranks, so we don't want to build one pre-composed pulldowns. Therefore we have one pulldown for each rank. But you can't mix the values of the five ranks indiscriminately. They have to form valid paths, like

  1. Ecosystem Category → Terrestrial
  2. Ecosystem → Environmental
  3. Specific Ecosystem → Agricultural land
  4. Ecosystem Type → Soil
  5. Ecosystem Subtype → Clay

We would like a selection from Ecosystem Category to constrain the values available in the columns for Ecosystem and lower ranked

@turbomam
Copy link
Contributor Author

@ddooley
Copy link
Collaborator

ddooley commented Apr 19, 2022

So I see this table in the Gold paper that summarizes the dependency:

image

I guess the first challenge is how to wind these relationships into the LinkML enums? Has that been done yet? A particular enum like "composting" (an ecosystem type enum) could have a "depends on" or "pertinent to" relation pointing to Ecosystem category "solid waste"? If that were coded in then DH would have the data to accomplish both validation and menu filtering.

@turbomam
Copy link
Contributor Author

I guess the first challenge is how to wind these relationships into the LinkML enums? Has that been done yet?

No, not yet. That's on me.

@turbomam
Copy link
Contributor Author

turbomam commented Apr 19, 2022

Patrick found a GOLD's 5-Level Ecosystem Classification Paths Excel spreadsheet at the bottom of this page

@ddooley
Copy link
Collaborator

ddooley commented Apr 19, 2022

So its a polyhierarchy - and terms like "Biofilm" can occur at several levels too. This argues for having each enumeration's items have a 'pertinent to' relation to one or more other enumeration items. Is that doable? Seems like it should be baked into LinkML schema?

@pkalita-lbl
Copy link
Collaborator

Just a quick update, I had some success yesterday at getting the autocomplete dropdown menus populating with the correct GOLD path elements. I've pushed that work up in this branch. That work is mainly focused the Handsontable mechanics. The GOLD ecosystem path rules are not coming from the LinkML schema, yet, but rather an external JSON file (well, technically JS file because of how DataHarmonizer loads resources). I am investigating how the GOLD ecosystem path spec could be translated to LinkML, but not much to report there yet.

@ddooley
Copy link
Collaborator

ddooley commented Dec 12, 2023

How is the need for this functionality in DH looking now? It seems like validation rules wouldn't handle this; instead dynamic filtering is required.

@pkalita-lbl
Copy link
Collaborator

It has been quite a while since I worked on this in NMDC, but as far as I recall we were able to do what we needed to do with some custom code on the NMDC side. I'm not sure there's anything else here that DH needs to solve.

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

No branches or pull requests

3 participants