@@ -817,10 +817,16 @@ def _add_genes(self, genes: list[dict]) -> None:
817
817
:param genes: All genes in CIViC
818
818
"""
819
819
820
- def _get_ncbi_mapping (ncbigene : str , gene : dict ) -> ConceptMapping :
820
+ def _get_ncbi_concept_mapping (ncbigene_id : str , gene : dict ) -> ConceptMapping :
821
+ """Get NCBI gene mapping
822
+
823
+ :param ncbigene_id: ID for NCBI Gene
824
+ :param gene: CIViC gene record
825
+ :return: Concept Mapping for NCBI Gene
826
+ """
821
827
return ConceptMapping (
822
828
coding = Coding (
823
- id = ncbigene ,
829
+ id = ncbigene_id ,
824
830
code = str (gene ["entrez_id" ]),
825
831
system = "https://www.ncbi.nlm.nih.gov/gene/" ,
826
832
),
@@ -844,7 +850,7 @@ def _get_ncbi_mapping(ncbigene: str, gene: dict) -> ConceptMapping:
844
850
queries ,
845
851
)
846
852
extensions .append (self ._get_vicc_normalizer_failure_ext ())
847
- mappings = [_get_ncbi_mapping (ncbigene , gene )]
853
+ mappings = [_get_ncbi_concept_mapping (ncbigene , gene )]
848
854
else :
849
855
mappings = self ._get_vicc_normalizer_mappings (
850
856
normalized_gene_id , gene_norm_resp
@@ -867,7 +873,7 @@ def _get_ncbi_mapping(ncbigene: str, gene: dict) -> ConceptMapping:
867
873
)
868
874
869
875
if not civic_ncbi_annotation_match :
870
- mappings .append (_get_ncbi_mapping (ncbigene , gene ))
876
+ mappings .append (_get_ncbi_concept_mapping (ncbigene , gene ))
871
877
872
878
if gene ["aliases" ]:
873
879
extensions .append (Extension (name = "aliases" , value = gene ["aliases" ]))
0 commit comments