Skip to content

Commit d945e5b

Browse files
Kenji FukushimaKenji Fukushima
authored andcommitted
Rename analyze outputs to search
1 parent 78d79c6 commit d945e5b

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ csubst search --alignment_file alignment.fa.gz --rooted_tree_file tree.nwk --for
6262
CSUBST provides five main subcommands:
6363

6464
- `csubst dataset`: generate bundled example datasets (e.g., `PGK`, `PEPC`).
65-
- `csubst search` (legacy alias: `csubst analyze`): run convergence analysis and output metrics such as `omegaC`, `dNC`, and `dSC`.
65+
- `csubst search` (legacy alias: `csubst analyze`): run convergence analysis and output metrics such as `omegaC`, `dNC`, and `dSC`. Outputs are written to `csubst_search/` by default.
6666
- `csubst inspect`: summarize branch mappings and inspect ancestral states.
6767
- `csubst sites` (legacy alias: `csubst site`): compute site-wise combinatorial substitutions for selected branch combinations, generate tree + site summary plots, and optionally map sites to protein structures.
6868
- `csubst simulate`: simulate codon sequence evolution under user-defined convergent scenarios.

csubst/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.11.1'
1+
__version__ = '1.11.2'

csubst/csubst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ _OUTPUT_NAMESPACE_DEFAULTS = {
4242
'output_prefix': 'csubst',
4343
},
4444
'search': {
45-
'outdir': 'csubst_analyze',
45+
'outdir': 'csubst_search',
4646
'output_prefix': 'csubst',
4747
},
4848
'analyze': {
49-
'outdir': 'csubst_analyze',
49+
'outdir': 'csubst_search',
5050
'output_prefix': 'csubst',
5151
},
5252
'inspect': {
@@ -279,7 +279,7 @@ def _build_parser():
279279
psr_co.add_argument('--write_instantaneous_rate_matrix', metavar='yes|no', default='no', type=strtobool,
280280
help='default=%(default)s: Write csubst instantaneous codon rate matrix TSV.')
281281

282-
psr_out_analyze = _make_output_parent_parser(default_outdir='csubst_analyze', default_prefix='csubst')
282+
psr_out_analyze = _make_output_parent_parser(default_outdir='csubst_search', default_prefix='csubst')
283283
psr_out_inspect = _make_output_parent_parser(default_outdir='csubst_inspect', default_prefix='csubst')
284284
psr_out_simulate = _make_output_parent_parser(default_outdir='csubst_simulate', default_prefix='csubst')
285285

@@ -361,7 +361,7 @@ def _build_parser():
361361
'"auto" uses --sa_state_cache_file when a compatible cache exists, otherwise computes and writes it. '
362362
'"yes" requires a compatible cache file. "no" disables cache read/write.')
363363
psr_rc.add_argument('--sa_state_cache_file', metavar='PATH', default=_default_sa_state_cache_file(), type=str,
364-
help='default=%(default)s: Shared 3Di-state cache file path used by analyze and inspect.')
364+
help='default=%(default)s: Shared 3Di-state cache file path used by search and inspect.')
365365
psr_rc.add_argument('--sa_iqtree_model', metavar='STR', default='GTR', type=str,
366366
help='default=%(default)s: IQ-TREE model for --sa_asr_mode direct with --nonsyn_recode 3di20 '
367367
'(used with --seqtype MORPH).')

tests/test_cli_logging.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ def test_cli_writes_help_output_to_csubst_log(tmp_path):
3131
def test_cli_writes_stderr_output_to_csubst_log(tmp_path):
3232
result = _run_csubst(["search", "--does_not_exist"], cwd=tmp_path)
3333
assert result.returncode != 0
34-
log_file = tmp_path / "csubst_analyze" / "csubst.log"
34+
log_file = tmp_path / "csubst_search" / "csubst.log"
3535
assert log_file.exists()
3636
log_text = log_file.read_text(encoding="utf-8")
3737
assert "error:" in log_text.lower()
3838
assert "--does_not_exist" in log_text
3939

4040

41-
def test_legacy_analyze_alias_still_writes_to_csubst_analyze_log(tmp_path):
41+
def test_legacy_analyze_alias_still_writes_to_csubst_search_log(tmp_path):
4242
result = _run_csubst(["analyze", "--does_not_exist"], cwd=tmp_path)
4343
assert result.returncode != 0
44-
log_file = tmp_path / "csubst_analyze" / "csubst.log"
44+
log_file = tmp_path / "csubst_search" / "csubst.log"
4545
assert log_file.exists()
4646
log_text = log_file.read_text(encoding="utf-8")
4747
assert "error:" in log_text.lower()
@@ -95,11 +95,11 @@ def test_subcommand_output_namespace_defaults_are_command_specific():
9595
parser = ns["_build_parser"]()
9696

9797
search = parser.parse_args(["search"])
98-
assert search.outdir == "csubst_analyze"
98+
assert search.outdir == "csubst_search"
9999
assert search.output_prefix == "csubst"
100100

101101
analyze = parser.parse_args(["analyze"])
102-
assert analyze.outdir == "csubst_analyze"
102+
assert analyze.outdir == "csubst_search"
103103
assert analyze.output_prefix == "csubst"
104104

105105
inspect = parser.parse_args(["inspect"])

tests/test_cli_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def _resolve_log_path(repo_root, args):
1616
if args[0] == "simulate":
1717
return repo_root / "csubst_simulate" / "csubst.log"
1818
if args[0] == "search":
19-
return repo_root / "csubst_analyze" / "csubst.log"
19+
return repo_root / "csubst_search" / "csubst.log"
2020
if args[0] == "analyze":
21-
return repo_root / "csubst_analyze" / "csubst.log"
21+
return repo_root / "csubst_search" / "csubst.log"
2222
if args[0] == "inspect":
2323
return repo_root / "csubst_inspect" / "csubst.log"
2424
if args[0] == "sites":

0 commit comments

Comments
 (0)