Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/get_annotated_genes.R
Uses an object returned from aba_enrich
as input and returns the brain regions that are significantly (given a FWER-threshold) enriched, together with the genes that are expressed in those brain regions (i.e. are 'annotated' to the brain regions).
Alternatively, also user-defined brain regions, dataset and expression cutoffs can be used as input.
1 2 |
res |
an object returned from |
fwer_threshold |
numeric defining the FWER-threshold.
Given |
background |
logical indicating whether background genes should be included. Only used when |
structure_ids |
vector of brain structure IDs, e.g. 'Allen:10208'. If |
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.
Only used when |
cutoff_quantiles |
vector of numeric values between 0 and 1.
They define the expression quantiles (across all genes) which are used as cutoffs to decide whether a gene counts as expressed (and gets annotated to a brain region) or not.
Only used when |
genes |
optional vector of gene identifiers, either Entrez-ID, Ensembl-ID or gene-symbol. If defined, only annotations of those genes are returned.
If not defined, all expressed genes from Allen Brain Atlas are returned. Only used when |
Genes get annotated to a brain region when their expression value in that brain region, which is provided by the Allen Brain Atlas, exceeds a certain cutoff.
Multiple cutoffs can be used.
They are defined as quantiles of gene expression across all genes and brain regions.
An expression cutoff of e.g. 0.8 means that only genes with expression levels higher than 80% of all measured values count as 'expressed' and get annotated to the corresponding brain region.
Note that those annotations are inherited by all superstructures (parent nodes).
When the 'dev_effect' dataset is used as dataset
-argument, the expression value is replaced by a measure of how much a gene's expression changes during the development (prenatal to adult).
Genes with a developmental score higher than the cutoff then get annotated to the brain regions.
A data frame with the age category, the brain region ID, the expression cutoff quantile and the annotated genes for significantly enriched or user-defined brain-region/expression-cutoff combinations.
If res
was given as input, two additional columns are added: the FWER and the score which was used for the genes in the aba_enrich
input (1/0 for candidate and background genes for the hypergeometric test or scores for the wilcoxon rank sum test).
Given res
as input, the output is ordered by the FWER, else it is ordered by the expression cutoff.
Steffi Grote
[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.
Available from: http://human.brain-map.org/
[4] Allen Institute for Brain Science. BrainSpan Atlas of the Developing Human Brain.
Available from: http://brainspan.org/
browseVignettes("ABAEnrichment")
browseVignettes("ABAData")
aba_enrich
get_name
get_id
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#### Note that arguments 'cutoff_quantiles' and 'n_randsets' are reduced
#### to lower computational time in the examples.
## perform an enrichment analysis
## for expression of 7 candidate and 7 background genes
## and get candidate genes annotated to brain regions that have a FWER < 0.05
set.seed(123)
gene_ids = c('PENK', 'COCH', 'PDYN', 'CA12', 'SYNDIG1L', 'MME',
'ANO3', 'KCNJ6', 'ELAVL4', 'BEAN1', 'PVALB', 'EPN3', 'PAX2', 'FAB12')
is_candidate = rep(c(1,0), each=7)
genes = data.frame(gene_ids, is_candidate)
res = aba_enrich(genes, dataset='5_stages', cutoff_quantiles=c(0.3,0.5,0.7,0.9),
n_randset=100)
anno = get_annotated_genes(res, fwer_threshold=0.05)
head(anno)
## find out which of the above genes have expression above
## the 50% and 70% expression-cutoff, respectively,
## in the Cerebellar Cortex of the developing human brain (Allen:10657)
get_annotated_genes(structure_ids="Allen:10657", dataset="5_stages",
cutoff_quantiles=c(0.5,0.7), genes=gene_ids)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.