convert-utils: Position converters

Description Usage Arguments Value Examples

Description

Utility functions to convert between 'GRanges' and 'character' objects.

Usage

1
2
3

Arguments

x

GRanges or character object.

range

Should the range instead of the start position be returned?

Value

A GRanges object or character object, with the positions.

Examples

1
2
3
4
5
6
7
8
library(GenomicRanges)

gr = GRanges(1:2, IRanges(1:2, width = 1))

pos = gr2pos(gr)
gr2 = pos2gr(pos)

identical(gr, gr2)

Rariant documentation built on Nov. 8, 2020, 6:56 p.m.