Skip to content

Comments

fix: use _gff_gene_name_attribute in _transcript_to_parent_name (#883)#887

Open
31puneet wants to merge 2 commits intomalariagen:masterfrom
31puneet:fix/883-transcript-parent-name-attribute
Open

fix: use _gff_gene_name_attribute in _transcript_to_parent_name (#883)#887
31puneet wants to merge 2 commits intomalariagen:masterfrom
31puneet:fix/883-transcript-parent-name-attribute

Conversation

@31puneet
Copy link

Description

Fixes #883. _transcript_to_parent_name() in genome_features.py hardcodes "Name" when looking up gene names, but af1/adir1 use "Note".

Changes Made

- return rec_parent.get("Name", parent_id)
+ return rec_parent.get(self._gff_gene_name_attribute, parent_id)

Before (af1/adir1)

AFUN007757-RA SNP frequencies

Gene name missing — falls back to gene ID.

After (af1/adir1)

AFUN007757-RA (epoxide hydrolase) SNP frequencies

Gene name correctly retrieved from "Note" attribute.

Impact

  • Fixes gene name display in 4 functions: snp_allele_frequencies(), aa_allele_frequencies(), snp_allele_frequencies_advanced(), aa_allele_frequencies_advanced()
  • No breaking changes — ag3 behavior unchanged
  • All existing tests pass

Copy link
Collaborator

@jonbrenas jonbrenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_transcript_to_parent_name() hardcodes "Name" attribute — gene names not returned for af1/adir1

2 participants