bed_to: Convert a BED file

View source: R/bed_to.R

bed_toR Documentation

Convert a BED file

Description

Convert a BED file to any format supported by rtracklayer::export.

Usage

bed_to(
  files,
  build,
  keep_chr = NULL,
  formats = c("bigwig", "bigbed"),
  save_dir = tempdir(),
  verbose = TRUE,
  ...
)

Arguments

files

Paths to one or more BED files.

build

Genome build.

keep_chr

Which chromosomes to keep.

formats

A character vector of one or more formats for export file to.

save_dir

Path to save bigBed files.

verbose

Print messages.

...

Arguments passed on to rtracklayer::export.bw

con

A path, URL or BigWigFile object. Connections are not supported. For the functions ending in .bw, the file format is indicated by the function name. For the export and import methods, the format must be indicated another way. If con is a path, or URL, either the file extension or the format argument needs to be “bigWig” or “bw”.

object

The object to export, should be an RleList, IntegerList, NumericList, GRanges or something coercible to a GRanges.

Value

Converted file paths.

Source

rtracklayer issues reading/writing files

Examples

files <- system.file("tests","test.bed",package = "rtracklayer")
out <- bed_to(files=files)

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