Skip to content

Commit

Permalink
renaming chromosome to genomic_ac for consistency with cool-seq-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Aug 21, 2024
1 parent 3a06f55 commit 00ed45f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/fusor/fusor.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,13 @@ async def transcript_segment_element(
**kwargs
)
else:
if "chromosome" in kwargs and kwargs.get("chromosome") is None:
if "genomic_ac" in kwargs and kwargs.get("genomic_ac") is None:
msg = (
"`chromosome` is required when going from genomic to"
"`genomic_ac` is required when going from genomic to"
" transcript exon coordinates"
)
_logger.warning(msg)
return None, [msg]
chromosome = kwargs.get("chromosome")
kwargs["genomic_ac"] = chromosome
data = await self.cool_seq_tool.ex_g_coords_mapper.genomic_to_tx_segment(
**kwargs
)
Expand Down
10 changes: 5 additions & 5 deletions tests/test_fusor.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ async def test_transcript_segment_element(
transcript="NM_152263.3",
seg_start_genomic=154192135,
seg_end_genomic=154170399,
chromosome="NC_000001.11",
genomic_ac="NC_000001.11",
tx_to_genomic_coords=False,
)
assert tsg[0]
Expand Down Expand Up @@ -488,7 +488,7 @@ async def test_transcript_segment_element(
transcript="NM_152263.3",
seg_start_genomic=154192135,
seg_end_genomic=154170399,
chromosome="NC_000001.11",
genomic_ac="NC_000001.11",
tx_to_genomic_coords=False,
seq_id_target_namespace="ga4gh",
)
Expand Down Expand Up @@ -520,7 +520,7 @@ async def test_transcript_segment_element(
transcript="NM_152263.3",
seg_start_genomic=154192135,
seg_end_genomic=154170404,
chromosome="NC_000001.11",
genomic_ac="NC_000001.11",
tx_to_genomic_coords=False,
seq_id_target_namespace="ga4gh",
)
Expand All @@ -547,7 +547,7 @@ async def test_transcript_segment_element(
tsg = await fusor_instance.transcript_segment_element(
transcript="NM_152263.3",
seg_start_genomic=154192135,
chromosome="NC_000001.11",
genomic_ac="NC_000001.11",
tx_to_genomic_coords=False,
seq_id_target_namespace="ga4gh",
)
Expand All @@ -558,7 +558,7 @@ async def test_transcript_segment_element(
# MANE
tsg = await fusor_instance.transcript_segment_element(
tx_to_genomic_coords=False,
chromosome="NC_000011.10",
genomic_ac="NC_000011.10",
seg_start_genomic=9575887,
gene="WEE1",
)
Expand Down

0 comments on commit 00ed45f

Please sign in to comment.