View source: R/01.BED6WithSeq2GRangesSeq.R
BED6WithSeq2GRangesSeq | R Documentation |
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
BED6WithSeq2GRangesSeq( file, skip = 1L, withSeq = TRUE, upstream.seq.ind = 7L, downstream.seq.ind = 8L )
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 |
An object of GRanges
Haibo Liu, Lihua J. Zhu
testFile <- system.file("extdata", "test.bed", package = "cleanUpdTSeq") peaks <- BED6WithSeq2GRangesSeq(file = testFile, skip = 1L, withSeq = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.