VEuPathDB / service-eda

Repo containing EDA web service
Apache License 2.0
0 stars 0 forks source link

Map needs to be able to handle integer ordinal variables as marker variable #29

Closed bobular closed 4 months ago

bobular commented 4 months ago

At the moment a runtime exception "missing vocabulary on categorical variable" is coming from the map-specific code in "shared.tsx".

This is the EDA PopSet (Plasmo or VB) Study variable Genbank ID It is type=integer, dataShape=ordinal

We need to be able to handle this type of variable gracefully.

However it's tricky, because the client is hoping for a vocabulary, and there isn't one (this is not a data bug, AFAIK).

I think the solution is to make sure this type of variable isn't allowed at all. We can look into the constraints.

bobular commented 4 months ago

By the way, this new constraint only prevents the USER from choosing this type of variable for the marker overlay.

The map client code can "accidentally" pick the first variable for the marker overlay. Annotating a compatible variable as "isFeatured" gets around this. The cost of making the client more robust to this doesn't seem worth it.

bobular commented 4 months ago

We need to revisit this. There might be lower-cardinality integer ordinal variables that DO have vocabularies, and these might be OK to use as marker overlays (as continuous or categorical though?)