# Matrix with the number of cells of each celltype, found in each mouse brain region

**URL:** <https://community.brain-map.org/t/matrix-with-the-number-of-cells-of-each-celltype-found-in-each-mouse-brain-region/3115>\
**Category:** General\
**Created:** [February 28, 2024, 7:23pm UTC](https://community.brain-map.org/t/matrix-with-the-number-of-cells-of-each-celltype-found-in-each-mouse-brain-region/3115 "2024-02-28T19:23:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NathanSkene](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/nathanskene/32/1627_2.png) [@NathanSkene](https://community.brain-map.org/u/NathanSkene)\
**Post date:** [February 28, 2024, 7:23pm UTC](https://community.brain-map.org/t/matrix-with-the-number-of-cells-of-each-celltype-found-in-each-mouse-brain-region/3115/1 "2024-02-28T19:23:42Z")

</div>

I’m interested in getting a matrix, based on the data from this paper: [A high-resolution transcriptomic and spatial atlas of cell types in the whole mouse brain | Nature](https://www.nature.com/articles/s41586-023-06812-z)

I understand that the paper determined the cell type of each cell, from the spatial transcriptomic data, and then registered it against brain regions.

I would like the matrix, with X rows and Y columns, where there are X cell types in the dataset, and Y brain regions. Each entry Zij would be the number of cells (from cell type i) detected in brain region j.

Has a matrix like this already been computed? If not, how could I compute it from the publicly available data? Thanks

---

<div class="post-metadata">

**Author:** ![mkunst23](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/mkunst23/32/320_2.png) [@mkunst23](https://community.brain-map.org/u/mkunst23)\
**Post date:** [March 1, 2024, 5:24pm UTC](https://community.brain-map.org/t/matrix-with-the-number-of-cells-of-each-celltype-found-in-each-mouse-brain-region/3115/2 "2024-03-01T17:24:33Z")

</div>

[subclass\_per\_region.csv](https://community.brain-map.org/uploads/short-url/y1mT2LAkZYv9BEsHXNNuemD5FBh.csv) (194.5 KB)

Hi Nathan, I have attached a csv file with the requested data. It is at the subclass level which is what we used for the paper. I hope that helps.

Michael

---

<div class="post-metadata">

**Author:** ![NathanSkene](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/nathanskene/32/1627_2.png) [@NathanSkene](https://community.brain-map.org/u/NathanSkene)\
**Post date:** [March 1, 2024, 6:12pm UTC](https://community.brain-map.org/t/matrix-with-the-number-of-cells-of-each-celltype-found-in-each-mouse-brain-region/3115/3 "2024-03-01T18:12:13Z")

</div>

That’s amazing, thanks Michael, thats a huge help.

The ontology used, seems to use the same acronyms used by the Allen’s interactive atlas viewer. Is there an ontology API / package I can use to work with this? E.g. to get the acronyms for all regions that are descendents of hypothalamus?
