Skip to content

Commit 78e6e2b

Browse files
Rename plink command
Closes #157
1 parent 23d7897 commit 78e6e2b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/test_plink_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_conversion_identical(tmp_path, args, vcf_file):
4444
result = subprocess.run(cmd, shell=True, cwd=plink_workdir, capture_output=True)
4545
assert result.returncode == 0
4646

47-
cmd = f"plink1.9-vcf {vcz.absolute()} {args}"
47+
cmd = f"view-plink1 {vcz.absolute()} {args}"
4848
runner = ct.CliRunner(mix_stderr=False)
4949
with runner.isolated_filesystem(tmp_path) as working_dir:
5050
vcz_workdir = pathlib.Path(working_dir)

vcztools/cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,15 @@ def view(
254254
)
255255

256256

257-
@click.command(name="plink1.9-vcf")
257+
@click.command
258258
@click.argument("path", type=click.Path())
259259
@click.option("--out", default="plink")
260-
def plink1_9_vcf(path, out):
260+
def view_plink1(path, out):
261261
"""
262-
Convert VCZ to plink, compatible with plink1.9 --vcf.
262+
Generate a plink1 binary fileset compatible with plink1.9 --vcf.
263+
This command is equivalent to running ``vcztools view [filtering options]
264+
-o intermediate.vcf && plink 1.9 --vcf intermediate.vcf [plink options]``
265+
without generating the intermediate VCF.
263266
"""
264267
out_prefix = pathlib.Path(out)
265268
writer = plink.Writer(
@@ -279,4 +282,4 @@ def vcztools_main():
279282
vcztools_main.add_command(index)
280283
vcztools_main.add_command(query)
281284
vcztools_main.add_command(view)
282-
vcztools_main.add_command(plink1_9_vcf)
285+
vcztools_main.add_command(view_plink1)

0 commit comments

Comments
 (0)