diff --git a/server/curfu/routers/utilities.py b/server/curfu/routers/utilities.py index fdb44374..720902e7 100644 --- a/server/curfu/routers/utilities.py +++ b/server/curfu/routers/utilities.py @@ -64,7 +64,14 @@ async def get_transcripts_for_gene(request: Request, gene: str) -> Dict: :param str gene: gene term provided by user :return: Dict containing transcripts if lookup succeeds, or warnings upon failure """ - transcripts = await request.app.state.fusor.cool_seq_tool.uta_db.get_transcripts(gene) + normalized = request.app.state.fusor.gene_normalizer.normalize(gene) + symbol = normalized.gene_descriptor.label + print(symbol) + print(request.app.state.fusor.cool_seq_tool.uta_db) + transcripts = await request.app.state.fusor.cool_seq_tool.uta_db.get_transcripts(symbol) + transcripts_dict = transcripts.to_dict() + tx_for_gene = transcripts_dict["tx_ac"] + print(transcripts.glimpse()) if transcripts.is_empty(): return {"warnings": [f"No matching transcripts: {gene}"], "transcripts": []} else: diff --git a/server/curfu/schemas.py b/server/curfu/schemas.py index 4acc7c52..af850193 100644 --- a/server/curfu/schemas.py +++ b/server/curfu/schemas.py @@ -256,7 +256,7 @@ class GetTranscriptsResponse(Response): class GetGeneTranscriptsResponse(Response): """Response model for MANE transcript retrieval endpoint.""" - transcripts: Optional[pl.DataFrame] + transcripts: Optional[Dict] class ServiceInfoResponse(Response):