Convert GRanges object to BED format and save as a text file.
granges_to_bed(
grlist,
save_dir = tempdir(),
sep = "\t",
nThread = 1,
gzip = FALSE,
verbose = TRUE
)
A list of GRanges objects. Can also be a single non-list GRanges object.
Where to save the BED file.
The separator between columns. Default is ","
.
The number of threads to use. Experiment to see what works best for your data on your hardware.
Whether the BED file should be gzip compressed.
Print messages.
gr <- echodata::dt_to_granges(dat = echodata::BST1)
#> Converting dat to GRanges object.
bed_path <- echodata::granges_to_bed(grlist = gr)
#> Converting 1 GRanges object to separate BED files.
#> Saving BED file ==> /tmp/RtmpLQCV4M/granges1.bed.txt