Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
try:
colen = int(float(ces[title]))
except:
sys.stderr.write("Could not parse collision energy!\n")
continue
if vector_file:
# get targets
targets = ms2pip_pyx.get_targets(
modpeptide, msms, peaks, float(fragerror), peaks_version
)
psmids.extend([title] * (len(targets[0])))
if "ce" in data.columns:
dvectors.append(
np.array(
ms2pip_pyx.get_vector_ce(
peptide, modpeptide, charge, colen
),
dtype=np.uint16,
)
) # SD: added collision energy
else:
dvectors.append(
np.array(
ms2pip_pyx.get_vector(peptide, modpeptide, charge),
dtype=np.uint16,
)
)
# Collecting targets to dict; works for variable number of ion types
# For C-term ion types (y, y++, z), flip the order of targets,
# for correct order in vectors DataFrame