@@ -35,6 +35,9 @@ def setup_logging(verbosity):
35
35
@worker_processes
36
36
@click .option ("-c" , "--column-chunk-size" , type = int , default = 64 )
37
37
def explode (vcfs , out_path , verbose , worker_processes , column_chunk_size ):
38
+ """
39
+ Convert VCF(s) to columnar intermediate format
40
+ """
38
41
setup_logging (verbose )
39
42
vcf .explode (
40
43
vcfs ,
@@ -49,6 +52,9 @@ def explode(vcfs, out_path, verbose, worker_processes, column_chunk_size):
49
52
@click .argument ("if_path" , type = click .Path ())
50
53
@verbose
51
54
def inspect (if_path , verbose ):
55
+ """
56
+ Inspect an intermediate format file
57
+ """
52
58
setup_logging (verbose )
53
59
data = vcf .inspect (if_path )
54
60
click .echo (tabulate .tabulate (data , headers = "keys" ))
@@ -57,6 +63,9 @@ def inspect(if_path, verbose):
57
63
@click .command
58
64
@click .argument ("if_path" , type = click .Path ())
59
65
def mkschema (if_path ):
66
+ """
67
+ Generate a schema for zarr encoding
68
+ """
60
69
stream = click .get_text_stream ("stdout" )
61
70
vcf .mkschema (if_path , stream )
62
71
@@ -68,6 +77,9 @@ def mkschema(if_path):
68
77
@click .option ("-s" , "--schema" , default = None )
69
78
@worker_processes
70
79
def encode (if_path , zarr_path , verbose , schema , worker_processes ):
80
+ """
81
+ Encode intermediate format (see explode) to vcfzarr
82
+ """
71
83
setup_logging (verbose )
72
84
vcf .encode (
73
85
if_path ,
@@ -84,6 +96,9 @@ def encode(if_path, zarr_path, verbose, schema, worker_processes):
84
96
@verbose
85
97
@worker_processes
86
98
def convert_vcf (vcfs , out_path , verbose , worker_processes ):
99
+ """
100
+ Convert input VCF(s) directly to vcfzarr (not recommended for large files)
101
+ """
87
102
setup_logging (verbose )
88
103
vcf .convert (vcfs , out_path , show_progress = True , worker_processes = worker_processes )
89
104
@@ -101,6 +116,7 @@ def vcf2zarr():
101
116
pass
102
117
103
118
119
+ # TODO figure out how to get click to list these in the given order.
104
120
vcf2zarr .add_command (explode )
105
121
vcf2zarr .add_command (inspect )
106
122
vcf2zarr .add_command (mkschema )
@@ -116,6 +132,9 @@ def vcf2zarr():
116
132
@click .option ("--chunk-width" , type = int , default = None )
117
133
@click .option ("--chunk-length" , type = int , default = None )
118
134
def convert_plink (in_path , out_path , worker_processes , chunk_width , chunk_length ):
135
+ """
136
+ In development; DO NOT USE!
137
+ """
119
138
plink .convert (
120
139
in_path ,
121
140
out_path ,
0 commit comments