msmu.pl.plot_intensity
Plot intensity distributions for a modality.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
|
required |
modality
|
str
|
Name of the modality to plot, such as |
required |
layer
|
str | None
|
Quantification layer; |
None
|
groupby
|
str | None
|
Grouping column in observation metadata (or feature metadata where supported). |
None
|
colorby
|
str | None
|
Observation column used to assign sample colors when |
None
|
ptype
|
str
|
|
'hist'
|
template
|
str
|
Registered |
DEFAULT_TEMPLATE
|
bins
|
int
|
Number of histogram bins; ignored by box and violin plots. |
30
|
obs_column
|
str | None
|
Sample identifier in |
None
|
kwargs
|
str
|
Additional |
{}
|
Returns:
| Type | Description |
|---|---|
Figure
|
|
Notes
Axes assume log2 intensities. Apply log2_transform beforehand when appropriate; this function does not log-transform values. Quantification and embeddings are unchanged. Resolving an existing sample-identifier column can convert that column in mdata.obs to categorical; pass a copy to preserve its dtype.
Examples:
import msmu as mm
fig = mm.pl.plot_intensity(mdata, modality="protein", ptype="box")
fig.show()