xGRviaGenomicAnno
is supposed to conduct region-based enrichment
analysis for the input genomic region data (genome build h19), using
genomic annotations (eg active chromatin, transcription factor binding
sites/motifs, conserved sites). Enrichment analysis is based on
binomial test for estimating the significance of overlaps either at the
base resolution, at the region resolution or at the hybrid resolution.
Test background can be provided; by default, the annotatable will be
used.
xGRviaGenomicAnno(data.file, annotation.file = NULL, background.file =
NULL,
format.file = c("data.frame", "bed", "chr:start-end", "GRanges"),
build.conversion = c(NA, "hg38.to.hg19", "hg18.to.hg19"),
resolution = c("bases", "regions", "hybrid"),
background.annotatable.only = T, p.adjust.method = c("BH", "BY",
"bonferroni", "holm", "hochberg", "hommel"), GR.annotation = c(NA,
"Uniform_TFBS", "ENCODE_TFBS_ClusteredV3",
"ENCODE_TFBS_ClusteredV3_CellTypes", "Uniform_DNaseI_HS",
"ENCODE_DNaseI_ClusteredV3", "ENCODE_DNaseI_ClusteredV3_CellTypes",
"Broad_Histone", "SYDH_Histone", "UW_Histone", "FANTOM5_Enhancer_Cell",
"FANTOM5_Enhancer_Tissue", "FANTOM5_Enhancer_Extensive",
"FANTOM5_Enhancer",
"Segment_Combined_Gm12878", "Segment_Combined_H1hesc",
"Segment_Combined_Helas3", "Segment_Combined_Hepg2",
"Segment_Combined_Huvec",
"Segment_Combined_K562", "TFBS_Conserved", "TS_miRNA", "TCGA",
"ReMap_Public_TFBS", "ReMap_Public_mergedTFBS",
"ReMap_PublicAndEncode_mergedTFBS", "ReMap_Encode_TFBS",
"Blueprint_BoneMarrow_Histone", "Blueprint_CellLine_Histone",
"Blueprint_CordBlood_Histone", "Blueprint_Thymus_Histone",
"Blueprint_VenousBlood_Histone", "Blueprint_DNaseI",
"Blueprint_Methylation_hyper", "Blueprint_Methylation_hypo",
"EpigenomeAtlas_15Segments_E029", "EpigenomeAtlas_15Segments_E030",
"EpigenomeAtlas_15Segments_E031", "EpigenomeAtlas_15Segments_E032",
"EpigenomeAtlas_15Segments_E033", "EpigenomeAtlas_15Segments_E034",
"EpigenomeAtlas_15Segments_E035", "EpigenomeAtlas_15Segments_E036",
"EpigenomeAtlas_15Segments_E037", "EpigenomeAtlas_15Segments_E038",
"EpigenomeAtlas_15Segments_E039", "EpigenomeAtlas_15Segments_E040",
"EpigenomeAtlas_15Segments_E041", "EpigenomeAtlas_15Segments_E042",
"EpigenomeAtlas_15Segments_E043", "EpigenomeAtlas_15Segments_E044",
"EpigenomeAtlas_15Segments_E045", "EpigenomeAtlas_15Segments_E046",
"EpigenomeAtlas_15Segments_E047", "EpigenomeAtlas_15Segments_E048",
"EpigenomeAtlas_15Segments_E050", "EpigenomeAtlas_15Segments_E051",
"EpigenomeAtlas_15Segments_E062"), verbose = T,
RData.location = "http://galahad.well.ox.ac.uk/bigdata")
xRDataLoader
for detailsname
: the annotation name
nAnno
: the number of bases covered by that annotation. If
the background is provided, they are also restricted by this
nOverlap
: the number of regions overlapped between input
regions and annotation regions. If the background is provided, they are
also restricted by this
fc
: fold change
zscore
: z-score
pvalue
: p-value
adjp
: adjusted p-value. It is the p value but after being
adjusted for multiple comparisons
expProb
: the probability of expecting bases overlapped
between background regions and annotation regions
obsProb
: the probability of observing regions overlapped
between input regions and annotation regions
xEnrichViewer
## Not run:
# # Load the XGR package and specify the location of built-in data
# library(XGR)
# RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev"
#
# # Enrichment analysis for GWAS SNPs from ImmunoBase
# ## a) provide input data
# data.file <- "http://galahad.well.ox.ac.uk/bigdata/ImmunoBase_GWAS.bed"
#
# ## b) perform enrichment analysis using FANTOM expressed enhancers
# eTerm <- xGRviaGenomicAnno(data.file=data.file, format.file="bed",
# GR.annotation="FANTOM5_Enhancer_Cell", RData.location=RData.location)
#
# ## c) view enrichment results for the top significant terms
# xEnrichViewer(eTerm)
#
# ## d) barplot of enriched terms
# bp <- xEnrichBarplot(eTerm, top_num='auto', displayBy="fc")
# bp
#
# ## e) save enrichment results to the file called 'Regions_enrichments.txt'
# output <- xEnrichViewer(eTerm, top_num=length(eTerm$adjp),
# sortBy="adjp", details=TRUE)
# utils::write.table(output, file="Regions_enrichments.txt", sep="\t",
# row.names=FALSE)
# ## End(Not run)
Run the code above in your browser using DataLab