@@ -28,19 +28,33 @@ public static void TestAnalysisEngineTests()
28
28
var proteinList = new List < Protein > { new Protein ( "MNNNKQQQ" , "accession" , new Dictionary < int , List < MorpheusModification > > ( ) , new int [ 0 ] , new int [ 0 ] , new string [ 0 ] , null , null , 0 , false , false ) } ;
29
29
30
30
PeptideWithPossibleModifications modPep = new PeptideWithPossibleModifications ( 6 , 8 , proteinList . First ( ) , 0 , "ya" ) ;
31
-
32
31
HashSet < PeptideWithSetModifications > value = new HashSet < PeptideWithSetModifications > { modPep . GetPeptideWithSetModifications ( variableModifications , 4096 , 3 ) . First ( ) } ;
32
+ CompactPeptide compactPeptide1 = new CompactPeptide ( value . First ( ) , variableModifications , localizeableModifications ) ;
33
+
34
+ Assert . AreEqual ( "QQQ" , value . First ( ) . BaseSequence ) ;
35
+ PeptideWithPossibleModifications modPep2 = new PeptideWithPossibleModifications ( 1 , 5 , proteinList . First ( ) , 0 , "ya" ) ;
36
+ HashSet < PeptideWithSetModifications > value2 = new HashSet < PeptideWithSetModifications > { modPep2 . GetPeptideWithSetModifications ( variableModifications , 4096 , 3 ) . First ( ) } ;
37
+ CompactPeptide compactPeptide2 = new CompactPeptide ( value2 . First ( ) , variableModifications , localizeableModifications ) ;
38
+
39
+ Assert . AreEqual ( "MNNNK" , value2 . First ( ) . BaseSequence ) ;
33
40
34
- CompactPeptide key = new CompactPeptide ( value . First ( ) , variableModifications , localizeableModifications ) ;
41
+ PeptideWithPossibleModifications modPep3 = new PeptideWithPossibleModifications ( 2 , 5 , proteinList . First ( ) , 0 , "ya" ) ;
42
+ HashSet < PeptideWithSetModifications > value3 = new HashSet < PeptideWithSetModifications > { modPep3 . GetPeptideWithSetModifications ( variableModifications , 4096 , 3 ) . First ( ) } ;
43
+ CompactPeptide compactPeptide3 = new CompactPeptide ( value3 . First ( ) , variableModifications , localizeableModifications ) ;
44
+ Assert . AreEqual ( "NNNK" , value3 . First ( ) . BaseSequence ) ;
35
45
36
- newPsms [ 0 ] = new ParentSpectrumMatch [ ] { new ModernSpectrumMatch ( key , null , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ) } ;
46
+ newPsms [ 0 ] = new ParentSpectrumMatch [ ] { new ModernSpectrumMatch ( compactPeptide1 , null , 1 , 1 , 1 , 2 , 1 , 1 , 1 , 1 , 3 ) ,
47
+ new ModernSpectrumMatch ( compactPeptide2 , null , 2 , 2 , 2 + 132.040 , 3 , 2 , 2 , 2 , 2 , 2 ) ,
48
+ new ModernSpectrumMatch ( compactPeptide3 , null , 3 , 3 , 3 , 4 , 3 , 3 , 3 , 3 , 3 ) } ;
37
49
38
- compactPeptideToProteinPeptideMatching . Add ( key , value ) ;
50
+ compactPeptideToProteinPeptideMatching . Add ( compactPeptide1 , value ) ;
51
+ compactPeptideToProteinPeptideMatching . Add ( compactPeptide2 , value2 ) ;
52
+ compactPeptideToProteinPeptideMatching . Add ( compactPeptide3 , value3 ) ;
39
53
40
54
List < MorpheusModification > fixedModifications = new List < MorpheusModification > ( ) ;
41
55
Action < BinTreeStructure , string > action1 = ( BinTreeStructure l , string s ) => { ; } ;
42
- Tolerance fragmentTolerance = null ;
43
- IMsDataFile < IMzSpectrum < MzPeak > > myMsDataFile = null ;
56
+ Tolerance fragmentTolerance = new Tolerance ( ToleranceUnit . PPM , 10 ) ;
57
+ IMsDataFile < IMzSpectrum < MzPeak > > myMsDataFile = new TestDataFile ( new List < PeptideWithSetModifications > { value . First ( ) , value2 . First ( ) , value3 . First ( ) } ) ;
44
58
45
59
var protease = new Protease ( "Custom Protease" , new List < string > { "K" } , new List < string > ( ) , OldLogicTerminus . C , CleavageSpecificity . Full , null , null , null ) ;
46
60
0 commit comments