15
15
)
16
16
17
17
# TODO help text
18
- chunk_length = click .option ("-l" , "--chunk-length" , type = int , default = None )
18
+ chunk_length = click .option (
19
+ "-l" ,
20
+ "--chunk-length" ,
21
+ type = int ,
22
+ default = None ,
23
+ help = "Chunk size in the variants dimension" ,
24
+ )
19
25
20
- chunk_width = click .option ("-w" , "--chunk-width" , type = int , default = None )
26
+ chunk_width = click .option (
27
+ "-w" ,
28
+ "--chunk-width" ,
29
+ type = int ,
30
+ default = None ,
31
+ help = "Chunk size in the samples dimension" ,
32
+ )
21
33
22
34
version = click .version_option (version = provenance .__version__ )
23
35
@@ -83,13 +95,30 @@ def mkschema(if_path):
83
95
@click .argument ("if_path" , type = click .Path ())
84
96
@click .argument ("zarr_path" , type = click .Path ())
85
97
@verbose
86
- @click .option ("-s" , "--schema" , default = None )
87
- # TODO: these are mutually exclusive with schema, tell click this
98
+ @click .option ("-s" , "--schema" , default = None , type = click .Path (exists = True ))
88
99
@chunk_length
89
100
@chunk_width
101
+ @click .option (
102
+ "-V" ,
103
+ "--max-variant-chunks" ,
104
+ type = int ,
105
+ default = None ,
106
+ help = (
107
+ "Truncate the output in the variants dimension to have "
108
+ "this number of chunks. Mainly intended to help with "
109
+ "schema tuning."
110
+ ),
111
+ )
90
112
@worker_processes
91
113
def encode (
92
- if_path , zarr_path , verbose , schema , chunk_length , chunk_width , worker_processes
114
+ if_path ,
115
+ zarr_path ,
116
+ verbose ,
117
+ schema ,
118
+ chunk_length ,
119
+ chunk_width ,
120
+ max_variant_chunks ,
121
+ worker_processes ,
93
122
):
94
123
"""
95
124
Encode intermediate format (see explode) to vcfzarr
@@ -101,6 +130,7 @@ def encode(
101
130
schema ,
102
131
chunk_length = chunk_length ,
103
132
chunk_width = chunk_width ,
133
+ max_v_chunks = max_variant_chunks ,
104
134
worker_processes = worker_processes ,
105
135
show_progress = True ,
106
136
)
@@ -132,6 +162,9 @@ def convert_vcf(vcfs, out_path, chunk_length, chunk_width, verbose, worker_proce
132
162
@click .argument ("vcfs" , nargs = - 1 , required = True )
133
163
@click .argument ("out_path" , type = click .Path ())
134
164
def validate (vcfs , out_path ):
165
+ """
166
+ Development only, do not use. Will be removed before release.
167
+ """
135
168
# FIXME! Will silently not look at remaining VCFs
136
169
vcf .validate (vcfs [0 ], out_path , show_progress = True )
137
170
@@ -158,7 +191,9 @@ def vcf2zarr():
158
191
@verbose
159
192
@chunk_length
160
193
@chunk_width
161
- def convert_plink (in_path , out_path , verbose , worker_processes , chunk_length , chunk_width ):
194
+ def convert_plink (
195
+ in_path , out_path , verbose , worker_processes , chunk_length , chunk_width
196
+ ):
162
197
"""
163
198
In development; DO NOT USE!
164
199
"""
0 commit comments