# Reproducing "differential gene search" via API for mouse brain ISH data

**URL:** <https://community.brain-map.org/t/reproducing-differential-gene-search-via-api-for-mouse-brain-ish-data/293>\
**Category:** Technical\
**Tags:** atlas-mouse-brain-adult, how-to\
**Created:** [October 2, 2019, 6:47pm UTC](https://community.brain-map.org/t/reproducing-differential-gene-search-via-api-for-mouse-brain-ish-data/293 "2019-10-02T18:47:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbiancal](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tbiancal](https://community.brain-map.org/u/tbiancal)\
**Post date:** [October 2, 2019, 6:47pm UTC](https://community.brain-map.org/t/reproducing-differential-gene-search-via-api-for-mouse-brain-ish-data/293/1 "2019-10-02T18:47:30Z")

</div>

Hi,

I am in love with the “Differential search” function for the ISH data of the mouse brain and I wish to write a Python script that reproduces the search (eg) below programmatically.

 ![00%20AM](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/1X/c64e61cbdea8fdc77fc0d25c603f83692677fad0.png)

I then found this [very helpful doc](http://help.brain-map.org/display/api/Connected+Services+and+Pipes#ConnectedServicesandPipes-service::mouse_differential) that allows me to do so, but my results are not consistent with the website (I find more genes than when I query via the Allen website, although structures and dataset are the same).

I think that this is due to the threshold parameters: in the query to `system :: mouse_differential` I have 4 different thresholds: start/end threshold for either target or contrast. In the website, I only have one slider that controls one expression threshold that ranges from 0 to 7.

1. Could you please tell me how to reproduce differential gene search via URL/API that are consistent with Allen website?
2. I guess that means, could you tell me the 4 values of the thresholds that you use in Allen website ?
3. Would you recommend any particular threshold value to get biological significant results?

Thank you very much,

---

<div class="post-metadata">

**Author:** ![tbiancal](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tbiancal](https://community.brain-map.org/u/tbiancal)\
**Post date:** [October 2, 2019, 7:13pm UTC](https://community.brain-map.org/t/reproducing-differential-gene-search-via-api-for-mouse-brain-ish-data/293/2 "2019-10-02T19:13:20Z")

</div>

Actually I found the answer (and that was simple). By clicking the button I realized that the URL

[https://mouse.brain-map.org/search/show?page\_num=0&page\_size=20&no\_paging=false&domain1=8&domain2=985&domain1\_threshold=0,50&domain2\_threshold=1,50&image\_set=P56&search\_type=differential](https://mouse.brain-map.org/search/show?page_num=0&page_size=20&no_paging=false&domain1=8&domain2=985&domain1_threshold=0,50&domain2_threshold=1,50&image_set=P56&search_type=differential)

contains the thresholds. The default values are:  
target: start 0, end 50  
contrast: start 1, end 50.

Thank you!

---

<div class="post-metadata">

**Author:** ![lucasg](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/lucasg/32/35_2.png) [@lucasg](https://community.brain-map.org/u/lucasg)\
**Post date:** [October 3, 2019, 12:11am UTC](https://community.brain-map.org/t/reproducing-differential-gene-search-via-api-for-mouse-brain-ish-data/293/3 "2019-10-03T00:11:43Z")

</div>

Thanks a lot for following up with the solution!

I’m sure it will be appreciated by anyone else digging into the API.
