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 DEBUG message -- or, if named explicitly in columns, raise. .obs never
silently collapses SDRF data.
By default the observations are also reordered to follow the SDRF rows, so an order written
into the SDRF (plate wells, acquisition sequence) carries into .obs and into the category
order every plot derives from it. Readers order .obs by file name or quant-table column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
|
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
|
set_index
|
str | None
|
After projection, replace |
None
|
order_obs
|
bool
|
Reorder every modality's |
True
|
Returns:
| Type | Description |
|---|---|
MuData
|
A copy of |
MuData
|
default, |