Skip to content

Commit

Permalink
Change local alleles default to false
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-Tyler authored and jeromekelleher committed Jul 29, 2024
1 parent 7c78a14 commit 6aaee4f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bio2zarr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def list_commands(self, ctx):
local_alleles = click.option(
"--local-alleles/--no-local-alleles",
show_default=True,
default=True,
default=False,
help="Use local allele fields to reduce the storage requirements of the output.",
)

Expand Down
2 changes: 1 addition & 1 deletion bio2zarr/vcf2zarr/icf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def init(
if compressor is None:
compressor = ICF_DEFAULT_COMPRESSOR
if local_alleles is None:
local_alleles = True
local_alleles = False
vcfs = [pathlib.Path(vcf) for vcf in vcfs]
target_num_partitions = max(target_num_partitions, len(vcfs))

Expand Down
4 changes: 0 additions & 4 deletions bio2zarr/vcf2zarr/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ def verify(vcf_path, zarr_path, show_progress=False):
for colname in root.keys():
if colname.startswith("call") and not colname.startswith("call_genotype"):
vcf_name = colname.split("_", 1)[1]
if vcf_name == "LAA" and vcf_name not in format_headers:
continue # LAA could have been computed during the explode step.
if vcf_name == "LPL" and vcf_name not in format_headers:
continue # LPL could have been computed during the explode step.
vcf_type = format_headers[vcf_name]["Type"]
vcf_number = format_headers[vcf_name]["Number"]
format_fields[vcf_name] = vcf_type, vcf_number, iter(root[colname])
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
compressor=None,
worker_processes=1,
show_progress=True,
local_alleles=True,
local_alleles=False,
)

DEFAULT_DEXPLODE_PARTITION_ARGS = dict()
Expand All @@ -24,7 +24,7 @@
column_chunk_size=64,
compressor=None,
show_progress=True,
local_alleles=True,
local_alleles=False,
)

DEFAULT_ENCODE_ARGS = dict(
Expand Down Expand Up @@ -54,7 +54,7 @@
samples_chunk_size=None,
show_progress=True,
worker_processes=1,
local_alleles=True,
local_alleles=False,
)

DEFAULT_PLINK_CONVERT_ARGS = dict(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_vcf_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ class Test1000G2020Example:
@pytest.fixture(scope="class")
def ds(self, tmp_path_factory):
out = tmp_path_factory.mktemp("data") / "example.vcf.zarr"
vcf2zarr.convert([self.data_path], out, worker_processes=0)
vcf2zarr.convert([self.data_path], out, worker_processes=0, local_alleles=True)
return sg.load_dataset(out)

def test_position(self, ds):
Expand Down

0 comments on commit 6aaee4f

Please sign in to comment.