diff --git a/server/src/curfu/gene_services.py b/server/src/curfu/gene_services.py index 7cdbca89..f6d7ee6d 100644 --- a/server/src/curfu/gene_services.py +++ b/server/src/curfu/gene_services.py @@ -49,7 +49,7 @@ def __init__(self, suggestions_file: Path | None = None) -> None: @staticmethod def get_normalized_gene( term: str, normalizer: QueryHandler - ) -> tuple[str, str, str | str | None]: + ) -> tuple[str, str, str | None]: """Get normalized ID given gene symbol/label/alias. :param term: user-entered gene term diff --git a/server/src/curfu/routers/utilities.py b/server/src/curfu/routers/utilities.py index 7bd39d66..c221fe1c 100644 --- a/server/src/curfu/routers/utilities.py +++ b/server/src/curfu/routers/utilities.py @@ -39,7 +39,7 @@ def get_mane_transcripts(request: Request, term: str) -> dict: normalized = request.app.state.fusor.gene_normalizer.normalize(term) if normalized.match_type == gene_schemas.MatchType.NO_MATCH: return {"warnings": [f"Normalization error: {term}"], "transcripts": None} - if not normalized.gene.id.replace("normalize.gene.", "").lower().startswith("hgnc"): + if not normalized.normalized_id.startswith("hgnc"): return {"warnings": [f"No HGNC symbol: {term}"], "transcripts": None} symbol = normalized.gene.label transcripts = request.app.state.fusor.cool_seq_tool.mane_transcript_mappings.get_gene_mane_data(