msmu.pp.to_ptm
Summarise peptide-level data to PTM-level data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
MuData object containing peptide-level data. |
required |
modi_name
|
str
|
Name of the PTM to summarise (e.g., "phospho"). Will be used in the output modality name (eg. phospho_site). |
required |
modification
|
str
|
Modification string (e.g., "[+79.96633]", "(unimod:21)"). |
required |
layer
|
str | None
|
Layer to use for quantification aggregation. If None, the default layer (.X) will be used. Defaults to None. |
None
|
agg_method
|
Literal['median', 'mean', 'sum', 'median_polish', 'directlfq']
|
Aggregation method to use. One of "median", "mean", "sum", "median_polish", or "directlfq". Defaults to "median". "median_polish" applies Tukey's median polish per group and "directlfq" applies the DirectLFQ rollup per group; both assume the quantification is in log2 space (apply log2_transform first). |
'median'
|
top_n
|
int | None
|
Number of top features to consider for summarisation. If None, all features are used. Defaults to None. |
None
|
rank_method
|
Literal['median_intensity', 'total_intensity', 'max_intensity', 'mean_intensity']
|
Method to rank features when selecting top_n. Defaults to "median_intensity". |
'median_intensity'
|
Returns:
| Name | Type | Description |
|---|---|---|
MuData |
MuData
|
MuData object containing PTM-level data. |