Project a secondary cohort into the state-space of a primary cohort
Source:R/17-project.R
project_into.RdImplements the Rockne2020 validation projection: $$X_{\rm secondary} \cdot V^*_{\rm primary}$$ which places secondary samples on the same coordinate axes as the primary, without re-fitting the decomposition.
Arguments
- std_primary
StateTransitionDatawithmetadata()$stage1present — supplies the \(V^*\) loadings.- std_secondary
StateTransitionDatato project. Must share the same feature space (genes) as the primary.- layer_primary
integer — which layer of the primary object provides the \(V^*\) loadings (default 1).
- layer_secondary
integer — which single layer of the secondary object to project (default 1).
project_into()always projects exactly one layer per call — a projected layer was never itself decomposed, so it carries no signal-strength information of its own to combine across layers. If the secondary cohort has its own multi-layer structure (e.g. its own disease/control split), callproject_into()once per layer, varyinglayer_secondary.