Skip to content

Commit f710e05

Browse files
author
stefanks
authored
Merge pull request #166 from rmillikin/master
merge
2 parents a7dd19b + 39a36d0 commit f710e05

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

InternalLogic/AnalysisEngine.cs

+12-9
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,19 @@ public void ApplyProteinParsimony(out List<ProteinGroup> proteinGroups)
300300
// grab indistinguishable proteins
301301
foreach (var proteinGroup in proteinGroups)
302302
{
303-
foreach (var kvp in newDict)
303+
if (!proteinGroup.UniquePeptideList.Any())
304304
{
305-
if (!parsimonyDict.ContainsKey(kvp.Key))
305+
foreach (var kvp in newDict)
306306
{
307-
if (kvp.Value.Count == proteinGroup.PeptideList.Count)
307+
if (!parsimonyDict.ContainsKey(kvp.Key))
308308
{
309-
if (kvp.Value.SetEquals(proteinGroup.PeptideList))
309+
if (kvp.Value.Count == proteinGroup.PeptideList.Count)
310310
{
311-
proteinGroup.Proteins.Add(kvp.Key);
312-
parsimonyDict.Add(kvp.Key, kvp.Value);
311+
if (kvp.Value.SetEquals(proteinGroup.PeptideList))
312+
{
313+
proteinGroup.Proteins.Add(kvp.Key);
314+
parsimonyDict.Add(kvp.Key, kvp.Value);
315+
}
313316
}
314317
}
315318
}
@@ -414,8 +417,8 @@ public void ScoreProteinGroups(List<ProteinGroup> proteinGroups, List<NewPsmWith
414417

415418
if (foundPsm)
416419
{
417-
thisProteinGroupsPsmList.Add(psm);
418-
//thisProteinGroupsNewPeptideList.Add(peptide);
420+
if(psm.qValue <= 0.01)
421+
thisProteinGroupsPsmList.Add(psm);
419422
}
420423
}
421424
proteinGroup.PsmList = thisProteinGroupsPsmList;
@@ -430,7 +433,7 @@ public void ScoreProteinGroups(List<ProteinGroup> proteinGroups, List<NewPsmWith
430433
newPeptideList.Add(peptide);
431434

432435
if (proteinGroup.UniquePeptideList.Contains(peptide))
433-
{
436+
{
434437
newUniquePeptideList.Add(peptide);
435438
}
436439
}

0 commit comments

Comments
 (0)