granges_to_bed: Convert from GRanges to BED format

View source: R/granges_to_bed.R

granges_to_bedR Documentation

Convert from GRanges to BED format

Description

Convert GRanges object to BED format and save as a text file.

Usage

granges_to_bed(
  grlist,
  save_dir = tempdir(),
  sep = "\t",
  nThread = 1,
  gzip = FALSE,
  verbose = TRUE
)

Arguments

grlist

A list of GRanges objects. Can also be a single non-list GRanges object.

save_dir

Where to save the BED file.

sep

The separator between columns. Default is ",".

nThread

The number of threads to use. Experiment to see what works best for your data on your hardware.

gzip

Whether the BED file should be gzip compressed.

verbose

Print messages.

Examples

gr <- echodata::dt_to_granges(dat = echodata::BST1)
bed_path <- echodata::granges_to_bed(grlist = gr)

RajLabMSSM/echodata documentation built on Nov. 21, 2023, 8 a.m.