# Soma size in Cell Types SDK

**URL:** <https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707>\
**Category:** Technical\
**Tags:** atlas-cell-types, celltype, api, allensdk\
**Created:** [September 28, 2020, 7:45pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707 "2020-09-28T19:45:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [September 28, 2020, 7:45pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707/1 "2020-09-28T19:45:01Z")

</div>

Hey there –

I’m interested in looking for correlations between soma size and input resistance. I’m familiar with working with the AllenSDK for the Cell Types data and how to get the pre-computed metrics for the electrophysiology of the cell. I’m less familiar with the morphology side of things. 🙂

Is there a computed soma size (e.g., diameter, surface area) in any of the SDK tools for the Cell Types data? I see by using `morphology = ctc.get_reconstruction(cell_id)`, in “`morphology.soma`” there is “radius” but my understanding from the documentation is that this is the radius of the node (?)

I see on the API there is usefully a tag “`soma-surface`” (which seems to be surface area in µm) but I was hoping to get it through the SDK if possible and thought I’d ask.

Thanks!  
Ashley

---

<div class="post-metadata">

**Author:** ![wayne](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/wayne/32/16_2.png) [@wayne](https://community.brain-map.org/u/wayne)\
**Post date:** [September 29, 2020, 3:45pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707/2 "2020-09-29T15:45:05Z")

</div>

Hi Ashley. We are doing all new neuron morphology development in a new repo, aptly named [neuron\_morphology](https://github.com/alleninstitute/neuron_morphology).

This function will calculate soma surface:

> <https://github.com/AllenInstitute/neuron_morphology/blob/dev/neuron_morphology/features/soma.py#L36>

---

<div class="post-metadata">

**Author:** ![gouwens](https://avatars.discourse-cdn.com/v4/letter/g/bcef8e/32.png) [@gouwens](https://community.brain-map.org/u/gouwens)\
**Post date:** [September 29, 2020, 8:35pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707/3 "2020-09-29T20:35:06Z")

</div>

Just to follow on to Wayne’s answer - the SWCs that we use to represent morphologies do just represent the soma as a sphere (unlike some other morphology file formats that have a more detailed soma outline or surface), so all you actually need to calculate the surface area is the radius of the soma node. You can see in the function Wayne linked that it’s just using that value in the formula for the surface area of a sphere.

---

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [September 29, 2020, 9:15pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707/4 "2020-09-29T21:15:02Z")

</div>

Gotcha! So the radius of the node in the SWC _is_ informative! That’s useful and definitely simplifies things. I’ll stick with 4 x pi x r^2. 🙂 Thank you!

---

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [September 29, 2020, 9:15pm UTC](https://community.brain-map.org/t/soma-size-in-cell-types-sdk/707/5 "2020-09-29T21:15:49Z")

</div>

This is great to know about, thanks!
