msmu.pp.apply_sdrf_to_obs
Project columns of the attached SDRF (uns["sdrf"]) onto each modality's obs.
The SDRF spans both axes, so it is reduced to the obs axis by the match key on and
only columns that are a function of that key (one value per key group) are projected.
Columns that vary within a key (e.g. comment[fraction identifier] under a channel key)
cannot be represented on the obs axis; they are left untouched in uns["sdrf"] and
skipped with a warning -- or, if named explicitly in columns, raise. obs never
silently collapses SDRF data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
MuData with an SDRF attached via :func: |
required |
on
|
str | Sequence[str] | None
|
SDRF column (or list of columns) matched against |
None
|
columns
|
str | Sequence[str] | None
|
SDRF column(s) to project. Default None projects every projectable column; naming a non-projectable column raises instead of skipping it. |
None
|
set_index
|
str | None
|
After projection, replace |
None
|
Returns:
| Type | Description |
|---|---|
MuData
|
A copy of |
MuData
|
|