Skip to content

Commit ed737c0

Browse files
committed
Fix bio2zarr import
1 parent f3b80e3 commit ed737c0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/test_stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import pytest
55
import zarr
6-
from bio2zarr import vcf2zarr
6+
from bio2zarr import icf
77

88
from vcztools.stats import nrecords, stats
99

@@ -39,7 +39,7 @@ def test_stats__no_index(tmp_path):
3939
original = pathlib.Path("tests/data/vcf") / "sample.vcf.gz"
4040
# don't use cache here since we want to make sure vcz is not indexed
4141
vcz = tmp_path.joinpath("intermediate.vcz")
42-
vcf2zarr.convert([original], vcz, worker_processes=0, local_alleles=False)
42+
icf.convert([original], vcz, worker_processes=0, local_alleles=False)
4343

4444
# delete the index created by vcf2zarr
4545
root = zarr.open(vcz, mode="a")

tests/test_vcf_writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import numpy as np
77
import pytest
88
import zarr
9-
from bio2zarr import vcf2zarr
9+
from bio2zarr import icf
1010
from cyvcf2 import VCF
1111
from numpy.testing import assert_array_equal
1212

@@ -307,7 +307,7 @@ def test_write_vcf__generate_header(tmp_path):
307307
original = pathlib.Path("tests/data/vcf") / "sample.vcf.gz"
308308
# don't use cache here since we mutate the vcz
309309
vcz = tmp_path.joinpath("intermediate.vcz")
310-
vcf2zarr.convert([original], vcz, worker_processes=0, local_alleles=False)
310+
icf.convert([original], vcz, worker_processes=0, local_alleles=False)
311311

312312
# remove vcf_header
313313
root = zarr.open(vcz, mode="r+")

tests/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import cyvcf2
77
import numpy as np
8-
from bio2zarr import vcf2zarr
8+
from bio2zarr import icf
99

1010

1111
@contextmanager
@@ -139,15 +139,15 @@ def vcz_path_cache(vcf_path):
139139
cached_vcz_path = (cache_path / vcf_path.name).with_suffix(".vcz")
140140
if not cached_vcz_path.exists():
141141
if vcf_path.name.startswith("chr22"):
142-
vcf2zarr.convert(
142+
icf.convert(
143143
[vcf_path],
144144
cached_vcz_path,
145145
worker_processes=0,
146146
variants_chunk_size=10,
147147
samples_chunk_size=10,
148148
)
149149
else:
150-
vcf2zarr.convert(
150+
icf.convert(
151151
[vcf_path], cached_vcz_path, worker_processes=0, local_alleles=False
152152
)
153153
return cached_vcz_path

0 commit comments

Comments
 (0)