open-physiology / open-physiology-viewer

Apache License 2.0
7 stars 7 forks source link

chains: allow list of lyphTemplates #283

Closed tgbugs closed 1 year ago

tgbugs commented 1 year ago

Currently a chain can only have a single lyphTemplate, however it would vastly simplify chain creation to allow the user to provide a list of templates to use for each lyph in the chain, which would allow a single chain specification for unbranched structures that have heterogenous lyphTemplates.

I suggest a new field called lyphTemplates that accepts a list be added to the schema for Chain.

albatros13 commented 1 year ago

Is it really necessary? You can compose a chain out of lyph instances - define lyphs using supertypes and list them in the chain's field "lyphs". It is more flexible as you can assign ontology terms and names to lyphs.

tgbugs commented 1 year ago

The use case is when we don't have the lyph instances because we want to only provide a list of housing lyphs and don't want to or can't maintain the identifiers for the lyphs independently.

tgbugs commented 1 year ago

Also it provides a much cleaner interface for translating from npo to apinatomy.

tgbugs commented 1 year ago

From discussion having a chainTemplate field on the chain will also help with only needing to specify e.g. CYST for a cell, and a combination of BAGs for an axonal tree. Might want to log info if there is a mismatch.

tgbugs commented 1 year ago

The actual full solution to this problem is to use levels and specify links which have all the information that we need in one place. We might not need lyphTemplates at all because in any case where you need that level of granularity you should use levels instead.