Skip to content

Commit

Permalink
fix tx utils bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Aug 2, 2024
1 parent 17244c9 commit 3414fbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/src/curfu/routers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ 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}"]}
return {"warnings": [f"Normalization error: {term}"], "transcripts": None}
if not normalized.gene.id.replace("normalize.gene.", "").lower().startswith("hgnc"):
return {"warnings": [f"No HGNC symbol: {term}"]}
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(
symbol
Expand Down Expand Up @@ -114,7 +114,6 @@ async def get_genome_coords(
exon_end=exon_end,
exon_start_offset=exon_start_offset,
exon_end_offset=exon_end_offset,
residue_mode="inter-residue",
)
warnings = response.warnings
if warnings:
Expand Down

0 comments on commit 3414fbe

Please sign in to comment.