read_gff | R Documentation |
This function reads GFF files from a specified directory or file path and combines them into a single data frame.
read_gff(path, fields = NULL)
path |
A character string specifying the directory containing GFF files or the file path to a single GFF file. |
fields |
An optional vector of character strings specifying the fields to extract from the GFF files. |
This function can read multiple GFF files from a directory or a single GFF file. It processes each file, extracts the specified fields (if provided), adds a 'name' column with the filename, and combines the data frames from all files into one.
A data frame containing the combined data from the GFF files.
## Not run:
# Read GFF files from a directory
gff_data <- read_gff("path/to/directory")
# Read a single GFF file
gff_data <- read_gff("path/to/file.gff")
# Read specific fields from GFF files
gff_data <- read_gff(
"path/to/directory",
fields = c("seqid", "start", "end", "attributes")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.