Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
for i, t in enumerate(targets):
if i in dtargets.keys():
if i % 2 == 0:
dtargets[i].extend(t)
else:
dtargets[i].extend(t[::-1])
else:
if i % 2 == 0:
dtargets[i] = [t]