|
6 | 6 | import logging |
7 | 7 | from os import environ |
8 | 8 |
|
9 | | -from agct import Converter, Genome |
| 9 | +from agct import Assembly as AgctAssembly |
| 10 | +from agct import Converter |
10 | 11 |
|
11 | 12 | from cool_seq_tool.schemas import Assembly |
12 | 13 | from cool_seq_tool.utils import process_chromosome_input |
@@ -43,13 +44,13 @@ def __init__( |
43 | 44 | """ |
44 | 45 | self.from_37_to_38 = Converter( |
45 | 46 | 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, |
48 | 49 | ) |
49 | 50 | self.from_38_to_37 = Converter( |
50 | 51 | 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, |
53 | 54 | ) |
54 | 55 |
|
55 | 56 | def get_liftover( |
@@ -77,9 +78,9 @@ def get_liftover( |
77 | 78 | """ |
78 | 79 | chromosome = process_chromosome_input(chromosome, "LiftOver.get_liftover()") |
79 | 80 | 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) |
81 | 82 | 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) |
83 | 84 | else: |
84 | 85 | _logger.warning("%s assembly not supported", liftover_to_assembly) |
85 | 86 | liftover = None |
|
0 commit comments