massdash.peakPickers.ConformerPeakPicker
- class massdash.peakPickers.ConformerPeakPicker(library: SpectralLibraryLoader, pretrained_model_file: str, prediction_threshold: float = 0.5, prediction_type: Literal['logits', 'sigmoided', 'binarized'] = 'logits')
Bases:
objectClass for performing peak picking using the Conformer model.
- transition_group
The transition group object.
- Type:
- pretrained_model_file
The path to the pretrained model file.
- Type:
str
- window_size
The window size for peak picking. Defaults to 175.
- Type:
int, optional
- prediction_threshold
The prediction threshold for peak picking. Defaults to 0.5.
- Type:
float, optional
- prediction_type
The prediction type for peak picking. Defaults to “logits”.
- Type:
str, optional
- onnx_session
The onnx session.
- Type:
onnxruntime.InferenceSession
- _validate_model()
Validate the pretrained model is valid and an onnx model.
- load_model()
Load the pretrained model.
- pick()
Perform peak picking.
- _convertConformerFeatureToTransitionGroupFeatures()
Convert conformer predicted feature to TransitionGroupFeatures.
- load_model()
Load the pretrained model.
- pick(transition_group, max_int_transition: int = 1000) List[TransitionGroupFeature]
Perform peak picking.
- Parameters:
max_int_transition (int, optional) – The maximum intensity transition. Defaults to 1000.
- Returns:
The list of transition group features.
- Return type:
List[TransitionGroupFeature]