ont.children | R Documentation |
Given a stucture label in the Allen Brain Atlas, this function will find all its descendants structures in the the grid annotations
ont.children(parents)
parents |
Label number of Parent Structure. This parameter is vectorized, so you can specify multiply parents. The return will be a list of same length as the number of parents. |
The label number of all descendant structures. These structures can be found in the 200 um grid labels for gene expression analysis
# In this example, we will find the gene expression of Pdyn in the Hippocampal formation. # First we download the gene expression file from the Allen Brain Institute # In this example, I downloaded Pdyn expression energy (http://api.brain-map.org/grid_data/download/71717084) # Then Unzipped it, and renamed the energy.raw file to Pdyn_energy_experiment71717084.raw # I included it in this library as an example # Also, download Grid Labels from the Allen Brain Institute # In this example, I downloaded Grid Labels from (http://download.alleninstitute.org/informatics-archive/current-release/mouse_annotation/P56_Mouse_gridAnnotation.zip), then unzipped it. # I included it in this library as an example though it is a good idea to download it yourself to keep it updated # Read Gene expression file genefilename=system.file('extdata/Pdyn_energy_experiment71717084.raw',package="ABIgeneRMINC") gene.expression=read.raw.gene(genefilename) # Read Labels labelfilename=system.file('extdata/gridAnnotation.raw',package="ABIgeneRMINC") labels.grid=read.raw.gene(labelfilename,labels=TRUE) # The hippocampal formation has many Ontology Structure Descendants. We need to find them. # Find hippocampal formation structure number data(AllStructureLabels) parent.label=subset(AllStructureLabels,name=='Hippocampal formation')$id #the sturcture number is 1089 # Find Descendant labels child.labels=ont.children(parent.label)[[1]] # Unionize over all the children unionize(gene.expression,child.labels,labels.grid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.