We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10b7c32 commit e3c0a18Copy full SHA for e3c0a18
1 file changed
im2deep/calibration.py
@@ -399,9 +399,11 @@ def get_charge(pf):
399
400
target_work["peptide_key"] = target_work["peptidoform"].apply(get_peptide_key)
401
target_work["charge"] = target_work["peptidoform"].apply(get_charge)
402
- target_work["CCS"] = target_work["metadata"].apply(
403
- lambda x: x["CCS"] if "CCS" in x else np.nan
404
- )
+
+ if "CCS" not in target_work.columns and "metadata" in target_work.columns:
+ target_work["CCS"] = target_work["metadata"].apply(
405
+ lambda x: x["CCS"] if "CCS" in x else np.nan
406
+ )
407
408
source_work["peptide_key"] = source_work["peptidoform"].apply(get_peptide_key)
409
source_work["charge"] = source_work["peptidoform"].apply(get_charge)
0 commit comments