"source": "# Differential gene expression analysis in two brain regions\n\nJuGEx performs differential gene expresssion in two different brain regions, as described in the publication\n\n> *Sebastian Bludau, Thomas W. M\u00fchleisen, Simon B. Eickhoff, Michael J. Hawrylycz, Sven Cichon, Katrin Amunts. Integration of transcriptomic and cytoarchitectonic data implicates a role for MAOA and TAC1 in the limbic-cortical network. 2018, Brain Structure and Function. https://doi.org/10.1007/s00429-018-1620-6*\n\nFor the gene expression data, `siibra` accesses the Allen Brain Atlas API (\u00a9 2015 Allen Institute for Brain Science. Allen Brain Atlas API. Available from: brain-map.org/api/index.html). "
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Initialize the analysis\n\nThe analysis is initialized with a `siibra` atlas object. It will check if the parcellation selected in the atlas is suitable for performing the analysis, which includes to verify that the given atlas object provides maps in the MNI ICBM 152 space. We explicitely select the Julich-Brain probabilistic cytoarchitectonic maps, and tell the atlas to threshold the probability maps for filtering gene expressions instead of using the simplified labelled volume. "
"source": "### Configure the experiment with brain regions and candidate genes\n\nThe analysis is configured by specifying some candidate genes of interest, and two regions of interest (ROI) specified by brain area names that the atlas object can resolve. Note that the siibra atlas class does fuzzy string matching to resolve region names, so you can try with a simple name of the regions to see if siibra interprets them. Also, gene names can easily be looked up and autocompleted in siibra.gene_names. \n"
"source": "### Look at filtered positions of microarray samples in MNI space"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Let's have a look at the sample positions that have been found in the Allen atlas. Since we configured brainscapes to prefer thresholded continuous maps for region filtering over the simplified parcellation map, we also plot the probability maps here."
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "from nilearn import plotting\n\nfor regionname in candidate_regions:\n samples = jugex.get_samples(regionname)\n region = atlas.get_region(regionname)\n pmap = region.get_regional_map(\n siibra.spaces.MNI152_2009C_NONL_ASYM, \n siibra.MapType.CONTINUOUS) \n # we could have also used the simple parcellation map mask as follows:\n # mask = atlas.get_mask(bs.spaces.MNI_152_ICBM_2009C_NONLINEAR_ASYMMETRIC)\n display = plotting.plot_roi(pmap.fetch(),cmap=\"jet\",title=region.name)\n display.add_markers([s['mnicoord'] for s in samples.values()])"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ""
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
\ No newline at end of file
%% Cell type:markdown id: tags:
# Differential gene expression analysis in two brain regions
JuGEx performs differential gene expresssion in two different brain regions, as described in the publication
> *Sebastian Bludau, Thomas W. Mühleisen, Simon B. Eickhoff, Michael J. Hawrylycz, Sven Cichon, Katrin Amunts. Integration of transcriptomic and cytoarchitectonic data implicates a role for MAOA and TAC1 in the limbic-cortical network. 2018, Brain Structure and Function. https://doi.org/10.1007/s00429-018-1620-6*
The analysis is initialized with a `siibra` atlas object. It will check if the parcellation selected in the atlas is suitable for performing the analysis, which includes to verify that the given atlas object provides maps in the MNI ICBM 152 space. We explicitely select the Julich-Brain probabilistic cytoarchitectonic maps, and tell the atlas to threshold the probability maps for filtering gene expressions instead of using the simplified labelled volume.
### Configure the experiment with brain regions and candidate genes
The analysis is configured by specifying some candidate genes of interest, and two regions of interest (ROI) specified by brain area names that the atlas object can resolve. Note that the siibra atlas class does fuzzy string matching to resolve region names, so you can try with a simple name of the regions to see if siibra interprets them. Also, gene names can easily be looked up and autocompleted in siibra.gene_names.
The aggregated input parameters can be stored to disk.
%% Cell type:code id: tags:
``` python
jugex.save('jugex_{}_{}.json'.format(
"_".join(candidate_regions),
"_".join(candidate_genes)))
```
%% Cell type:markdown id: tags:
### Look at filtered positions of microarray samples in MNI space
%% Cell type:markdown id: tags:
Let's have a look at the sample positions that have been found in the Allen atlas. Since we configured brainscapes to prefer thresholded continuous maps for region filtering over the simplified parcellation map, we also plot the probability maps here.
%% Cell type:code id: tags:
``` python
fromnilearnimportplotting
forregionnameincandidate_regions:
samples=jugex.get_samples(regionname)
region=atlas.get_region(regionname)
pmap=region.get_regional_map(
siibra.spaces.MNI152_2009C_NONL_ASYM,
siibra.MapType.CONTINUOUS)
# we could have also used the simple parcellation map mask as follows: