This function processes gene annotation data from GTF/GFF files for visualization with geom_gene. It extracts gene, transcript, and exon information and formats it for use with ggplot2.
Usage
process_gene_data(
gr,
gene_id = "gene_id",
gene_name = "gene_name",
transcript_id = "transcript_id",
type = "type"
)Examples
if (FALSE) { # \dontrun{
library(rtracklayer)
gr <- import("genes.gtf")
gene_data <- process_gene_data(gr)
} # }