Skip to content

Commit

Permalink
add transmitter names to plot
Browse files Browse the repository at this point in the history
  • Loading branch information
dickscheid committed Dec 17, 2024
1 parent 2a6a4ea commit dfbb37f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions figure-5-comparative-analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"metadata": {},
"outputs": [],
"source": [
"receptors = ['M1', 'M2', 'M3', '5-HT1A', '5-HT2', 'D1'] # interesting receptors\n",
"receptors = ['M1', 'M2', 'M3', '5-HT1A', '5-HT2', 'D1'] # selection of monogenetic receptors\n",
"genes=[\n",
" siibra.vocabularies.GENE_NAMES.CHRM1,\n",
" siibra.vocabularies.GENE_NAMES.CHRM2,\n",
Expand Down Expand Up @@ -112,6 +112,10 @@
" fcopy = f\n",
" fcopy._data_cached = f.data.loc[receptors]\n",
" f.plot(ax = axs[j+1, i], **plotargs)\n",
" if modality == siibra.features.molecular.ReceptorDensityFingerprint:\n",
" # add neurotransmitter names to receptor names in xtick labels\n",
" transmitters = [re.sub(r'(^.*\\()|(\\))', '', n) for n in f.neurotransmitters]\n",
" axs[j+1, i].set_xticklabels([f\"{r}\\n({n})\" for r, n in zip(f.receptors, transmitters)])\n",
" if ymax[j] is not None:\n",
" axs[j+1, i].set_ylim(0, ymax[j])\n",
" if 'std' in axs[j+1, i].yaxis.get_label_text():\n",
Expand Down Expand Up @@ -172,15 +176,6 @@
"### Retrieve cortical patches"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pmap_volume.fetch()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -259,7 +254,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "venv",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -273,7 +268,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit dfbb37f

Please sign in to comment.