Skip to content

Commit 6c27470

Browse files
author
stefanks
committed
organize
1 parent 32588e2 commit 6c27470

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

EngineLayer/Analysis/BinTreeStructure.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,14 @@ private static double getSigma(double thisMassShift, int thisP, int i, List<doub
140140
{
141141
lookingAtP = p[currentDown];
142142
if (lookingAtP > thisP)
143-
{
144143
return distDown;
145-
}
146144
currentDown--;
147145
}
148146
else
149147
{
150148
lookingAtP = p[currentUp];
151149
if (lookingAtP > thisP)
152-
{
153150
return distUp;
154-
}
155151
currentUp++;
156152
}
157153
}
@@ -160,7 +156,6 @@ private static double getSigma(double thisMassShift, int thisP, int i, List<doub
160156
private void OverlappingIonSequences()
161157
{
162158
foreach (Bin bin in FinalBins)
163-
{
164159
foreach (var hm in bin.uniquePSMs.Where(b => !b.Value.Item3.IsDecoy))
165160
{
166161
var ya = hm.Value.Item3.thisPSM.newPsm.matchedIonsList;
@@ -171,7 +166,6 @@ private void OverlappingIonSequences()
171166
&& ya[ProductType.B].Last(b => b > 0) + ya[ProductType.Y].Last(b => b > 0) > hm.Value.Item3.thisPSM.PeptideMonoisotopicMass)
172167
bin.Overlapping++;
173168
}
174-
}
175169
}
176170

177171
private void IdentifyFracWithSingle()
@@ -193,18 +187,12 @@ private void IdentifyAAsInCommon()
193187
{
194188
var chars = new HashSet<char>();
195189
for (int i = 0; i < hehe.Item1.Count(); i++)
196-
{
197190
chars.Add(hehe.Item1[i]);
198-
}
199191
foreach (var ch in chars)
200-
{
201192
if (bin.AAsInCommon.ContainsKey(ch))
202-
{
203193
bin.AAsInCommon[ch]++;
204-
}
205194
else
206195
bin.AAsInCommon.Add(ch, 1);
207-
}
208196
}
209197
}
210198
}
@@ -225,9 +213,7 @@ private void IdentifyMods()
225213
{
226214
inModLevel++;
227215
if (inModLevel == 1)
228-
{
229216
continue;
230-
}
231217
}
232218
else if (ye.Equals(']'))
233219
{
@@ -243,9 +229,7 @@ private void IdentifyMods()
243229
continue;
244230
}
245231
if (inModLevel > 0)
246-
{
247232
currentMod += ye;
248-
}
249233
}
250234
}
251235
}
@@ -262,15 +246,11 @@ private void IdentifyResidues()
262246
if (bestScore >= hehe.Item3.thisPSM.Score + 1 && !hehe.Item3.IsDecoy)
263247
{
264248
for (int i = 0; i < hehe.Item1.Count(); i++)
265-
{
266249
if (bestScore - hehe.Item3.thisPSM.LocalizedScores[i] < 0.5)
267-
{
268250
if (bin.residueCount.ContainsKey(hehe.Item1[i]))
269251
bin.residueCount[hehe.Item1[i]]++;
270252
else
271253
bin.residueCount.Add(hehe.Item1[i], 1);
272-
}
273-
}
274254
if (hehe.Item3.thisPSM.LocalizedScores.Max() - hehe.Item3.thisPSM.LocalizedScores[0] < 0.5)
275255
bin.NlocCount++;
276256
if (hehe.Item3.thisPSM.LocalizedScores.Max() - hehe.Item3.thisPSM.LocalizedScores.Last() < 0.5)
@@ -328,12 +308,8 @@ private void IdentifyCombos(double v)
328308
{
329309
var okk = new HashSet<string>();
330310
foreach (var hm in ok)
331-
{
332311
if (Math.Abs(hm.Item1 + hm.Item2 - bin.MassShift) <= v && bin.CountTarget < hm.Item3)
333-
{
334312
okk.Add("Combo " + Math.Min(hm.Item1, hm.Item2).ToString("F3", CultureInfo.InvariantCulture) + " and " + Math.Max(hm.Item1, hm.Item2).ToString("F3", CultureInfo.InvariantCulture));
335-
}
336-
}
337313
bin.combos = string.Join(" or ", okk);
338314
}
339315
}
@@ -349,26 +325,18 @@ private void IdentifyAA(double v)
349325
if (Residue.TryGetResidue(c, out residue))
350326
{
351327
if (Math.Abs(residue.MonoisotopicMass - bin.MassShift) <= v)
352-
{
353328
ok.Add("Add " + residue.Name);
354-
}
355329
if (Math.Abs(residue.MonoisotopicMass + bin.MassShift) <= v)
356-
{
357330
ok.Add("Remove " + residue.Name);
358-
}
359331
for (char cc = 'A'; cc <= 'Z'; cc++)
360332
{
361333
Residue residueCC;
362334
if (Residue.TryGetResidue(cc, out residueCC))
363335
{
364336
if (Math.Abs(residueCC.MonoisotopicMass + residue.MonoisotopicMass - bin.MassShift) <= v)
365-
{
366337
ok.Add("Add (" + residue.Name + "+" + residueCC.Name + ")");
367-
}
368338
if (Math.Abs(residueCC.MonoisotopicMass + residue.MonoisotopicMass + bin.MassShift) <= v)
369-
{
370339
ok.Add("Remove (" + residue.Name + "+" + residueCC.Name + ")");
371-
}
372340
}
373341
}
374342
}
@@ -397,12 +365,8 @@ private void IdentifyMine(double v)
397365
{
398366
bin.Mine = "";
399367
foreach (MyInfo myInfo in myInfos)
400-
{
401368
if (Math.Abs(myInfo.MassShift - bin.MassShift) <= v)
402-
{
403369
bin.Mine = myInfo.infostring;
404-
}
405-
}
406370
}
407371
}
408372

0 commit comments

Comments
 (0)