BED2GRangesSeq {cleanUpdTSeq} | R Documentation

## BED2GRangesSeq

### Description

This function converts an object of data.frame from a bed file with sequence information to GRanges with sequence information.

### Usage

    BED2GRangesSeq(data.BED, header = FALSE,
                   upstream.seq.ind = 7, downstream.seq.ind = 8,
                   withSeq)

### Arguments

`data.BED` | An object of data.frame from a bed file. The data.frame should at least contains 3 required fields: chrome, chromStart, chromend. The fourth field for "name" is suggested for keeping track of the putative polyadenylation site from the input to the output. The sixth field for "strand" is suggested, as this will affect the classification. For this function, the bed data.frame may also contain two additional fields for the sequence upstream and downstream of the putative pA site. If these are not supplied, the sequence may be obtained when the feature vector is built. Please see http://genome.ucsc.edu/FAQ/FAQformat.html#format1 for more information about the bed file format.
`header` | header = Boolean TRUE if the first row is the header FALSE if the first row is data
`upstream.seq.ind` | upstream.seq.ind = int, to delineate the column location containing the sequence upstream of the putative pA site
`downstream.seq.ind` | downstream.seq.ind = int, to delineate the column location containing the sequence downstream of the putative pA site
`withSeq` | TRUE indicates that there are upstream and downstream sequences in the file, FALSE indicates that there is no upstream or downstream sequences in the file

### Value

Returns object of GRanges

### Author(s)

Sarah Sheppard, Jianhong Ou, Nathan Lawson, Lihua Julie Zhu

### Examples

    testFile <- system.file("extdata", "test.bed", package="cleanUpdTSeq")
    testSet <- read.table(testFile, sep = "\t", header = TRUE)
    peaks <- BED2GRangesSeq(testSet,withSeq=TRUE)

[Package cleanUpdTSeq version 1.28.0 Index]