Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
run: |
uv run pytest
env:
BIO2ZARR_ZARR_FORMAT: ${{ matrix.zarr-format }}
BIO2ZARR_DEFAULT_ZARR_FORMAT: ${{ matrix.zarr-format }}

test-azure-emulator:
name: Test Azure emulator
Expand Down Expand Up @@ -183,4 +183,4 @@ jobs:
run: |
uv run pytest -q tests/test_azure.py
env:
BIO2ZARR_ZARR_FORMAT: "3"
BIO2ZARR_DEFAULT_ZARR_FORMAT: "3"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ NA00003
# Create some VCZ data
% rm -rf data
% mkdir data
% BIO2ZARR_ZARR_FORMAT=3 uv run vcf2zarr convert --no-progress --samples-chunk-size=4 tests/data/vcf/sample-part1.vcf.gz data/sample-part1.vcf.vcz
% BIO2ZARR_ZARR_FORMAT=3 uv run vcf2zarr convert --no-progress tests/data/vcf/sample-part2.vcf.gz data/sample-part2.vcf.vcz
% uv run vcf2zarr convert --no-progress --zarr-format=3 --samples-chunk-size=4 tests/data/vcf/sample-part1.vcf.gz data/sample-part1.vcf.vcz
% uv run vcf2zarr convert --no-progress --zarr-format=3 tests/data/vcf/sample-part2.vcf.gz data/sample-part2.vcf.vcz

# Copy first vcz to an icechunk store
% uv run vczstore copy-store-to-icechunk data/sample-part1.vcf.vcz data/store.vcz
Expand Down
2 changes: 1 addition & 1 deletion tests/test_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_append_icechunk(tmp_path):

# note that vcz1 is in icechunk, but the dataset being appended, vcz2, needn't be
vcz1 = convert_vcf_to_vcz_icechunk("sample-part1.vcf.gz", tmp_path)
vcz2 = convert_vcf_to_vcz("sample-part2.vcf.gz", tmp_path)
vcz2 = convert_vcf_to_vcz("sample-part2.vcf.gz", tmp_path, zarr_format=3)

print(vcz1)
print(vcz2)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ def _convert_vcf_to_vcz_zarr3(vcf_name, tmp_path):
vcf_path = pathlib.Path("tests/data/vcf") / vcf_name
output = (tmp_path / vcf_path.name).with_suffix(".vcz")
env = dict(os.environ)
env["BIO2ZARR_ZARR_FORMAT"] = "3"
completed = subprocess.run(
[
"vcf2zarr",
"convert",
"--no-progress",
"--zarr-format=3",
"--worker-processes=0",
str(vcf_path),
str(output),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_normalise.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def test_normalise_and_append_icechunk(tmp_path):

# note that vcz0 is in icechunk, but the others needn't be
vcz0 = convert_vcf_to_vcz_icechunk("sample-variants.vcf.gz", tmp_path, ploidy=2)
vcz1 = convert_vcf_to_vcz("sample-part1.vcf.gz", tmp_path)
vcz1 = convert_vcf_to_vcz("sample-part1.vcf.gz", tmp_path, zarr_format=3)
vcz1_norm = zarr.storage.MemoryStore()

with icechunk_transaction(vcz0, "main", message="append") as store:
Expand Down
9 changes: 8 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ def vcz_path_cache(vcf_path):


def convert_vcf_to_vcz(
vcf_name, tmpdir, variants_chunk_size=None, samples_chunk_size=None, ploidy=None
vcf_name,
tmpdir,
variants_chunk_size=None,
samples_chunk_size=None,
ploidy=None,
zarr_format=None,
):
vcf_path = pathlib.Path("tests/data/vcf") / vcf_name
output = (pathlib.Path(tmpdir) / vcf_path.name).with_suffix(".vcz")
Expand All @@ -239,6 +244,7 @@ def convert_vcf_to_vcz(
worker_processes=0,
local_alleles=False,
ploidy=ploidy,
zarr_format=zarr_format,
)
return output

Expand Down Expand Up @@ -300,6 +306,7 @@ def convert_vcf_to_vcz_icechunk(
variants_chunk_size=variants_chunk_size,
samples_chunk_size=samples_chunk_size,
ploidy=ploidy,
zarr_format=3,
)

ic_tmp_path = tmp_path / "icechunk"
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading