Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions barcodeforge/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,46 @@ def cli(ctx, debug):
@click.argument("tree", type=click.Path(exists=True, readable=True))
@click.argument("lineages", type=click.Path(exists=True, readable=True))
@click.option(
"--tree_format",
"-t",
"--tree-format",
type=click.Choice(["newick", "nexus"], case_sensitive=False),
help="Specify the format of the tree file (newick or nexus)",
)
@click.option(
"-u",
"--usher-args",
type=str,
default="",
help="Additional arguments to pass to usher (e.g., '-U -l'). Quote multiple arguments.",
)
@click.option(
"-T",
"--threads",
type=int,
type=click.IntRange(min=1),
metavar="INT",
default=8,
show_default=True,
help="Number of CPUs/threads to use.",
)
@click.option(
"-m",
"--matutils-overlap",
type=float,
type=click.FloatRange(min=0.0, max=1.0),
metavar="FLOAT",
default="0",
default=0,
show_default=True,
help="Value for --set-overlap in matUtils annotate.",
)
@click.option(
"-p",
"--prefix",
type=str,
default="",
show_default=True,
help="Prefix to add to lineage names in the barcode file.",
)
@click.option(
"-c",
"--plot-chunk-size",
type=int,
default=100,
Expand Down
2 changes: 1 addition & 1 deletion barcodeforge/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def resolve_tree_format(
f"[{STYLES['error']}]Error: Unknown tree format for file '{tree_path}'. Extension '{ext}' is not recognized.[/{STYLES['error']}]"
)
console.print(
f"[{STYLES['error']}]Please specify the format using --tree_format ('newick' or 'nexus').[/]"
f"[{STYLES['error']}]Please specify the format using --tree-format ('newick' or 'nexus').[/]"
)
raise click.Abort()

Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def test_barcode_command_nexus_tree(runner, temp_files, mocker):
temp_files["alignment"],
temp_files["tree"],
temp_files["lineages"],
"--tree_format",
"--tree-format",
"nexus",
]
result = runner.invoke(cli, args, catch_exceptions=False)
Expand Down Expand Up @@ -446,7 +446,7 @@ def test_barcode_command_newick_tree_reformat(runner, temp_files, mocker):
temp_files["alignment"],
temp_files["tree"],
temp_files["lineages"],
"--tree_format",
"--tree-format",
"newick",
]
result = runner.invoke(cli, args, catch_exceptions=False)
Expand Down
Loading