From e8f6417490f71070512b29f791d739b311f0dd5d Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Mon, 15 Jul 2024 12:23:03 -0400 Subject: [PATCH] build!: update cool-seq-tool version (#159) * build!: update cool-seq-tool version * tests: updating tests with changes from updated transcript data * add help comment * revert test updates - will address in another pr --- pyproject.toml | 2 +- src/fusor/fusor.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 365b47e..81b62fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "ga4gh.vrs ~=0.8.1", "biocommons.seqrepo", "gene-normalizer ~=0.1.40-dev1", - "cool-seq-tool ~=0.3.0-dev1", + "cool-seq-tool ~=0.5.0", ] dynamic=["version"] diff --git a/src/fusor/fusor.py b/src/fusor/fusor.py index 02932da..b1a035e 100644 --- a/src/fusor/fusor.py +++ b/src/fusor/fusor.py @@ -6,7 +6,7 @@ from biocommons.seqrepo import SeqRepo from bioutils.accessions import coerce_namespace -from cool_seq_tool.routers import CoolSeqTool +from cool_seq_tool.app import CoolSeqTool from cool_seq_tool.schemas import ResidueMode from ga4gh.core import ga4gh_identify from ga4gh.vrs import models @@ -272,11 +272,15 @@ async def transcript_segment_element( _logger.warning(msg) return None, [msg] residue_mode = kwargs.get("residue_mode") - # TODO: Remove once fixed in cool_seq_tool + # TODO: Remove once fixed in cool_seq_tool - need to verify that this code isn't still needed if residue_mode != ResidueMode.INTER_RESIDUE: start = kwargs.get("start") kwargs["start"] = start - 1 if start is not None else None kwargs["residue_mode"] = "inter-residue" + chromosome = kwargs.get("chromosome") + # if chromosome is a string, assume it's an accession, fix it for the kwargs since CST expects + if type(chromosome) is str: + kwargs["alt_ac"] = chromosome data = await self.cool_seq_tool.ex_g_coords_mapper.genomic_to_transcript_exon_coordinates( **kwargs )