-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documentation: agea volumes examples
- Loading branch information
Showing
2 changed files
with
104 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# Loading the gene expression atlas" | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "48e25dbdfb3b180c" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "initial_id", | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import matplotlib.pyplot as plt\n", | ||
"from iblatlas.genomics import agea\n", | ||
"\n", | ||
"df_genes, gene_expression_volumes, atlas_agea = agea.load()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"Displaying a coronal and a sagittal slice.\n", | ||
"The top row is the diffusion MRI Allen template, the middle row corresponds to the brain regions annotations and the bottom row corresponds to the first gene expression volume." | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "62db803f3b14fc9" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"outputs": [], | ||
"source": [ | ||
"igenes = (0,)\n", | ||
"fig, axs = plt.subplots(3, 2, sharex=True, sharey=True)\n", | ||
"atlas_agea.plot_cslice(0, ax=axs[0, 0])\n", | ||
"atlas_agea.plot_cslice(0, ax=axs[1, 0], volume='annotation')\n", | ||
"atlas_agea.plot_cslice(0, ax=axs[2, 0], volume=gene_expression_volumes[igenes[0]], cmap='viridis')\n", | ||
"atlas_agea.plot_sslice(0, ax=axs[0, 1])\n", | ||
"atlas_agea.plot_sslice(0, ax=axs[1, 1], volume='annotation')\n", | ||
"atlas_agea.plot_sslice(0, ax=axs[2, 1], volume=gene_expression_volumes[igenes[0]], cmap='viridis')\n", | ||
"fig.tight_layout()" | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "d05447d166c56453" | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "9a7afbf944dd385c" | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |