15 Multimodal Expansion

This chapter is the reserved mainline for ADT, ATAC, and multiome workflows. The object contract is now in place so that modality-specific analysis backends can be plugged in later without breaking the navigation model.

15.1 What Is Already Available

sclet now provides lightweight modality helpers and a workflow shell:

  • has_multimodal_adt(sce) and has_multimodal_atac(sce) check whether altExp(sce, "ADT") or altExp(sce, "ATAC") is present.
  • register_multimodal_adt(sce) and register_multimodal_atac(sce) record the modality metadata in the typed state layer, including feature and cell dimensions.
  • RunMultimodalWorkflow() auto-detects available altExps and registers them as a coherent multimodal analysis mainline record.

The intent is not to promise a large backend surface too early, but to make the book structure honest and to establish the contract that future modality analysis will extend.

15.2 Detecting and Registering Modalities

The helpers are designed to be used before and after loading multimodal data into the object.

library(sclet)

# After loading data, check which modalities are present
has_multimodal_adt(sce)   # TRUE if altExp(sce, "ADT") exists
has_multimodal_atac(sce)  # TRUE if altExp(sce, "ATAC") exists

# Register modalities in the state layer
if (has_multimodal_adt(sce)) {
    sce <- register_multimodal_adt(sce, name = "my_ADT")
}

if (has_multimodal_atac(sce)) {
    sce <- register_multimodal_atac(sce, name = "my_ATAC")
}

15.3 One-Step Registration

For convenience, RunMultimodalWorkflow() detects and registers all available modalities in one call. When no altExps are found, it returns the object unchanged with a message.

sce <- RunMultimodalWorkflow(sce, name = "my_multimodal")

15.4 Planned Interface Direction

The current design notes point to three priorities for future work:

  • altExp semantics: altExp("ADT") and altExp("ATAC") are the canonical modality accessors, and the registration helpers are the bridge between the Bioconductor object model and sclet’s state contract.
  • State meaning: each modality gets its own multimodal_* record in the analysis layer and its own entry under the multimodal state type, so downstream code can inspect the modality landscape without guessing.
  • Analysis backends: once the object contract is stable, the next step is to wire modality-specific analysis functions (e.g., ADT-based clustering, ATAC peak calling) into the same Run* / get_* / has_* pattern used throughout sclet.

15.5 Current Guidance

Until dedicated multimodal analysis backends are implemented:

  • Use sclet’s single-cell mainlines as the stable baseline for RNA analysis.
  • Attach ADT or ATAC data through altExp(sce, "ADT") <- adt_sce and register it with register_multimodal_adt(sce).
  • Keep modality-specific analysis explicit in your own scripts for now; the object contract ensures that when backends arrive, the transition will be a matter of calling a Run* function on an already-registered modality.