dt_to_granges: Convert data.table to GRanges object

View source: R/dt_to_granges.R

dt_to_grangesR Documentation

Convert data.table to GRanges object

Description

Convert data.table/data.frame to a GRanges object.

Usage

dt_to_granges(
  dat,
  chrom_col = "seqnames",
  start_col = "start",
  end_col = "end",
  style = "NCBI",
  verbose = TRUE
)

Arguments

dat

Data.

chrom_col

Chromosome column name.

start_col

Genomic start position column name.

end_col

Genomic end position column name.

style

GRanges style (e.g. "NCBI, "UCSC") set by seqlevelsStyle.

verbose

Print messages.

Value

GRanges

Examples

dat <- data.frame(GenomicRanges::GRanges("4:1-1000000"))
gr <- dt_to_granges(dat = dat)

neurogenomics/PeakyFinders documentation built on Oct. 14, 2024, 3:09 p.m.