Skip to content

Commit 209066a

Browse files
Document CLI commands
Closes #161
1 parent 8c7c80f commit 209066a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

vcztools/cli.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def list_commands(self, ctx):
111111
)
112112
@handle_exception
113113
def index(path, nrecords, stats):
114+
"""
115+
Query the number of records in a VCZ dataset. This subcommand only
116+
implements the --nrecords and --stats options and does not build any
117+
indexes.
118+
"""
114119
if nrecords and stats:
115120
raise click.UsageError("Expected only one of --stats or --nrecords options")
116121
if nrecords:
@@ -156,6 +161,15 @@ def query(
156161
include,
157162
exclude,
158163
):
164+
"""
165+
Transform VCZ into user-defined formats with efficient subsetting and
166+
filtering. Intended as a drop-in replacement for bcftools query, where we
167+
replace the VCF file path with a VCZ dataset URL.
168+
169+
This is an early version an not feature complete: if you are missing a
170+
particular piece of functionality please open and issue at
171+
https://github.com/sgkit-dev/vcztools/issues
172+
"""
159173
if list_samples:
160174
# bcftools query -l ignores the --output option and always writes to stdout
161175
output = sys.stdout
@@ -241,6 +255,15 @@ def view(
241255
include,
242256
exclude,
243257
):
258+
"""
259+
Convert VCZ dataset to VCF with efficient subsetting and filtering.
260+
Intended as a drop-in replacement for bcftools view, where
261+
we replace the VCF file path with a VCZ dataset URL.
262+
263+
This is an early version an not feature complete: if you are missing a
264+
particular piece of functionality please open and issue at
265+
https://github.com/sgkit-dev/vcztools/issues
266+
"""
244267
suffix = output.name.split(".")[-1]
245268
# Exclude suffixes which require bgzipped or BCF output:
246269
# https://github.com/samtools/htslib/blob/329e7943b7ba3f0af15b0eaa00a367a1ac15bd83/vcf.c#L3815

0 commit comments

Comments
 (0)