data.frame2GRanges(df, keepColumns = FALSE, ignoreStrand = FALSE)
data.frame
with columns chr
or
seqnames
, start
, end
and optionally a
strand column
.df
has additional columns, should
these columns be stored as metadata columns on the return GRanges
or should they be discarded.df
has a strand
column,
should this column be ignored.GRanges
df <- data.frame(chr = "chr1", start = 1:3, end = 2:4,
strand = c("+","-","+"))
data.frame2GRanges(df, ignoreStrand = TRUE)
Run the code above in your browser using DataLab