im2deep.core

IM2Deep core functionality.

im2deep.core.predict(psm_list, model=None, multi=False, predict_kwargs=None)[source]

Predict CCS values for a list of PSMs using a trained model.

Parameters:
  • psm_list (PSMList) – List of PSMs to predict CCS values for.

  • model (Module | PathLike | str | None) – Trained model or path to model file. If None, the default IM2Deep model is used.

  • predict_kwargs (dict | None) – Additional keyword arguments to pass to the prediction function.

Returns:

CCS predictions.

Return type:

np.ndarray

im2deep.core.predict_and_calibrate(psm_list, psm_list_cal, psm_list_reference=None, model=None, calibration=None, multi=False, predict_kwargs=None, **kwargs)[source]

Calibrate and predict CCS values for a list of PSMs using a reference PSM list.

Parameters:
  • psm_list (PSMList) – List of PSMs to predict CCS values for.

  • psm_list_reference (PSMList | None) – Reference list of PSMs for calibration.

  • model (Module | PathLike | str | None) – Trained model or path to model file. If None, the default IM2Deep model is used.

  • calibration (LinearCCSCalibration | None) – Calibration object to use for calibration. If None, LinearCCSCalibration is applied.

  • predict_kwargs (dict | None) – Additional keyword arguments to pass to the prediction function.

  • psm_list_cal (PSMList)

  • multi (bool)

Returns:

Calibrated CCS predictions.

Return type:

np.ndarray

im2deep.core.train(psm_list, model_save_path, training_kwargs=None)[source]

Train a new IM2Deep model using the provided PSM list.

Parameters:
  • psm_list – List of PSMs to use for training.

  • model_save_path – Path to save the trained model.

  • training_kwargs – Additional keyword arguments to pass to the training function.

Return type:

None