open-physiology / open-physiology-viewer

Apache License 2.0
7 stars 7 forks source link

Debugging Neuroview layout - Prostate13 #289

Open albatros13 opened 1 year ago

albatros13 commented 1 year ago

ApiNATOMY model implies the visualization like in the hand drawing below. This is the graph I constructed from the expanded model produced by https://apinatomy.dev.metacell.us/. It is not the expectation, it is the actual model that the viewer has and I cannot see anything wrong with it, the fix #287 has been effective. The cloned nodes are hosted by the respective lyphs like in the photo.

The question is: Why does Neuroview show a layout where collapsible link n2_clone1---n2 poinst to L6 when in the model node n2 (prostate/13_n2) has property "hostedBy": "wbkg:b_lyph-PNS-nerve-lumbar-pelvic_3", so it should not be in L6 but in PNS-nerve-lumbar-pelvic!

To reproduce - load the input model below, wait until wbkg and too-map are imported, go to Code, locate "lt-soma-of-neuron", add the line "topology": "BAG2" and press the tick button in the right part of the screen to apply the changes. After than, return to the Viewer mode, "Generated group for ref_lt-soma-of-neuron_prostate/13_lnk_3" should appear in the Dynamic groups and inspected in the Neuroview.

image image

{ "links": [ { "id": "prostate/13_lnk_0", "name": "Neural segment for ILX:0793823", "conveyingLyph": "wbkg:lt-axon-bag", "source": "prostate/13_n3", "target": "prostate/13_n4" }, { "id": "prostate/13_lnk_1", "name": "Neural segment for UBERON:0018675", "conveyingLyph": "wbkg:lt-axon-tube", "source": "prostate/13_n2", "target": "prostate/13_n3" }, { "id": "prostate/13_lnk_2", "name": "Neural segment for ILX:0793878", "conveyingLyph": "wbkg:lt-soma-of-neuron", "source": "prostate/13_n5", "target": "prostate/13_n2" }, { "id": "prostate/13_lnk_3", "name": "Neural segment for ILX:0793877", "conveyingLyph": "wbkg:lt-soma-of-neuron", "source": "prostate/13_n1", "target": "prostate/13_n2" } ], "lyphs": [], "chains": [ { "id": "prostate/13_1", "name": "intermediolateral cell column of L6-S1 spinal cord_1", "housingLyphs": [ "wbkg:lyph-L6-spinal-segment", "wbkg:lyph-PNS-nerve-lumbar-pelvic", "wbkg:lyph-PNS-pelvic-ganglion-major" ], "levels": [ "prostate/13_lnk_3", "prostate/13_lnk_1", "prostate/13_lnk_0" ] }, { "id": "prostate/13_2", "name": "intermediolateral cell column of L6-S1 spinal cord_2", "housingLyphs": [ "wbkg:lyph-S1-spinal-segment", "wbkg:lyph-PNS-nerve-lumbar-pelvic" ], "levels": [ "prostate/13_lnk_2", "prostate/13_lnk_1" ] } ], "groups": [ { "id": "g_neuron_prostate/13", "name": "Group prostate/13", "links": [ "nlp:prostate/13_lnk_0", "nlp:prostate/13_lnk_2", "nlp:prostate/13_lnk_3", "nlp:prostate/13_lnk_1" ], "nodes": [ "nlp:prostate/13_n1", "nlp:prostate/13_n3", "nlp:prostate/13_n5", "nlp:prostate/13_n4", "nlp:prostate/13n2" ] } ], "localConventions": [ { "prefix": "UBERON", "namespace": "http://purl.obolibrary.org/obo/UBERON" }, { "prefix": "CHEBI", "namespace": "http://purl.obolibrary.org/obo/CHEBI_" }, { "prefix": "FMA", "namespace": "http://purl.org/sig/ont/fma/fma" }, { "prefix": "GO", "namespace": "http://purl.obolibrary.org/obo/GO_" }, { "prefix": "ILX", "namespace": "http://uri.interlex.org/base/ilx_" }, { "prefix": "NLX", "namespace": "http://uri.neuinfo.org/nif/nifstd/nlx_" }, { "prefix": "SAO", "namespace": "http://uri.neuinfo.org/nif/nifstd/sao" }, { "prefix": "PMID", "namespace": "http://www.ncbi.nlm.nih.gov/pubmed/" }, { "prefix": "EMAPA", "namespace": "http://purl.obolibrary.org/obo/EMAPA_" }, { "prefix": "CL", "namespace": "http://purl.obolibrary.org/obo/CL_" }, { "prefix": "NCBITaxon", "namespace": "http://purl.obolibrary.org/obo/NCBITaxon_" }, { "prefix": "wbkg", "namespace": "https://apinatomy.org/uris/models/wbrcm/ids/" }, { "prefix": "too", "namespace": "https://apinatomy.org/uris/models/too-map/ids/" } ], "id": "sparc-nlp", "name": "Generated neurons", "author": "Natallia Kokash", "namespace": "nlp", "description": "Generated neuron chains from sparc-nlp.ttl", "imports": [ "https://raw.githubusercontent.com/open-physiology/apinatomy-models/master/models/wbrcm/source/wbrcm.json" ], "version": "e7ad45ba4832bce70547b4834acc89ae2de7c22d", "schemaVersion": "e0dba87327205156ed4e89dc42b1ab036d6a4465" }

bdebono commented 1 year ago

View of Prostate:13 from SCKAN explorer

Screen Shot 2023-09-12 at 12 01 15 PM
ddelpiano commented 1 year ago

Hello Bernard,

Jesus has some time allocated between today and tomorrow to provide you guys some assistance on the new problem reported, the older problem(s) have been kept intentionally stale waiting for the review of the codeathon branch as previously agreed.

Few notes related to the problem reported:

1. I can see that the neuron prostate/13 render correctly (screenshot attached) using the model generated at the codeathon, link here https://apinatomy.dev.metacell.us/?demoUrl=https://raw.githubusercontent.com/open-physiology/open-physiology-viewer/feature/83_toggle/test/data/prostate.xlsx. If I may, how has this subset been extracted from the model https://apinatomy.dev.metacell.us/?demoUrl=https://raw.githubusercontent.com/open-physiology/open-physiology-viewer/feature/83_toggle/test/data/prostate.xlsx ?

[image: scrnli_13_09_2023_19-03-14.png]

2. I was doing a quick diff from the model pointed and the one copy pasted by Natallia and I can see some differences highlighted below, are these expected?

original model: { "id": "prostate/13_lnk_1", "name": "Neural segment for ILX:0793878",

Natallia's model: { "id": "prostate/13_lnk_2", "name": "Neural segment for ILX:0793878",

3. Last but not least, I tried to follow Natallia's step to reproduce the problem but so far I haven't been able to get the generated groups, could you please advise?

To reproduce - load the input model below, wait until wbkg and too-map are imported, go to Code, locate "lt-soma-of-neuron", add the line "topology": "BAG2" and press the tick button in the right part of the screen to apply the changes. After than, return to the Viewer mode, "Generated group for ref_lt-soma-of-neuron_prostate/13_lnk_3" should appear in the Dynamic groups and inspected in the Neuroview. Many thanks, Dario

On Tue, 12 Sept 2023 at 18:03, Bernard de Bono @.***> wrote:

View of Prostate:13 from SCKAN explorer [image: Screen Shot 2023-09-07 at 12 18 11 PM] https://user-images.githubusercontent.com/837804/267392110-3860050c-3965-40d2-9672-70f680e002fa.png

— Reply to this email directly, view it on GitHub https://github.com/open-physiology/open-physiology-viewer/issues/289#issuecomment-1716010170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI7VD4N5IZEXYY7PRM7F7YLX2CBV5ANCNFSM6AAAAAA4VAU2BQ . You are receiving this because you were assigned.Message ID: @.***>

--

Dario Del Piano https://www.linkedin.com/in/dario-del-piano-a8a12937/ MetaCell, LLC / LTD http://metacell.us/ / @MetaCell https://twitter.com/MetaCell

albatros13 commented 1 year ago

The dataset was produced by my original converter script https://github.com/open-physiology/apinatomy-converter/blob/master/neuron_generator.py

The dataset does not neurulate because it has no closing dendrites (they are not in the model), so we artificially close the group by making soma a bag! This works consistently. I can think of the following reasons you could not reproduce it:

image

albatros13 commented 1 year ago

image

ddelpiano commented 1 year ago

image

That is the button I used, followed the steps you wrote but I don't see the generated groups when I go back to the viewer (and yes, I tried closing and reopening the sidebar). thx