read_bed {geneviewer} | R Documentation |
Read BED Files
Description
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.
Usage
read_bed(path)
Arguments
path |
A character string specifying the directory containing BED files or the file path to a single BED file. |
Details
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.
Value
A data frame combining data from the BED files.
Examples
## 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)
[Package geneviewer version 0.1.10 Index]