read_bed | R Documentation |
This function reads BED files from a specified directory or file path and combines them into a single data frame. BED files use 0-based coordinate starts, while this function transforms the coordinates to 1-based during import.
read_bed(path)
path |
A character string specifying the directory containing BED files or the file path to a single BED file. |
This function can read multiple BED files from a directory or a single BED file from a specified path. It adds a 'filename' column with the name of the file, and combines the data frames from all files into one.
A data frame combining data from the BED files.
## Not run:
# Read BED files from a directory
bed_data <- read_bed("path/to/directory")
# Read a single BED file
bed_data <- read_bed("path/to/file.bed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.