Closed jayhesselberth closed 6 years ago
Just realized there is a function in GenomicRanges to convert df to Granges object that searches for certain column names (see .field options). valr's naming conventions fit in nicely. A simple call of makeGRangesFromDataFrame(x)
just works.
makeGRangesFromDataFrame(df,
keep.extra.columns=FALSE,
ignore.strand=FALSE,
seqinfo=NULL,
seqnames.field=c("seqnames", "seqname",
"chromosome", "chrom",
"chr", "chromosome_name",
"seqid"),
start.field="start",
end.field=c("end", "stop"),
strand.field="strand",
starts.in.df.are.0based=FALSE)
closed by #334
Conversion from tbl_interval to GRanges should be more included outside of the benchmarks vignette. Perhaps in the
tbl_interval
examples.Created on 2018-01-27 by the reprex package (v0.1.1.9000).