From e03a34fe8af8aaeee027dada593b61f8a10c43ed Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Tue, 13 Aug 2024 16:37:53 -0400 Subject: [PATCH] fix: transcript lookup --- client/src/services/ResponseModels.ts | 7 +++++++ server/src/curfu/routers/utilities.py | 2 +- server/src/curfu/schemas.py | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/client/src/services/ResponseModels.ts b/client/src/services/ResponseModels.ts index ff5f1979..e8087525 100644 --- a/client/src/services/ResponseModels.ts +++ b/client/src/services/ResponseModels.ts @@ -760,6 +760,13 @@ export interface GetDomainResponse { warnings?: string[] | null; domain: FunctionalDomain | null; } +/** + * Response model for MANE transcript retrieval endpoint. + */ +export interface GetGeneTranscriptsResponse { + warnings?: string[] | null; + transcripts?: string[]; +} /** * Response model for MANE transcript retrieval endpoint. */ diff --git a/server/src/curfu/routers/utilities.py b/server/src/curfu/routers/utilities.py index 3caa2daf..21940604 100644 --- a/server/src/curfu/routers/utilities.py +++ b/server/src/curfu/routers/utilities.py @@ -65,7 +65,7 @@ async def get_transcripts_for_gene(request: Request, gene: str) -> dict: :return: Dict containing transcripts if lookup succeeds, or warnings upon failure """ normalized = request.app.state.fusor.gene_normalizer.normalize(gene) - symbol = normalized.gene_descriptor.label + symbol = normalized.gene.label transcripts = await request.app.state.fusor.cool_seq_tool.uta_db.get_transcripts( gene=symbol ) diff --git a/server/src/curfu/schemas.py b/server/src/curfu/schemas.py index 007c6d9b..5307907f 100644 --- a/server/src/curfu/schemas.py +++ b/server/src/curfu/schemas.py @@ -250,6 +250,12 @@ class GetTranscriptsResponse(Response): transcripts: list[ManeGeneTranscript] | None +class GetGeneTranscriptsResponse(Response): + """Response model for MANE transcript retrieval endpoint.""" + + transcripts: list[str] = None + + class ServiceInfoResponse(Response): """Response model for service_info endpoint."""