diff options
| author | Arun Isaac | 2026-08-26 23:40:18 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-08-27 00:05:06 +0100 |
| commit | ce37e2302f0f4fa06225078b466c74332395e846 (patch) | |
| tree | 662859a4192b02eccdca0857a40cad14ced28fe8 | |
| parent | 09b8f95e5f893cbb3a2532bed3b7325c2b376d4c (diff) | |
| download | domagi-ce37e2302f0f4fa06225078b466c74332395e846.tar.gz domagi-ce37e2302f0f4fa06225078b466c74332395e846.tar.lz domagi-ce37e2302f0f4fa06225078b466c74332395e846.zip | |
Provide type and metavar for depth --bed-input.
We also fix the test to pass in a string rather than a Path.
| -rw-r--r-- | domagi/domagi.py | 5 | ||||
| -rw-r--r-- | tests/test_domagi.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/domagi/domagi.py b/domagi/domagi.py index 21d5d01..8a5bedc 100644 --- a/domagi/domagi.py +++ b/domagi/domagi.py @@ -178,6 +178,11 @@ def crush(con, outfile, threads, progress): multiple=True, help="only compute the depth of the given path") @click.option("-b", "--bed-input", + type=click.Path(exists=True, + file_okay=True, + dir_okay=False, + readable=True), + metavar="FILE", help="BED file of windows to compute depth over") @common_options def depth(con, graph_depth_table, paths, bed_input, threads, progress): diff --git a/tests/test_domagi.py b/tests/test_domagi.py index 621c8c9..8f92de6 100644 --- a/tests/test_domagi.py +++ b/tests/test_domagi.py @@ -199,7 +199,7 @@ def test_domagi_depth_bed_windows(tmp_path, request, domagi_db_name, bed_windows domagi_db = request.getfixturevalue(domagi_db_name) runner = CliRunner() result = runner.invoke(main, ["depth", - "--bed-input", bed_windows, + "--bed-input", str(bed_windows), "--db", domagi_db]) assert result.exit_code == 0 assert_frame_equal(pd.read_csv(expected_output, sep="\t"), |
