Skip to content

Commit cc0236b

Browse files
committed
build: update to latest agct
1 parent 6c8cbad commit cc0236b

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ license = {file = "LICENSE"}
2626
dependencies = [
2727
"asyncpg",
2828
"boto3",
29-
"agct >= 0.1.0-dev1",
29+
"agct >= 0.2.0rc1",
3030
"polars ~= 1.0",
3131
"biocommons.seqrepo",
3232
"pydantic >=2.0,<3.0",

src/cool_seq_tool/mappers/liftover.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import logging
77
from os import environ
88

9-
from agct import Converter, Genome
9+
from agct import Assembly as AgctAssembly
10+
from agct import Converter
1011

1112
from cool_seq_tool.schemas import Assembly
1213
from cool_seq_tool.utils import process_chromosome_input
@@ -43,13 +44,13 @@ def __init__(
4344
"""
4445
self.from_37_to_38 = Converter(
4546
chainfile=chain_file_37_to_38 or LIFTOVER_CHAIN_37_TO_38,
46-
from_db=Genome.HG19,
47-
to_db=Genome.HG38,
47+
from_assembly=AgctAssembly.HG19,
48+
to_assembly=AgctAssembly.HG38,
4849
)
4950
self.from_38_to_37 = Converter(
5051
chainfile=chain_file_38_to_37 or LIFTOVER_CHAIN_38_TO_37,
51-
from_db=Genome.HG38,
52-
to_db=Genome.HG19,
52+
from_assembly=AgctAssembly.HG38,
53+
to_assembly=AgctAssembly.HG19,
5354
)
5455

5556
def get_liftover(
@@ -77,9 +78,9 @@ def get_liftover(
7778
"""
7879
chromosome = process_chromosome_input(chromosome, "LiftOver.get_liftover()")
7980
if liftover_to_assembly == Assembly.GRCH38:
80-
liftover = self.from_37_to_38.convert_coordinate(chromosome, pos)
81+
liftover = self.from_37_to_38.convert_coordinate(chromosome, pos, pos)
8182
elif liftover_to_assembly == Assembly.GRCH37:
82-
liftover = self.from_38_to_37.convert_coordinate(chromosome, pos)
83+
liftover = self.from_38_to_37.convert_coordinate(chromosome, pos, pos)
8384
else:
8485
_logger.warning("%s assembly not supported", liftover_to_assembly)
8586
liftover = None

0 commit comments

Comments
 (0)