This function parses a GFF file and extracts gene annotation information. It processes the attributes column (9th column) to extract transcript ID, gene ID, gene symbol, and taxonomic ID.
Arguments
- gff_file
Path to the GFF file or URL
- type_filter
Vector of regex patterns to filter the type column (3rd column)
- source_db
GFF format source: "ncbi" (default) or "ensembl". NCBI style looks for ID, Parent, gene, Dbxref, gbkey attributes. Ensembl style looks for ID (with transcript: prefix), gene_id, transcript_id, Parent (with gene: prefix), and Name attributes.
- tax_id
Optional taxon ID to use. If provided, this will be used instead of extracting from region entries in the GFF file. This is particularly useful for Ensembl GFF files which don't have taxon info in region entries.