Skip to content

Add a gated parallel domain map that leaves the protein path unchanged - #110

Merged
ahmedhosny merged 2 commits into
mainfrom
feat/native-domain-maps
Aug 18, 2026
Merged

Add a gated parallel domain map that leaves the protein path unchanged#110
ahmedhosny merged 2 commits into
mainfrom
feat/native-domain-maps

Conversation

@ahmedhosny

Copy link
Copy Markdown
Contributor

Summary

  • Protein search/cluster still always run with the same inputs, directories, and final_results filenames.
  • If a query has two or more TED (or user-TSV) domains after min_domain_length, a separate DAG (Snakefile_domain) searches each cropped query domain and writes *_domain maps. Single-domain queries skip that path (domain_map: auto|off).
  • Domain HTML adds parent / CATH / chopping overlays; TM-score layers are vs query domains only.

Test plan

  • CI make test (mocked search + cluster pipeline, plus new domain unit/integration tests)
  • Domain unit tests: 36 passed locally (test_domain_utils, test_assign_domains, test_aggregate_domain_hits, test_join_domain_features)
  • Live lysozyme P00698 (1 TED domain): gate off, protein map only, no *_domain.html
  • Live actin P60709 (3 TED domains): protein + domain maps
  • Live albumin P02768 (5 TED domains): protein + domain maps

pytest -m live_ted is opt-in (TED schema check for P00698 chopping 22-141).

Made with Cursor

ahmedhosny and others added 2 commits August 18, 2026 14:55
When a query has two or more TED or user domains, run an independent BLAST/Foldseek path into *_domain outputs. Single-domain queries skip that DAG entirely.

Co-authored-by: Cursor <cursoragent@cursor.com>
The pandas conda env has no requests, so mocked search-mode CI died in extract_foldseek_hits after it started importing tests.mocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ahmedhosny
ahmedhosny merged commit cd4bee9 into main Aug 18, 2026
3 checks passed
@ahmedhosny
ahmedhosny deleted the feat/native-domain-maps branch August 18, 2026 23:31
mrubash1 added a commit to mrubash1/ProteinCartography that referenced this pull request Aug 19, 2026
`make test` is `pytest -vv -s .`, so every invocation drives the whole
pipeline three times: search mode, cluster mode, and the domain map added
in Arcadia-Science#110. On this machine the default suite does not finish inside ten
minutes; with these three deselected it is 61 tests in 0.6 seconds.

Two of the three are slow because they do real work. The third,
test_pipeline_in_cluster_mode, polls the live public Foldseek server, so
its duration is not under this repository's control at all and a
contributor with no network cannot run the default suite to completion.

This follows the convention the repo already uses for exactly this
situation. `live_ted` is registered as a marker and excluded through
`addopts`; `slow` is now registered and excluded the same way, so no new
command-line flag or conftest hook is introduced. Running them stays a
one-liner:

    pytest -m slow                 # just these three
    pytest -m ""                   # everything, as today

Nothing about the tests themselves changes, and CI that wants them can
ask for them by name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv8XcYwawycxfLGk4bnz21
mrubash1 added a commit to mrubash1/ProteinCartography that referenced this pull request Aug 21, 2026
The walkthrough's summary line read "Offline, about two minutes after the conda
environments exist, 36 rules." All three claims were wrong, and the first one
matters most: a reader who believes the demo is offline will run it somewhere it
cannot reach the network and get a failure with no explanation attached.

MEASURED, on a cleaned output tree, rather than predicted:

  wall time                     62 s on an 8-core laptop
  live ted.cathdb.info requests 11, one per input protein
  dry-run rule count            37
  runtime step count            80

`demo/multispace/config.yml` never sets `domain_map` and the default is "auto"
(config_utils.py:143), so in cluster mode the domain query gate is handed every
.pdb in input_dir -- all eleven. The evidence is left on disk by the run itself:
output/domain_path/ted_cache/ holds exactly eleven .ted.json files, ten of which
came back with domains, and gate.txt reads "on".

THE TWO COUNTS ARE DIFFERENT MEASUREMENTS AND THE README NOW SAYS SO. 37 is
rules in the DAG; 80 is steps executed, because several rules run once per
protein or per space. The old line said 36, which was neither of them. This is
the same confusion CLAUDE.md already flags, now fixed in the document a new
contributor actually reads first.

This does NOT set `domain_map: "off"`. Turning the demo genuinely offline
deletes 43 of its 80 runtime steps, removes the only end-to-end execution of PR
Arcadia-Science#110's domain checkpoint anywhere in CI, and moves a DAG count that is pinned in
two places. That is a real change with a real trade-off and it is deliberately
not being made here; this commit only stops the document from denying what the
code does.

Documentation only. Unit 1328 passed / 111 skipped / 1 deselected, UNCHANGED --
no test reads this file. ruff check, ruff format (144 unchanged) and snakefmt
clean. DAG dry runs 17 / 26 / 37, all unmoved. `git diff --name-only` is this
README alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SM7RDuLF3HaUcbbf5gchSo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant