open-physiology / apinatomy-models

Working and published ApiNATOMY models
2 stars 4 forks source link

SAO terms in connectivity paths crashes axon/dendrite checking #28

Closed dbrnz closed 1 year ago

dbrnz commented 1 year ago

Noting this here so that these terms will get removed from the connectivity extract, but they appear to be the cause of:

   .
   .
    dendrite_terminal_regions = Apinatomy.find_terminal_region_layers(blob, Apinatomy.dendrite, bindex)
  File "/Users/dbro078/Library/Caches/pypoetry/virtualenvs/mapmaker-jbbtoRZc-py3.9/lib/python3.9/site-packages/mapknowledge/apinatomy.py", line 510, in find_terminal_region_layers
    return [(region, layer) for es in Apinatomy.find_terminals(blob, type)
  File "/Users/dbro078/Library/Caches/pypoetry/virtualenvs/mapmaker-jbbtoRZc-py3.9/lib/python3.9/site-packages/mapknowledge/apinatomy.py", line 511, in <listcomp>
    for region, layer in Apinatomy.find_region_layer(blob, es, bindex)]
  File "/Users/dbro078/Library/Caches/pypoetry/virtualenvs/mapmaker-jbbtoRZc-py3.9/lib/python3.9/site-packages/mapknowledge/apinatomy.py", line 497, in find_region_layer
    raise ValueError(f'len not matched {[c["id"] for c in collect]} '
ValueError: len not matched ['UBERON:0001989'] []
{'obj': 'SAO:420754792', 'pred': 'apinatomy:inheritedExternal*', 'sub': 'bolew:SCG-eILN-EM-d_lnk_1'}

Meanwhile I'll do more checking on the Python side (in mapknowledge/apinatomy.py).

dbrnz commented 1 year ago

@tgbugs have you had a chance to look at this? I've had a look at the Python code but I don't have sufficient ApiNATOMY knowledge to understand what you are trying to do and the reason for the above error.

dbrnz commented 1 year ago

Dendrite lookup fails for:

ilxtr:neuron-type-bolew-unbranched-20
ilxtr:neuron-type-bolew-unbranched-19
ilxtr:neuron-type-bolew-unbranched-18
ilxtr:neuron-type-bolew-unbranched-17
ilxtr:neuron-type-bolew-unbranched-16
ilxtr:neuron-type-bolew-unbranched-23
ilxtr:neuron-type-bolew-unbranched-22
ilxtr:neuron-type-bolew-unbranched-21
ilxtr:neuron-type-bolew-unbranched-27
ilxtr:neuron-type-bolew-unbranched-26
ilxtr:neuron-type-bolew-unbranched-13
ilxtr:neuron-type-bolew-unbranched-29
ilxtr:neuron-type-bolew-unbranched-28
ilxtr:neuron-type-bolew-unbranched-25
ilxtr:neuron-type-bolew-unbranched-24
ilxtr:neuron-type-bolew-unbranched-15
ilxtr:neuron-type-bolew-unbranched-14
ilxtr:neuron-type-splen-1

and axon lookup fails for:

ilxtr:neuron-type-bolew-unbranched-2
ilxtr:neuron-type-sdcol-o
ilxtr:neuron-type-sdcol-f 
tgbugs commented 1 year ago

@dbrnz https://github.com/AnatomicMaps/map-knowledge/pull/6 that should fix the issue.