Skip to content

Commit

Permalink
Alyx queries brain region documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
oliche committed Jan 24, 2022
1 parent 2459f3d commit e965df8
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions docs/notebooks/useful_alyx_queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,31 @@
" django='subject__actions_sessions__procedures__name,Histology')\n",
"```\n",
"\n",
"### list sessions having specific channel locations (hierarchical, will fetch everything below)\n",
"### list experiments spanning channel locations\n",
"By default the channels are assigned to the regions ID available in the Allen Institute brain atlas volume.\n",
"Users may want to query higher level regions, so the query will return all insertions or sessions that have at least one channel in the brain region or in one of its descendants.\n",
"For example a query in Somatomotor areas would get all the leaf nodes belonging to that region and encompass somatomotor layers and primary and secondary motor areas.\n",
"\n",
"The table of brain regions as per the Allen Atlas is available [on alyx](https://openalyx.internationalbrainlab.org/admin/experiments/brainregion/)\n",
"\n",
"For sessions:\n",
"```python\n",
"ses = one.alyx.rest('sessions', 'list', atlas_id=500)\n",
"ses = one.alyx.rest('sessions', 'list', atlas_acronym=\"MO\")\n",
"ses = one.alyx.rest('sessions', 'list', atlas_name=\"Somatomotor areas\")\n",
"\n",
"```\n",
"### list sessions that do not have matlab in the project name\n",
"\n",
"For insertions:\n",
"```python\n",
"ses = one.alyx.rest('sessions', 'list', django='~project__name__icontains,matlab')\n",
"insertions = one.alyx.rest('insertions', 'list', atlas_id=500)\n",
"insertions = one.alyx.rest('insertions', 'list', atlas_acronym=\"MO\")\n",
"insertions = one.alyx.rest('insertions', 'list', atlas_name=\"Somatomotor areas\")\n",
"```\n",
"\n",
"### list trajectories with channels in given brain region\n",
"\n",
"### list sessions that do not have matlab in the project name\n",
"```python\n",
"trajs = one.alyx.rest('trajectories', 'list', django='channels__brain_region__name__icontains,'\n",
" 'Entorhinal area medial part dorsal zone '\n",
" 'layer 2')\n",
"ses = one.alyx.rest('sessions', 'list', django='~project__name__icontains,matlab')\n",
"```\n",
"\n",
"### list insertions that have alignment resolved\n",
Expand Down

0 comments on commit e965df8

Please sign in to comment.