BED6WithSeq2GRangesSeq {cleanUpdTSeq} | R Documentation

## Covert (extended) BED6 file to a GRanges object

### Description

Convert to a GRanges object from a (extended) BED6 file with at least six columns: chrom, chromStart, strEnd, name, score and strand, and optional upstream sequences (including pA sites) and downstream sequences of pA sites

### Usage

    BED6WithSeq2GRangesSeq(
      file,
      skip = 1L,
      withSeq = TRUE,
      upstream.seq.ind = 7L,
      downstream.seq.ind = 8L
    )

### Arguments

`file` | A character(1) vector, representing a path to a extended BED file containing at least six columns in the order of chrom, chromStart, strEnd, name, score and strand. The strand information must be designated as "+", or "-". Optional fields–upstream sequences (including pA sites) and downstream sequences of pA sites–are allowed. For more details about the BED format, see https://genome.ucsc.edu/FAQ/FAQformat.html#format1.
`skip` | A integer(1) vector, indicating how many rows (header lines) to skip when the BED file is read into R.
`withSeq` | A logical(1) vector, indicating that upstream and downstream sequences flanking pA sites are included in the file
`upstream.seq.ind` | An integer(1),vector delineating the column location of upstream sequences of the putative pA site
`downstream.seq.ind` | An integer(1),vector delineating the column location of downstream sequences of the putative pA site

### Value

An object of GRanges

### Author(s)

Haibo Liu, Lihua J. Zhu

### Examples

    testFile <- system.file("extdata", "test.bed",
                            package = "cleanUpdTSeq")
    peaks <- BED6WithSeq2GRangesSeq(file = testFile,
                                   skip = 1L, withSeq = TRUE)

[Package cleanUpdTSeq version 1.32.0 Index]