Closed turbomam closed 2 years ago
Also to do: order the columns by rank
how are they ordered now @ddooley ? By order of appearance in schema.js?
bump: the linkml datastructure branch does group according to slot_groups now :-) , but it doesn't yet order either sections or columns according to rank.
@sujaypatil96 , you can help with this, right? :-)
Ordering of DH columns is now by rank on both server side (via linkml.py) and browser side (via script/dataharmonizer/index.js).
I think the slot_groups have ranks as well. I'll dig something up now.
As noted on Slack, I missed that “dh_section” is a slot, and under that we have various slot “sub-class” entities, which are referenced by slots’ “slot_group” field. I’ll revise section sorting code to take that into account now.
The slot analysis_type
appears in every enviroment-based template with the title "analysis/data type"
It should appear in column 1 of the sample_id
section, which has the title "Sample ID".
I think that's all fine in the linkml-datastructure branch now.
Additionally, sample_id
has rank = 1, so it should be the first section
I should implement something that ensures that ranks aren't re-used (like multiple sections with rank = 1)
analysis_type:
name: analysis_type
rank: 1
description: Select all the data types associated or available for this biosample
title: analysis/data type
examples:
- value: metagenomics; metabolomics; proteomics
see_also:
- MIxS:investigation_type
multivalued: true
slot_group: sample_id
range: analysis_type_enum
required: true
sample_id:
name: sample_id
rank: 1
title: Sample ID
from_schema: https://example.com/nmdc_dh
is_a: dh_section
The latest push should fix this. For sort, I just had to add a call to fetch slot_group specs from overall specification in order to get rank.
Yes, section and column layout looks great now.
Did you say you thought that column jumping would be restored in this push? I tried once in my usual setup and it didn't work for me yet.
Show section isn't working under my use conditions in Chrome, either.
I have seen the jump and show functionality working in FF, but I have also been able to break it by loading data and validating
There's some odd behaviour with slots that are a subclass of one section but have "slot_group" some other section. Fields in "MIxS core" seems to be problematic this way re. show section, and jumping to them. Looking into it.
There's some odd behaviour with slots that are a subclass of one section but have "slot_group" some other section
Oh! I don't I intended that to happen. I will look into that later today.
Not your problem. It turns out menu wasn't refreshing list of template sections or jump to fields. Fixed but have to fix something else before pushing commit on that.
This should be fixed with latest commit. I didn't catch it earlier because I wasn't doing template change when testing the show/jump functionality.
Show/jump operations work in Chrome and Firefox
K. likely validation causing javascript error that is knocking out other js functions. I will test on your sample data.
I think this is done. @sujaypatil96 may have some ideas for removing some section arrangement functionality that's replicated between the python can javascript components, but that could be another issue.
preferably as an option, in addition to the current use of
is_a
parentsslot_group definition
Sujay and I will work on this
This is probably the entry point in main_linkml.js