xGRcse | R Documentation

## Function to create a vector for genomic regions

### Description

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

### Usage

    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

    ## 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)