@@ -81,7 +81,7 @@ def explode(vcfs, out_path, verbose, worker_processes, column_chunk_size):
81
81
@click .command
82
82
@click .argument ("vcfs" , nargs = - 1 , required = True )
83
83
@click .argument ("out_path" , type = click .Path ())
84
- @click .argument ( "num_partitions " , type = int , required = True )
84
+ @click .option ( "-n" , "--target_num_partitions " , type = int , required = True )
85
85
@verbose
86
86
@worker_processes
87
87
def explode_init (vcfs , out_path , num_partitions , verbose , worker_processes ):
@@ -98,19 +98,27 @@ def explode_init(vcfs, out_path, num_partitions, verbose, worker_processes):
98
98
)
99
99
100
100
@click .command
101
- @click .argument ("out_path" , type = click .Path (), required = True )
102
- @click .argument ("start" , type = int , required = True )
103
- @click .argument ("end" , type = int , required = True )
101
+ @click .argument ("path" , type = click .Path ())
102
+ def explode_partition_count (path ):
103
+ """
104
+ Count the actual number of partitions in a parallel conversion of VCF(s) to columnar intermediate format
105
+ """
106
+ print (vcf .explode_partition_count (path ))
107
+
108
+ @click .command
109
+ @click .argument ("path" , type = click .Path (), required = True )
110
+ @click .option ("-s" , "--start" , type = int , required = True )
111
+ @click .option ("-e" , "--end" , type = int , required = True )
104
112
@verbose
105
113
@worker_processes
106
114
@column_chunk_size
107
- def explode_slice (out_path , start , end , verbose , worker_processes , column_chunk_size ):
115
+ def explode_slice (path , start , end , verbose , worker_processes , column_chunk_size ):
108
116
"""
109
117
Convert VCF(s) to columnar intermediate format
110
118
"""
111
119
setup_logging (verbose )
112
120
vcf .explode_slice (
113
- out_path ,
121
+ path ,
114
122
start ,
115
123
end ,
116
124
worker_processes = worker_processes ,
@@ -119,14 +127,14 @@ def explode_slice(out_path, start, end, verbose, worker_processes, column_chunk_
119
127
)
120
128
121
129
@click .command
122
- @click .argument ("out_path " , type = click .Path (), required = True )
130
+ @click .argument ("path " , type = click .Path (), required = True )
123
131
@verbose
124
- def explode_finalise (out_path , verbose ):
132
+ def explode_finalise (path , verbose ):
125
133
"""
126
134
Final step for parallel conversion of VCF(s) to columnar intermediate format
127
135
"""
128
136
setup_logging (verbose )
129
- vcf .explode_finalise (out_path )
137
+ vcf .explode_finalise (path )
130
138
131
139
@click .command
132
140
@click .argument ("if_path" , type = click .Path ())
@@ -248,6 +256,7 @@ def vcf2zarr():
248
256
# TODO figure out how to get click to list these in the given order.
249
257
vcf2zarr .add_command (explode )
250
258
vcf2zarr .add_command (explode_init )
259
+ vcf2zarr .add_command (explode_partition_count )
251
260
vcf2zarr .add_command (explode_slice )
252
261
vcf2zarr .add_command (explode_finalise )
253
262
vcf2zarr .add_command (inspect )
0 commit comments