File tree 3 files changed +12
-6
lines changed 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1044,10 +1044,10 @@ def generate_schema(
1044
1044
1045
1045
dimensions = {
1046
1046
"variants" : vcz .VcfZarrDimension (
1047
- size = m , chunk_size = variants_chunk_size or 1000
1047
+ size = m , chunk_size = variants_chunk_size or vcz . DEFAULT_VARIANT_CHUNK_SIZE
1048
1048
),
1049
1049
"samples" : vcz .VcfZarrDimension (
1050
- size = n , chunk_size = samples_chunk_size or 10000
1050
+ size = n , chunk_size = samples_chunk_size or vcz . DEFAULT_SAMPLE_CHUNK_SIZE
1051
1051
),
1052
1052
# ploidy added conditionally below
1053
1053
"alleles" : vcz .VcfZarrDimension (
Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ def generate_schema(
72
72
# Define dimensions with sizes and chunk sizes
73
73
dimensions = {
74
74
"variants" : vcz .VcfZarrDimension (
75
- size = m , chunk_size = variants_chunk_size or 1000
75
+ size = m , chunk_size = variants_chunk_size or vcz . DEFAULT_VARIANT_CHUNK_SIZE
76
76
),
77
77
"samples" : vcz .VcfZarrDimension (
78
- size = n , chunk_size = samples_chunk_size or 10000
78
+ size = n , chunk_size = samples_chunk_size or vcz . DEFAULT_SAMPLE_CHUNK_SIZE
79
79
),
80
80
"ploidy" : vcz .VcfZarrDimension (size = 2 ),
81
81
"alleles" : vcz .VcfZarrDimension (size = 2 ),
Original file line number Diff line number Diff line change 15
15
logger = logging .getLogger (__name__ )
16
16
17
17
ZARR_SCHEMA_FORMAT_VERSION = "0.5"
18
+ DEFAULT_VARIANT_CHUNK_SIZE = 1000
19
+ DEFAULT_SAMPLE_CHUNK_SIZE = 10_000
18
20
DEFAULT_ZARR_COMPRESSOR = numcodecs .Blosc (cname = "zstd" , clevel = 7 )
19
21
DEFAULT_ZARR_COMPRESSOR_GENOTYPES = numcodecs .Blosc (
20
22
cname = "zstd" , clevel = 7 , shuffle = numcodecs .Blosc .BITSHUFFLE
@@ -273,8 +275,12 @@ def __init__(
273
275
self .defaults = defaults
274
276
if dimensions is None :
275
277
dimensions = {
276
- "variants" : VcfZarrDimension (size = 0 , chunk_size = 1000 ),
277
- "samples" : VcfZarrDimension (size = 0 , chunk_size = 10_000 ),
278
+ "variants" : VcfZarrDimension (
279
+ size = 0 , chunk_size = DEFAULT_VARIANT_CHUNK_SIZE
280
+ ),
281
+ "samples" : VcfZarrDimension (
282
+ size = 0 , chunk_size = DEFAULT_SAMPLE_CHUNK_SIZE
283
+ ),
278
284
}
279
285
self .dimensions = dimensions
280
286
You can’t perform that action at this time.
0 commit comments