as.bedtorch_table: Convert a 'GenomicRanges' or a 'data.frame' BED to standard...

View source: R/utils.R

as.bedtorch_tableR Documentation

Convert a GenomicRanges or a data.frame BED to standard data.table BED

Description

Convert a GenomicRanges or a data.frame BED to standard data.table BED

Usage

as.bedtorch_table(x, genome = NULL)

Arguments

x

An input. Must be either GenomicRanges or data.frame. If a data.frame, the first three columns should be chrom, start and end. For column names, refer to GenomicRanges::makeGRangesFromDataFrame().

genome

Genome name, e.g. GRCh37, etc.

Value

data.table converted from x.

Examples

gr <- read_bed(system.file("extdata", "example_merge.bed", package = "bedtorch"), 
               use_gr = TRUE, genome = "hs37-1kg")
as.bedtorch_table(gr)

haizi-zh/bedtorch documentation built on July 1, 2022, 10:40 a.m.