Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
dtargets[i] = [t[::-1]]
elif tableau:
numby = 0
numall = 0
explainedby = 0
explainedall = 0
ts = []
ps = []
predictions = ms2pip_pyx.get_predictions(
peptide, modpeptide, charge, model_id, peaks_version, colen
)
for m, p in zip(msms, peaks):
ft.write("%s;%f;%f;;;0\n" % (title, m, 2 ** p))
# get targets
mzs, targets = ms2pip_pyx.get_targets_all(
modpeptide, msms, peaks, float(fragerror), "all"
)
# get mean by intensity values to normalize!; WRONG !!!
maxt = 0.0
maxp = 0.0
it = 0
for cion in [1, 2]:
for ionnumber in range(len(modpeptide) - 3):
for lion in ["a", "b-h2o", "b-nh3", "b", "c"]:
if (lion == "b") & (cion == 1):
if maxt < (2 ** targets[it]) - 0.001:
maxt = (2 ** targets[it]) - 0.001
if maxp < (2 ** predictions[0][ionnumber]) - 0.001:
maxp = (2 ** predictions[0][ionnumber]) - 0.001
it += 1
for cion in [1, 2]: