netmap.masking.external.get_genome_annotation_from_gtf¶
- netmap.masking.external.get_genome_annotation_from_gtf(gtf_df)[source]¶
Return gene-feature rows from a parsed GTF DataFrame.
Filters the GTF to rows where
feature == 'gene', selects a standard set of columns, removes entries with empty gene names, and prepends'chr'to the chromosome identifier.- Parameters:
gtf_df (pd.DataFrame) – Genome annotation loaded from a GTF file, expected to contain standard GTF columns including
seqname,feature,start,end,gene_id,gene_name, andgene_biotype.- Returns:
Filtered and reformatted DataFrame of gene features with an additional
chrcolumn containing the prefixed chromosome name.- Return type:
pd.DataFrame