load_file | R Documentation |
This function imports a GTF or GFF3 file (commonly from the GENCODE website) and converts it into a data frame. The function provides flexibility for users to work with genomic feature files easily in the R environment.
load_file(filename)
filename |
A character string representing the path to the GTF or GFF3 file (e.g., "gencode.vM36.annotation.gtf.gz"). The file could be in GTF or GFF3 format and must be downloaded from a reliable source like GENCODE. |
The function uses the rtracklayer
package to import the GTF or GFF3 file and returns it as a data frame.
The user should ensure that the input file is properly formatted and accessible from the specified path.
Files larger than a few hundred MBs may take longer to load and process.
A data frame containing the parsed content of the GTF or GFF3 file. The data frame includes standard columns such as 'seqnames', 'start', 'end', 'strand', 'feature', and 'gene_id', among others.
# Load example GTF files from the package
file_v1 <- system.file("extdata", "gencode.v1.example.gtf.gz", package = "GencoDymo2")
gtf_v1 <- load_file(file_v1)
head(gtf_v1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.