Skip to content

Commit 147231e

Browse files
Emit a warning about local alleles in CLI
Closes #304
1 parent 4c437a2 commit 147231e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bio2zarr/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,11 @@ def mkschema(icf_path, variants_chunk_size, samples_chunk_size, local_alleles):
339339
"""
340340
Generate a schema for zarr encoding
341341
"""
342+
if local_alleles:
343+
click.echo(
344+
"WARNING: Local alleles support is preliminary; please use with caution.",
345+
err=True,
346+
)
342347
stream = click.get_text_stream("stdout")
343348
vcf2zarr.mkschema(
344349
icf_path,

tests/test_cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ def test_mkschema_local_alleles(self, tmp_path, local_alleles):
729729
d = json.loads(result.stdout)
730730
call_LA_exists = "call_LA" in [f["name"] for f in d["fields"]]
731731
assert call_LA_exists == local_alleles
732+
assert (
733+
"WARNING: Local alleles support is preliminary;" in result.stderr
734+
) == local_alleles
732735

733736
def test_encode(self, tmp_path):
734737
icf_path = tmp_path / "icf"

0 commit comments

Comments
 (0)