@@ -223,7 +223,7 @@ public Dictionary<CompactPeptide, HashSet<PeptideWithSetModifications>> ApplyPro
223
223
foreach ( var peptide in bestProteinPeptideList )
224
224
{
225
225
string peptideBaseSequence = string . Join ( "" , peptide . BaseSequence . Select ( b => char . ConvertFromUtf32 ( b ) ) ) ;
226
-
226
+
227
227
usedPeptides . Add ( peptide ) ;
228
228
usedBaseSequences . Add ( peptideBaseSequence ) ;
229
229
}
@@ -389,7 +389,7 @@ public void ScoreProteinGroups(List<ProteinGroup> proteinGroups, List<NewPsmWith
389
389
// match the peptide base sequence to all of its PSMs
390
390
foreach ( var psm in psmList )
391
391
{
392
- CompactPeptide peptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications ) ;
392
+ CompactPeptide peptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications , fixedModifications ) ;
393
393
string peptideBaseSequence = string . Join ( "" , peptide . BaseSequence . Select ( b => char . ConvertFromUtf32 ( b ) ) ) ;
394
394
List < NewPsmWithFdr > psmListHere ;
395
395
@@ -443,7 +443,7 @@ public void ScoreProteinGroups(List<ProteinGroup> proteinGroups, List<NewPsmWith
443
443
{
444
444
bestScoreSoFar = psm . thisPSM . Score ;
445
445
bestPsm = psm ;
446
- bestPeptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications ) ;
446
+ bestPeptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications , fixedModifications ) ;
447
447
}
448
448
}
449
449
}
@@ -477,7 +477,7 @@ public void ScoreProteinGroups(List<ProteinGroup> proteinGroups, List<NewPsmWith
477
477
HashSet < CompactPeptide > newUniquePeptideList = new HashSet < CompactPeptide > ( ) ;
478
478
foreach ( var psm in proteinGroup . BestPsmList )
479
479
{
480
- CompactPeptide peptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications ) ;
480
+ CompactPeptide peptide = psm . thisPSM . newPsm . GetCompactPeptide ( variableModifications , localizeableModifications , fixedModifications ) ;
481
481
482
482
newPeptideList . Add ( peptide ) ;
483
483
@@ -610,7 +610,7 @@ protected override MyResults RunSpecific()
610
610
{
611
611
var huh = newPsms [ j ] [ i ] ;
612
612
if ( huh != null && huh . score >= 1 )
613
- psmsWithProteinHashSet [ i ] = new PSMwithProteinHashSet ( huh , compactPeptideToProteinPeptideMatching [ huh . GetCompactPeptide ( variableModifications , localizeableModifications ) ] , fragmentTolerance , myMsDataFile , lp ) ;
613
+ psmsWithProteinHashSet [ i ] = new PSMwithProteinHashSet ( huh , compactPeptideToProteinPeptideMatching [ huh . GetCompactPeptide ( variableModifications , localizeableModifications , fixedModifications ) ] , fragmentTolerance , myMsDataFile , lp ) ;
614
614
}
615
615
616
616
var orderedPsmsWithPeptides = psmsWithProteinHashSet . Where ( b => b != null ) . OrderByDescending ( b => b . Score ) ;
@@ -678,6 +678,14 @@ private static void IdentifyPsmsWithMaxMods(BinTreeStructure myTreeStructure)
678
678
}
679
679
}
680
680
681
+ private static void IdentifyFracWithSingle ( BinTreeStructure myTreeStructure )
682
+ {
683
+ foreach ( Bin bin in myTreeStructure . FinalBins )
684
+ {
685
+ bin . FracWithSingle = ( double ) bin . uniquePSMs . Values . Where ( b => ! b . Item3 . IsDecoy && b . Item3 . thisPSM . peptidesWithSetModifications . Count == 1 ) . Count ( ) / bin . uniquePSMs . Values . Where ( b => ! b . Item3 . IsDecoy ) . Count ( ) ;
686
+ }
687
+ }
688
+
681
689
private static void IdentifyAAsInCommon ( BinTreeStructure myTreeStructure )
682
690
{
683
691
foreach ( Bin bin in myTreeStructure . FinalBins )
@@ -966,7 +974,7 @@ private void AddObservedPeptidesToDictionary()
966
974
{
967
975
if ( psm != null )
968
976
{
969
- var cp = psm . GetCompactPeptide ( variableModifications , localizeableModifications ) ;
977
+ var cp = psm . GetCompactPeptide ( variableModifications , localizeableModifications , fixedModifications ) ;
970
978
if ( ! compactPeptideToProteinPeptideMatching . ContainsKey ( cp ) )
971
979
compactPeptideToProteinPeptideMatching . Add ( cp , new HashSet < PeptideWithSetModifications > ( ) ) ;
972
980
}
@@ -995,13 +1003,11 @@ private void AddObservedPeptidesToDictionary()
995
1003
if ( peptide . Length == 1 || peptide . Length > byte . MaxValue - 2 ) // 2 is for indexing terminal modifications
996
1004
continue ;
997
1005
998
- peptide . SetFixedModifications ( fixedModifications ) ;
999
-
1000
- var ListOfModifiedPeptides = peptide . GetPeptideWithSetModifications ( variableModifications , maxModIsoforms , max_mods_for_peptide ) . ToList ( ) ;
1006
+ var ListOfModifiedPeptides = peptide . GetPeptideWithSetModifications ( variableModifications , maxModIsoforms , max_mods_for_peptide , fixedModifications ) . ToList ( ) ;
1001
1007
foreach ( var yyy in ListOfModifiedPeptides )
1002
1008
{
1003
1009
HashSet < PeptideWithSetModifications > v ;
1004
- if ( local . TryGetValue ( new CompactPeptide ( yyy , variableModifications , localizeableModifications ) , out v ) )
1010
+ if ( local . TryGetValue ( new CompactPeptide ( yyy , variableModifications , localizeableModifications , fixedModifications ) , out v ) )
1005
1011
{
1006
1012
v . Add ( yyy ) ;
1007
1013
}
0 commit comments