teEnrichment: Calculate tissue-specific gene enrichment using the...

Description Usage Arguments Value Author(s) Examples

View source: R/teEnrichment.R

Description

The teEnrichment function is used to calculate the enrichment of tissue-specific genes, given an input gene set. It uses tissue-specific genes defined by processing RNA-Seq datasets from human and mouse.

Usage

1
2
3
teEnrichment(inputGenes = NULL, rnaSeqDataset = 1,
  tissueSpecificGeneType = 1, multiHypoCorrection = TRUE,
  backgroundGenes = NULL)

Arguments

inputGenes

A GeneSet object containing the input genes, organism type ('Homo Sapiens' or 'Mus Musculus'), and gene id identifier (Gene Symbol or ENSEMBL identifier).

rnaSeqDataset

An integer describing the dataset to be used for enrichment analysis. 1 for 'Human Protein Atlas' (default), 2 for 'GTEx', 3 for 'Mouse ENCODE'. Default 1.

tissueSpecificGeneType

An integer describing the type of tissue- specific genes to be used. 1 for 'All' (default), 2 for 'Tissue-Enriched', 3 for 'Tissue-Enhanced', and 4 for 'Group-Enriched'. Default 1.

multiHypoCorrection

Flag to correct P-values for multiple hypothesis using BH method. Default TRUE.

backgroundGenes

A GeneSet object containing the background gene list, organism type ('Homo Sapiens' or 'Mus Musculus'), and gene id identifier (Gene Symbol or ENSEMBL identifier). The input genes must be present in the background gene list. If not provided all the genes will be used as background.

Value

The output is a list with four objects. The first object is the SummarizedExperiment object containing the enrichment results, the second and the third object contains the expression values and tissue-specificity information of the tissue-specific genes for genes from the input gene set, and the fourth is a GeneSet object containing genes that were not identified in the tissue-specific gene data.

Author(s)

Ashish Jain, Geetu Tuteja

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(dplyr)
library(ggplot2)
genes<-system.file('extdata', 'inputGenes.txt', package = 'TissueEnrich')
inputGenes<-scan(genes,character())
gs<-GeneSet(geneIds=inputGenes,organism='Homo Sapiens',
geneIdType=SymbolIdentifier())
output<-teEnrichment(gs)
seEnrichmentOutput<-output[[1]]
enrichmentOutput<-setNames(data.frame(assay(seEnrichmentOutput),
row.names = rowData(seEnrichmentOutput)[,1]),
colData(seEnrichmentOutput)[,1])
enrichmentOutput$Tissue<-row.names(enrichmentOutput)
#Plotting the P-Values
ggplot(enrichmentOutput,aes(x=reorder(Tissue,-Log10PValue),y=Log10PValue,
label = Tissue.Specific.Genes,fill = Tissue))+
geom_bar(stat = 'identity')+
labs(x='', y = '-LOG10(P-Value)')+
theme_bw()+
theme(legend.position='none')+
theme(plot.title = element_text(hjust = 0.5,size = 20),axis.title =
element_text(size=15))+
theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1),
panel.grid.major= element_blank(),panel.grid.minor = element_blank())

TissueEnrich documentation built on April 5, 2021, 6 p.m.