ABAEnrichment (version 1.2.2)

plot_expression: Plot expression data for given genes and brain structure ids

Description

The function produces a heatmap (heatmap.2 from package gplots) of gene expression in defined brain regions from adult or developing humans, or a developmental effect score for the developing human brain. Expression data is obtained from the Allen Brain Atlas project [1-4], averaged across donors, and for the developing human brain divided into five major age categories. If gene_ids and dataset are not specified, the genes and dataset from the last enrichment analysis with aba_enrich are used, since it may be a common case to first run the enrichment analysis and then look at the expression data. If a requested brain region has no expression data annotated, data from sampled substructures of this region is returned.

Usage

plot_expression(structure_ids, gene_ids = NA, dataset = NA, background = FALSE, dendro = TRUE, age_category = 1)

Arguments

structure_ids
vector of brain structure ids, e.g. "Allen:10208".
gene_ids
vector of gene identifiers, either Entrez-ID, Ensembl-ID or HGNC-symbol. If not defined, genes from previous enrichment analysis with aba_enrich are used.
dataset
'adult' for the microarray dataset of adult human brains; '5_stages' for RNA-seq expression data of the developing human brain, grouped into 5 developmental stages; 'dev_effect' for a developmental effect score. If not defined, dataset from last enrichment analysis with aba_enrich are used.
background
logical indicating whether expression from background genes should be included. Only used when gene_ids and dataset are NA so that genes from the last enrichment analysis with aba_enrich are used and when this analysis was performed using the hypergeometric test.
dendro
logical indicating whether rows and columns should be rearranged with a dendrodram based on row/column means (using hclust). If FALSE and if gene_ids and dataset are NA so that genes from the last enrichment analysis with aba_enrich are used, the genes are arranged according to the last aba_enrich execution: for a hypergeometric test the genes are grouped into candidate and background genes (indicated by a coloured side-bar with red and black, respectively) and for a Wilcoxon rank test the genes are ordered by the scores which they were given for the Wilcoxon rank test, which are also indicated by a side-bar.
age_category
an integer between 1 and 5 indicating the age category if dataset = '5_stages'.

Value

Invisibly, a list with components
rowInd
row index permutation vector as returned by order.dendrogram
colInd
column index permutation vector.
call
the matched call
carpet
reordered 'x' values used to generate the main 'carpet'
rowDendrogram
row dendrogram, if present
colDendrogram
column dendrogram, if present
breaks
values used for color break points
col
colors used
colorTable
A three-column data frame providing the lower and upper bound and color for each bin

References

[1] Hawrylycz, M.J. et al. (2012) An anatomically comprehensive atlas of the adult human brain transcriptome, Nature 489: 391-399. doi:10.1038/nature11405 [2] Miller, J.A. et al. (2014) Transcriptional landscape of the prenatal human brain, Nature 508: 199-206. doi:10.1038/nature13185 [3] Allen Institute for Brain Science. Allen Human Brain Atlas [Internet]. Available from: http://human.brain-map.org/ [4] Allen Institute for Brain Science. BrainSpan Atlas of the Developing Human Brain [Internet]. Available from: http://brainspan.org/

See Also

vignette("ABAEnrichment",package="ABAEnrichment") vignette("ABAData",package="ABAData") get_expression aba_enrich get_name get_sampled_substructures heatmap.2 hclust

Examples

Run this code
## plot expression data for six genes in the brain structure 'Allen:4010' with dendrogram
plot_expression(structure_ids=c("Allen:4010"),gene_ids=c(324,8312,673,1029,64764,1499),
  dataset="adult")
## plot expression data of six genes in two brain regions from children (age_category 3) 
## without dendrogram
plot_expression(structure_ids=c("Allen:10657","Allen:10208"), 
  gene_ids=c("ENSG00000168036", "ENSG00000157764", "ENSG00000182158", "ENSG00000147889"),
  dataset="5_stages",dendro=FALSE, age_category=3)

Run the code above in your browser using DataLab