Skip to content

Commit ea833b2

Browse files
committed
Merge branch 'issue-418' into issue-417
2 parents 19e0304 + a012460 commit ea833b2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/metakb/transformers/civic.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,10 +817,16 @@ def _add_genes(self, genes: list[dict]) -> None:
817817
:param genes: All genes in CIViC
818818
"""
819819

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+
"""
821827
return ConceptMapping(
822828
coding=Coding(
823-
id=ncbigene,
829+
id=ncbigene_id,
824830
code=str(gene["entrez_id"]),
825831
system="https://www.ncbi.nlm.nih.gov/gene/",
826832
),
@@ -844,7 +850,7 @@ def _get_ncbi_mapping(ncbigene: str, gene: dict) -> ConceptMapping:
844850
queries,
845851
)
846852
extensions.append(self._get_vicc_normalizer_failure_ext())
847-
mappings = [_get_ncbi_mapping(ncbigene, gene)]
853+
mappings = [_get_ncbi_concept_mapping(ncbigene, gene)]
848854
else:
849855
mappings = self._get_vicc_normalizer_mappings(
850856
normalized_gene_id, gene_norm_resp
@@ -867,7 +873,7 @@ def _get_ncbi_mapping(ncbigene: str, gene: dict) -> ConceptMapping:
867873
)
868874

869875
if not civic_ncbi_annotation_match:
870-
mappings.append(_get_ncbi_mapping(ncbigene, gene))
876+
mappings.append(_get_ncbi_concept_mapping(ncbigene, gene))
871877

872878
if gene["aliases"]:
873879
extensions.append(Extension(name="aliases", value=gene["aliases"]))

0 commit comments

Comments
 (0)