ms2pip.result
Definition and handling of MS²PIP results.
- class ms2pip.result.ProcessingResult(*, psm_index, psm, theoretical_mz=None, predicted_intensity=None, observed_intensity=None, correlation=None, feature_vectors=None)[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- as_spectra()[source]
Convert result to predicted and observed spectra.
- Return type:
tuple[PredictedSpectrum | None, ObservedSpectrum | None]
- ms2pip.result.calculate_correlations(results)[source]
Calculate and add Pearson correlations to list of results.
- Parameters:
results (list[ProcessingResult])
- Return type:
None