Skip to content

msmu.pl.plot_missingness

Plot the cumulative distribution of feature completeness.

Parameters:

Name Type Description Default
mdata MuData

MuData containing the selected modality and observation metadata.

required
modality str

Name of the modality to plot, such as "protein" or "psm".

required
layer str | None

Quantification layer; None reads .X.

None
obs_column str | None

Sample identifier in mdata.obs. If omitted, uses .uns["plotting"]["default_obs_column"], then source name/source_name/sample/filename, then the observation index.

None
kwargs str

Additional plotly layout options, for example width=800 or title_text="QC".

{}

Returns:

Type Description
Figure

plotly Figure. Call .show() to display or .write_html("plot.html") to export.

Notes

The x-axis is the percentage of samples with an observed value; the y-axis is the cumulative percentage of features at or below that completeness. 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_missingness(mdata, modality="protein")
fig.show()