about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--domagi/domagi.py5
-rw-r--r--tests/test_domagi.py2
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"),