You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,35 @@
15
15
## Common Commands
16
16
- Test: `uv run pytest`
17
17
- Lint: `uv run ruff check .`
18
+
- Format: `uv run ruff format .`
18
19
- Type Check: `uv run mypy --config-file pyproject.toml`
20
+
21
+
> **Do NOT use Black.** The project formatter is Ruff exclusively.
22
+
23
+
## Architecture & Design Principles
24
+
25
+
### Optional flags gate optional features
26
+
`--metadata-json-path` is intentionally optional, following the same pattern as `--reference`.
27
+
Neither flag is required to run the core assembly pipeline.
28
+
29
+
| Flag | Without it | With it |
30
+
|---|---|---|
31
+
|`--metadata-json-path`| Minimal mode: all peptides treated as a single pool, no protease splitting, no chain filtering, no contaminant removal | Full mode: protease assignment, chain filtering, contaminant removal |
32
+
|`--reference`| No reference mapping or coverage statistics | Reference-based validation and assembly quality metrics |
33
+
34
+
**Do NOT make `--metadata-json-path` required.** This design exists to support users
35
+
starting from any de novo sequencing tool output, not just InstaNovo.
36
+
37
+
### CSV input assumptions in minimal mode
38
+
When `--metadata-json-path` is absent, **do not assume any InstaNovo-specific columns**
39
+
(including `experiment_name`). The only guaranteed columns are the peptide sequence
40
+
and a confidence score. All protease-based and chain-based logic must be gated
41
+
behind a metadata presence check.
42
+
43
+
### Where to find the gating pattern
44
+
The `--reference` flag handling in `src/instanexus/main.py` is the canonical example
45
+
of how optional features should be gated. Use the same `if metadata is not None:`
46
+
pattern when implementing metadata-optional behavior. Do not refactor unrelated code.
0 commit comments