# Selecting connectivity data with injection into particular hemisphere

**URL:** <https://community.brain-map.org/t/selecting-connectivity-data-with-injection-into-particular-hemisphere/2095>\
**Category:** Technical\
**Tags:** atlas-mouse-brain-connectivity, how-to, allensdk\
**Created:** [January 23, 2023, 2:19pm UTC](https://community.brain-map.org/t/selecting-connectivity-data-with-injection-into-particular-hemisphere/2095 "2023-01-23T14:19:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikharitonov](https://avatars.discourse-cdn.com/v4/letter/i/ad7895/32.png) [@ikharitonov](https://community.brain-map.org/u/ikharitonov)\
**Post date:** [January 23, 2023, 2:19pm UTC](https://community.brain-map.org/t/selecting-connectivity-data-with-injection-into-particular-hemisphere/2095/1 "2023-01-23T14:19:42Z")

</div>

Hi,

I am trying to filter out unionized connectivity data based on the hemisphere which the injection was made into. For example, both experiments with ids 272699357 and 267029447 were injected into structure with id 795 (Periaqueductal gray). To retrieve data, I make the ProjectionStructureUnionize RMA query in Python, specifying is\_injection as True and section\_data\_set\_id as the experiment id. Then I select data by specifying the structure of interest (id 795). This gives:

Exp 272699357

| | hemisphere\_id | normalized\_projection\_volume | structure\_id | max\_voxel\_x | max\_voxel\_y | max\_voxel\_z |
| --- | --- | --- | --- | --- | --- | --- |
| 8 | 1 | 0.043593 | 795 | 9570 | 3110 | 5640 |
| 43 | 3 | 0.689372 | 795 | 9570 | 3110 | 5640 |

Exp 267029447

| | hemisphere\_id | normalized\_projection\_volume | structure\_id | max\_voxel\_x | max\_voxel\_y | max\_voxel\_z |
| --- | --- | --- | --- | --- | --- | --- |
| 26 | 2 | 0.814914 | 795 | 8620 | 3820 | 5870 |
| 44 | 3 | 0.814914 | 795 | 8620 | 3820 | 5870 |

Why is the projection data in the entry with hemisphere\_id = 3 equal to the other entry for one experiment and different for another (identical max voxel coordinates suggest it’s the same injection)? Some of the other experiments I’ve tested do not have entries with hemisphere\_id other than 3. How do I make sense of this?

What is the best approach for making sure that the injection sites of several experiments are located in a specified hemisphere?

Thank you!

---

<div class="post-metadata">

**Author:** ![lydian](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/lydian/32/174_2.png) [@lydian](https://community.brain-map.org/u/lydian)\
**Post date:** [February 10, 2023, 7:19pm UTC](https://community.brain-map.org/t/selecting-connectivity-data-with-injection-into-particular-hemisphere/2095/2 "2023-02-10T19:19:57Z")

</div>

In the first case (272699357), the injection site span both hemispheres. The table give you the value in each hemisphere and then both hemispheres together.

[Projection High Resolution Image Viewer :: Allen Brain Atlas: Mouse Connectivity (brain-map.org)](https://connectivity.brain-map.org/projection/experiment/siv/272699357?imageId=272699691&imageType=TWO_PHOTON,SEGMENTATION&initImage=TWO_PHOTON&x=16697&y=9378&z=2)

In the second case (267029447), the injection side is in one hemisphere only. Therefore the value you get for the injection hemisphere and the sum of both hemisphere would be the same

[Projection High Resolution Image Viewer :: Allen Brain Atlas: Mouse Connectivity (brain-map.org)](https://connectivity.brain-map.org/projection/experiment/siv/267029447?imageId=267029794&imageType=TWO_PHOTON,SEGMENTATION&initImage=TWO_PHOTON&x=16596&y=12383&z=2)

If you are looking for injection that is only in one hemisphere you need to find the cases where value in one or the other hemisphere equal to the sum of both hemispheres.

Hope this helps
