This function saves a peak object to a file in BED4 format. The included
columns are: chr, start, end, and name. Since
no strand data is being included, it is recommended to use this function
only for peak objects that do not have strand information.
Usage
save_peak_file(
peak_obj,
save = TRUE,
filename = random_string(10),
out_dir = tempdir()
)Arguments
- peak_obj
A GRanges object with the peak coordinates. Must include columns:
seqnames,start,end, andname.- save
A logical indicating whether to save the peak object to a file.
- filename
A character string of the file name. If the file extension is not
.bed, a warning is issued and the extension is appended. Alternatively, if the file name does not have an extension,.bedis appended. (default = random string)- out_dir
A character string of the output directory. (default = tempdir())