bedGraphFromGR: Convert a GemomicRanges object (1-based close) in a dataframe...

Description Usage Arguments Value Examples

View source: R/myGRBasicFunctions.R

Description

Convert a GemomicRanges object (1-based close) in a dataframe like bedgraphs (0-based half open)

Usage

1

Arguments

gr

a GenomicRanges object

Value

a data frame with 4 columns (seqnames, start, end, score)

Examples

1
2
3
4
5
6
7
8
gr <- GenomicRanges::GRanges(seqnames = "chr1",
                             ranges = IRanges::IRanges(start = c(1, 11),
                                                       end = c(10, 12)),
                             score = c(20, 30))
bedGraphFromGR(gr)
#   seqnames start end score
# 1     chr1     0  10    20
# 2     chr1    10  12    30

lldelisle/usefulLDfunctionsGR documentation built on Nov. 25, 2019, 11:24 a.m.