Skip to content

Commit

Permalink
Add records chunk size and schema options to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
percyfal committed Dec 9, 2024
1 parent bc7813a commit 3a7f17b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion bio2zarr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ def list_commands(self, ctx):
help="Chunk size in the samples dimension",
)

records_chunk_size = click.option(
"-r",
"--records-chunk-size",
type=int,
default=None,
help="Chunk size in the records dimension",
)

schema = click.option("-s", "--schema", default=None, type=click.Path(exists=True))

max_variant_chunks = click.option(
Expand Down Expand Up @@ -581,9 +589,18 @@ def plink2zarr():
type=click.Path(exists=True, dir_okay=False),
)
@new_zarr_path
@schema
@records_chunk_size
@verbose
@force
def bed2zarr_main(bed_path, zarr_path, verbose, force):
def bed2zarr_main(
bed_path,
zarr_path,
schema,
records_chunk_size,
verbose,
force,
):
"""
Convert BED file to the Zarr format. Each BED column will be
converted to a Zarr array with appropriate encoding.
Expand All @@ -596,6 +613,8 @@ def bed2zarr_main(bed_path, zarr_path, verbose, force):
bed2zarr.bed2zarr(
bed_path,
zarr_path,
records_chunk_size=records_chunk_size,
schema_path=schema,
)


Expand Down

0 comments on commit 3a7f17b

Please sign in to comment.