Skip to content

Commit c3a4480

Browse files
add warnings for reference psm list
1 parent b4451d0 commit c3a4480

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

deeplc/core.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def calibrate_and_predict(
9494

9595
# Fit calibration
9696
if calibration is None:
97-
LOGGER.info(
97+
LOGGER.debug(
9898
"No calibration provided, using SplineTransformerCalibration by default."
9999
)
100100
calibration = SplineTransformerCalibration()
@@ -105,6 +105,11 @@ def calibrate_and_predict(
105105

106106
if not calibration.is_fitted:
107107
LOGGER.info("Fitting calibration...")
108+
if any(psm_list_reference["is_decoy"]):
109+
LOGGER.warning(
110+
"Reference PSM list contains decoy PSMs. "
111+
"These will be included in the calibration fitting."
112+
)
108113
target_rt_cal = np.array(psm_list_reference["retention_time"], dtype=np.float32)
109114
source_rt_cal = predict(
110115
psm_list=psm_list_reference,
@@ -186,6 +191,13 @@ def finetune_and_predict(
186191

187192
# TODO: Is this necessary? Should it work equally well without calibration?
188193
LOGGER.info("Fitting calibration with fine-tuned model predictions...")
194+
if any(
195+
psm_list_reference["is_decoy"]
196+
): # remove this one since already in finetune?
197+
LOGGER.warning(
198+
"Reference PSM list contains decoy PSMs. "
199+
"These will be included in the calibration fitting."
200+
)
189201
target_rt_cal = np.array(psm_list_reference["retention_time"], dtype=np.float32)
190202
source_rt_cal = predict(
191203
psm_list=psm_list_reference,
@@ -227,6 +239,11 @@ def finetune(
227239
228240
"""
229241
LOGGER.info("Fine-tuning model...")
242+
if any(psm_list_reference["is_decoy"]):
243+
LOGGER.warning(
244+
"Reference PSM list contains decoy PSMs. "
245+
"These will be included in the calibration fitting."
246+
)
230247
reference_dataset = DeepLCDataset.from_psm_list(psm_list_reference)
231248
finetuned_model = _model_ops.train(
232249
model=model or DEFAULT_MODEL,

0 commit comments

Comments
 (0)