data.frame2GRanges {bsseq} | R Documentation |
Converting a data.frame to a GRanges object. The data.frame needs columns like chr, start and end (strand is optional). Additional columns may be kept in the GRanges object.
data.frame2GRanges(df, keepColumns = FALSE, ignoreStrand = FALSE)
df |
A |
keepColumns |
In case |
ignoreStrand |
In case |
An object of class GRanges
In case df
has rownames
, they will be used as
names
for the return object.
Kasper Daniel Hansen khansen@jhsph.edu
df <- data.frame(chr = "chr1", start = 1:3, end = 2:4, strand = c("+","-","+")) data.frame2GRanges(df, ignoreStrand = TRUE)