Skip to content

Commit

Permalink
Update genome_annotation.py with dunder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 4, 2024
1 parent 166cfbe commit 513e63c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bkbit/models/genome_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ class GeneAnnotation(Gene):
"""
An annotation describing the location, boundaries, and functions of individual genes within a genome annotation.
"""

def __hash__(self):
return hash(tuple([self.id, self.name, self.molecular_type, self.description]))

molecular_type: Optional[Union[BioType, str]] = Field(None)
source_id: Optional[str] = Field(None, description="""The authority specific identifier.""")
referenced_in: Union[GenomeAnnotation, str] = Field(..., description="""The genome annotation that this gene annotation was referenced from.""")
Expand Down

0 comments on commit 513e63c

Please sign in to comment.