Learn R Programming

XGR (version 1.1.4)

xRPS: Function to calculate regulatory potential scores for genomic regions using genomic annotations

Description

xRPS is supposed to calculate regulatory potential scores for genomic regions using genomic annotations.

Usage

xRPS(data, format = c("data.frame", "bed", "chr:start-end", "GRanges"),
build.conversion = c(NA, "hg38.to.hg19", "hg18.to.hg19"),
GR.annotation = c("FANTOM5_Enhancer_Cell", "FANTOM5_Enhancer_Tissue",
"FANTOM5_CAT_Cell", "FANTOM5_CAT_Tissue", "GWAScatalog_alltraits",
"ENCODE_DNaseI_ClusteredV3", "ENCODE_TFBS_ClusteredV3",
"EpigenomeAtlas_15Segments", "RecombinationRate", "phastCons100way",
"phyloP100way"), verbose = T,
RData.location = "http://galahad.well.ox.ac.uk/bigdata")

Arguments

data

input genomic regions (GR). If formatted as "chr:start-end" (see the next parameter 'format' below), GR should be provided as a vector in the format of 'chrN:start-end', where N is either 1-22 or X, start (or end) is genomic positional number; for example, 'chr1:13-20'. If formatted as a 'data.frame', the first three columns correspond to the chromosome (1st column), the starting chromosome position (2nd column), and the ending chromosome position (3rd column). If the format is indicated as 'bed' (browser extensible data), the same as 'data.frame' format but the position is 0-based offset from chromomose position. If the genomic regions provided are not ranged but only the single position, the ending chromosome position (3rd column) is allowed not to be provided. The data could also be an object of 'GRanges' (in this case, formatted as 'GRanges')

format

the format of the input data. It can be one of "data.frame", "chr:start-end", "bed" or "GRanges"

build.conversion

the conversion from one genome build to another. The conversions supported are "hg38.to.hg19" and "hg18.to.hg19". By default it is NA (no need to do so)

GR.annotation

the genomic regions of annotation data. Pre-built genomic annotation data are detailed in the section 'Note'

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to false for no display

RData.location

the characters to tell the location of built-in RData files. See xRDataLoader for details

Value

a GenomicRanges object appended a metacolumn 'RPS'

See Also

xEnrichViewer

Examples

Run this code
# 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"

# transcribed lncRNAs
FANTOM5_CAT <- xRDataLoader('FANTOM5_CAT',
RData.location=RData.location)
GR_lncRNA <- FANTOM5_CAT[grepl('lncRNA',FANTOM5_CAT$Class)]
names(GR_lncRNA) <- NULL
data <- GR_lncRNA
# RPS calculation
dGR <- xRPS(data, format="GRanges",
GR.annotation=c("FANTOM5_CAT_Cell","FANTOM5_CAT_Tissue"),
RData.location=RData.location)
# }

Run the code above in your browser using DataLab