convertUtils {Rariant} | R Documentation |
Utility functions to convert between 'GRanges' and 'character' objects.
gr2pos(x, range = TRUE) pos2gr(x)
x |
GRanges or character object. |
range |
Should the range instead of the start position be returned? |
A GRanges object or character object, with the positions.
library(GenomicRanges) gr = GRanges(1:2, IRanges(1:2, width = 1)) pos = gr2pos(gr) gr2 = pos2gr(pos) identical(gr, gr2)