File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Architecture callbacks."""
22
3- import pytorch_lightning as L
3+ import lightning as L
44
55try :
66 import wandb # type: ignore[import]
Original file line number Diff line number Diff line change 1313from im2deep import _model_ops
1414from im2deep .calibration import Calibration , LinearCCSCalibration
1515from im2deep .constants import DEFAULT_MODEL , DEFAULT_MULTI_MODEL
16- from im2deep .utils import validate_psm_list
16+ from im2deep ._io_helpers import validate_psm_list
1717
1818LOGGER = logging .getLogger (__name__ )
1919
@@ -45,7 +45,7 @@ def predict(
4545 LOGGER .info ("Predicting CCS values using IM2Deep." )
4646 psm_list = validate_psm_list (psm_list )
4747 return _model_ops .predict (
48- model = model or DEFAULT_MODEL if not multi else DEFAULT_MULTI_MODEL ,
48+ model = model or ( DEFAULT_MODEL if not multi else DEFAULT_MULTI_MODEL ) ,
4949 data = DeepLCDataset .from_psm_list (psm_list , add_ccs_features = True ),
5050 multi = multi ,
5151 ** (predict_kwargs or {}),
@@ -99,6 +99,8 @@ def predict_and_calibrate(
9999
100100 # Assign the predicted CCS to the PSM metadata
101101 for idx , psm in enumerate (psm_list ):
102+ if psm .metadata is None :
103+ psm .metadata = {}
102104 psm .metadata ["predicted_CCS_uncalibrated" ] = predicted_ccs [idx ]
103105
104106 psm_df = psm_list .to_dataframe ()
You can’t perform that action at this time.
0 commit comments