diff --git a/server/curfu/routers/utilities.py b/server/curfu/routers/utilities.py index db8a0b0f..af06d6d6 100644 --- a/server/curfu/routers/utilities.py +++ b/server/curfu/routers/utilities.py @@ -68,6 +68,7 @@ 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 """ +<<<<<<< HEAD <<<<<<< HEAD normalized = request.app.state.fusor.gene_normalizer.normalize(gene) symbol = normalized.gene_descriptor.label @@ -78,6 +79,16 @@ async def get_transcripts_for_gene(request: Request, gene: str) -> Dict: ======= transcripts = await request.app.state.fusor.cool_seq_tool.uta_db.get_transcripts(gene) >>>>>>> c11b094 (feat!: adding transcript lookup for genes) +======= + 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()) +>>>>>>> 047cc77 (feat: add transcript lookup for genes) 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 7f313607..a30145d5 100644 --- a/server/curfu/schemas.py +++ b/server/curfu/schemas.py @@ -258,11 +258,15 @@ class GetTranscriptsResponse(Response): class GetGeneTranscriptsResponse(Response): """Response model for MANE transcript retrieval endpoint.""" +<<<<<<< HEAD <<<<<<< HEAD transcripts: Optional[List[str]] = None ======= transcripts: Optional[pl.DataFrame] >>>>>>> c11b094 (feat!: adding transcript lookup for genes) +======= + transcripts: Optional[Dict] +>>>>>>> 047cc77 (feat: add transcript lookup for genes) class ServiceInfoResponse(Response):