Skip to content

Release/v2 stable#13

Open
EliHei2 wants to merge 31 commits intomainfrom
release/v2-stable
Open

Release/v2 stable#13
EliHei2 wants to merge 31 commits intomainfrom
release/v2-stable

Conversation

@EliHei2
Copy link
Collaborator

@EliHei2 EliHei2 commented Feb 13, 2026

this PR introduces three major CLI workflows and hardens inference/export reliability.

New CLI features:

  • segger predict: checkpoint-only inference with strict checkpoint/data compatibility validation (segger_vocab, segger_me_gene_pairs, n_genes).
  • segger export: unified multi-format export (xenium_explorer|merged|spatialdata|anndata) with raw|spatialdata input resolution and boundary strategy controls.
  • segger plot: metrics visualization from Lightning logs (--quick terminal mode or PNG output).

New capabilities:

  • SpatialData support end-to-end (ingest + export, including optional AnnData table embedding).
  • Alignment-loss pipeline (ME-gene constraints, scheduled weighting, checkpoint metadata persistence).
  • Fragment-mode assignment for unassigned transcripts via tx-tx graph components.

Stability/performance changes:

  • Robust checkpoint-first safety checks to prevent silent inference mismatches.
  • Improved thresholding and memory behavior in segmentation writer.
  • Boundary generation hardening (safer polygon handling + process-to-thread fallback in parallel paths).
  • Expanded lazy optional-dependency handling with clearer failure modes.
  • Substantially expanded tests/CI coverage across CLI, export, alignment, fragment, and SpatialData paths.

EliHei2 and others added 30 commits February 2, 2026 11:16
Features:
- ISTDataModule: Add alignment_loss, scrna_reference_path parameters
- setup_heterodata: Generate ('tx', 'attracts', 'tx') edges with ME gene labels
- LitISTEncoder: Updated check for alignment edges in batch
- Writer: Post-hoc tx-tx similarity computation for fragment mode

New modules:
- models/alignment_loss.py: Vectorized ME gene constraint loss
- validation/me_genes.py: ME gene discovery from scRNA-seq reference
- prediction/fragment.py: GPU/CPU connected components for unassigned transcripts

Tests:
- test_alignment_loss.py: Unit tests + vectorized vs loop correctness
- test_alignment_loss_integration.py: ME gene discovery integration
- test_fragment_mode.py: Connected components tests
- test_prediction_graph.py: Scale factor shrink/expand tests
- test_xenium_export.py: Xenium Explorer format validation

Documentation:
- CLAUDE.md: Updated with completed features and test coverage
- tests/README.md: Test running instructions
- Docstrings for all TODO methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Tobiaspk Tobiaspk mentioned this pull request Mar 4, 2026
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