xGRcse: Function to create a vector storing genomic regions

Description Usage Arguments Value See Also Examples

View source: R/xGRcse.r

Description

xGRcse is supposed to create genomic regions in the format of 'chr:start-end'.

Usage

1
xGRcse(data, format = c("GRanges", "data.frame", "bed"))

Arguments

data

input genomic regions (GR). 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", "bed" or "GRanges"

Value

a vector for genomic regions the format of 'chrN:start-end'

See Also

xGRcse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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"

# a) provide the genomic regions
## load ImmunoBase
ImmunoBase <- xRDataLoader(RData.customised='ImmunoBase',
RData.location=RData.location)
## get lead SNPs reported in AS GWAS and their significance info (p-values)
gr <- ImmunoBase$AS$variant

# b) create a GRanges object
cse <- xGRcse(gr)

## End(Not run)

XGR documentation built on Jan. 8, 2020, 5:06 p.m.

Related to xGRcse in XGR...