Skip to content

Commit 5838aa3

Browse files
tomwhitejeromekelleher
authored andcommitted
Fix bio2zarr import
1 parent 65d6e7b commit 5838aa3

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 vcf
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+
vcf.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 vcf
1010
from cyvcf2 import VCF
1111
from numpy.testing import assert_array_equal
1212

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

310310
# remove vcf_header
311311
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 vcf
99

1010

1111
@contextmanager
@@ -145,15 +145,15 @@ def vcz_path_cache(vcf_path):
145145
cached_vcz_path = (cache_path / vcf_path.name).with_suffix(".vcz")
146146
if not cached_vcz_path.exists():
147147
if vcf_path.name.startswith("chr22"):
148-
vcf2zarr.convert(
148+
vcf.convert(
149149
[vcf_path],
150150
cached_vcz_path,
151151
worker_processes=0,
152152
variants_chunk_size=10,
153153
samples_chunk_size=10,
154154
)
155155
else:
156-
vcf2zarr.convert(
156+
vcf.convert(
157157
[vcf_path], cached_vcz_path, worker_processes=0, local_alleles=False
158158
)
159159
return cached_vcz_path

0 commit comments

Comments
 (0)