11"""Module for Variant Normalization."""
22from typing import Tuple , Optional
3+ from variant import GENE_NORMALIZER
34from variant .schemas .token_response_schema import PolypeptideSequenceVariant ,\
45 SingleNucleotideVariant , DelIns , AminoAcidDelInsToken
56from variant .schemas .ga4gh_vod import Gene , VariationDescriptor , GeneDescriptor
67from variant .data_sources import SeqRepoAccess
7- from gene .query import QueryHandler as GeneQueryHandler
88from urllib .parse import quote
99from variant import logger
1010
@@ -14,7 +14,6 @@ class Normalize:
1414
1515 def __init__ (self ):
1616 """Initialize Normalize class."""
17- self .gene_query_handler = GeneQueryHandler ()
1817 self .seqrepo_access = SeqRepoAccess ()
1918 self .warnings = list ()
2019
@@ -84,8 +83,7 @@ def get_gene_descriptor(self, gene_token):
8483 gene-normalizer.
8584 """
8685 gene_symbol = gene_token .matched_value
87- response = self .gene_query_handler .search_sources (gene_symbol ,
88- incl = 'hgnc' )
86+ response = GENE_NORMALIZER .search_sources (gene_symbol , incl = 'hgnc' )
8987 if response ['source_matches' ][0 ]['records' ]:
9088 record = response ['source_matches' ][0 ]['records' ][0 ]
9189 record_location = record .locations [0 ] if record .locations else None
0 commit comments