msmu.tl.compute_precursor_isolation_purity
Calculate precursor isolation purity for PSMs in the given MuData object and mzML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
|
required |
mzml_paths
|
str | Path | list
|
Full path(s) to the mzML file. |
required |
tolerance
|
float
|
Tolerance for precursor purity calculation. Default is |
20.0
|
unit_ppm
|
bool
|
Whether to use ppm for tolerance. Default is |
True
|
Returns:
| Type | Description |
|---|---|
MuData
|
|
Notes
Requires psm.var columns filename and scan_num and matching local mzML files. Returns a copy with scores in psm.var["purity"]; the input is unchanged. pyopenms (Röst et al., 2014) is loaded at execution time. For standalone results and plotting, see compute_precursor_isolation_purity_from_mzml.
Examples:
import msmu as mm
mdata = mm.tl.compute_precursor_isolation_purity(mdata, ["sample.mzML"])
References
Röst, H. L., Schmitt, U., Aebersold, R., and Malmström, L. pyOpenMS: a Python-based interface to the OpenMS mass-spectrometry algorithm library. Proteomics 14(1), 74–77 (2014). https://doi.org/10.1002/pmic.201300246.