Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if "ce" in data.columns:
specdict = (
data[["spec_id", "peptide", "modifications", "ce"]]
.set_index("spec_id")
.to_dict()
)
ces = specdict["ce"]
else:
specdict = (
data[["spec_id", "peptide", "modifications"]].set_index("spec_id").to_dict()
)
peptides = specdict["peptide"]
modifications = specdict["modifications"]
# cols contains the names of the computed features
cols_n = get_feature_names_new()
if "ce" in data.columns:
cols_n.append("ce")
# cols_n = get_feature_names_catboost()
# SD
dvectors = []
dtargets = dict()
psmids = []
mz_buf = []
target_buf = []
prediction_buf = []
peplen_buf = []
charge_buf = []
pepid_buf = []