Skip to content

Commit 1e43a16

Browse files
Fixup code
1 parent 97977c4 commit 1e43a16

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

validation.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
import pathlib
55
import click
66

7-
import bio2zarr as bz
87

9-
# tmp, come up with better names and flatten hierarchy
108
from bio2zarr import vcf
119

1210

@@ -15,7 +13,6 @@
1513
@click.option("-p", "--worker-processes", type=int, default=1)
1614
@click.option("-f", "--force", is_flag=True, default=False)
1715
def cli(vcfs, worker_processes, force):
18-
1916
data_path = pathlib.Path("validation-data")
2017
if len(vcfs) == 0:
2118
vcfs = list(data_path.glob("*.vcf.gz")) + list(data_path.glob("*.bcf"))
@@ -27,23 +24,23 @@ def cli(vcfs, worker_processes, force):
2724
print(f)
2825
exploded = tmp_path / (f.name + ".exploded")
2926
if force or not exploded.exists():
30-
bz.explode_vcf(
27+
vcf.explode(
3128
[f],
3229
exploded,
3330
worker_processes=worker_processes,
3431
show_progress=True,
3532
)
36-
spec = tmp_path / (f.name + ".spec")
33+
spec = tmp_path / (f.name + ".schema")
3734
if force or not spec.exists():
3835
with open(spec, "w") as specfile:
39-
vcf.generate_spec(exploded, specfile)
36+
vcf.mkschema(exploded, specfile)
4037

4138
zarr = tmp_path / (f.name + ".zarr")
4239
if force or not zarr.exists():
43-
vcf.to_zarr(
40+
vcf.encode(
4441
exploded,
4542
zarr,
46-
conversion_spec=spec,
43+
spec,
4744
worker_processes=worker_processes,
4845
show_progress=True,
4946
)

0 commit comments

Comments
 (0)