Skip to content

Commit 4c25358

Browse files
author
Stefan S
committed
try this
1 parent 1b9a84a commit 4c25358

File tree

7 files changed

+31
-20
lines changed

7 files changed

+31
-20
lines changed

InternalLogic/AnalysisEngine.cs

-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ protected override MyResults RunSpecific()
487487
//At this point have Spectrum-Sequence matching, without knowing which protein, and without know if target/decoy
488488
Status("Adding observed peptides to dictionary...");
489489
AddObservedPeptidesToDictionary();
490-
491490
List<ProteinGroup> proteinGroups = null;
492491
if (doParsimony)
493492
{

InternalLogic/BinTreeStructure.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class BinTreeStructure
99

1010
#region Private Fields
1111

12-
private const int minNumberInBin = 2;
12+
private const int minAdditionalPsmsInBin = 1;
1313

1414
#endregion Private Fields
1515

@@ -67,7 +67,7 @@ internal void GenerateBins(List<NewPsmWithFdr> targetAndDecoyMatches, double dc)
6767
var prelimBins = new HashSet<double>();
6868
foreach (OkBin okbin in listokbin.OrderByDescending(b => b.p))
6969
{
70-
if (okbin.sigma < dc || okbin.p < minNumberInBin)
70+
if (okbin.sigma < dc || okbin.p < minAdditionalPsmsInBin)
7171
continue;
7272
bool add = true;
7373
foreach (double a in prelimBins)

InternalLogicWithFileIO/CalibrationTask/CalibrationTask.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public CalibrationTask(ObservableCollection<ModList> modList)
2424
{
2525
// Set default values here:
2626
MaxMissedCleavages = 2;
27-
Protease = ProteaseDictionary.Instance["trypsin (no proline rule)"];
27+
Protease = ProteaseDictionary.Instance["trypsin"];
2828
MaxModificationIsoforms = 4096;
2929
InitiatorMethionineBehavior = InitiatorMethionineBehavior.Variable;
3030
ProductMassToleranceInDaltons = 0.01;

InternalLogicWithFileIO/GPTMDTask/GPTMDTask.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public GptmdTask(ObservableCollection<ModList> modList)
3030
{
3131
// Set default values here:
3232
MaxMissedCleavages = 2;
33-
Protease = ProteaseDictionary.Instance["trypsin (no proline rule)"];
33+
Protease = ProteaseDictionary.Instance["trypsin"];
3434
MaxModificationIsoforms = 4096;
3535
InitiatorMethionineBehavior = InitiatorMethionineBehavior.Variable;
3636
ProductMassTolerance = new Tolerance(ToleranceUnit.Absolute, 0.01);

InternalLogicWithFileIO/SearchTask/SearchTask.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public SearchTask(IEnumerable<ModList> modList, IEnumerable<SearchMode> inputSea
3232
SearchDecoy = true;
3333
DoHistogramAnalysis = false;
3434
MaxMissedCleavages = 2;
35-
Protease = ProteaseDictionary.Instance["trypsin (no proline rule)"];
35+
Protease = ProteaseDictionary.Instance["trypsin"];
3636
MaxModificationIsoforms = 4096;
3737
InitiatorMethionineBehavior = InitiatorMethionineBehavior.Variable;
3838
ProductMassTolerance = new Tolerance(ToleranceUnit.Absolute, 0.01);

OldInternalLogic/proteases.tsv

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
Name Sequences Inducing Cleavage Sequences Preventing Cleavage Cleavage Terminus Cleavage Specificity PSI-MS Accession Number PSI-MS Name Site Regular Expression Notes
22
Arg-C R C full MS:1001303 Arg-C (?<=R)(?!P)
33
Asp-N D N full MS:1001304 Asp-N (?=[BD])
4-
chymotrypsin F,W,Y P C full MS:1001306 Chymotrypsin (?<=[FYWL])(?!P)
5-
chymotrypsin (no proline rule) F,W,Y C full MS:1001306 Chymotrypsin (?<=[FYWL])
4+
chymotrypsin (don't cleave before proline) F,W,Y P C full MS:1001306 Chymotrypsin (?<=[FYWL])(?!P)
5+
chymotrypsin (cleave before proline) F,W,Y C full MS:1001306 Chymotrypsin (?<=[FYWL])
66
CNBr M C full MS:1001307 CNBr (?<=M)
77
Glu-C E C full
88
Glu-C (with asp) E,D C full
9-
Lys-C K P C full MS:1001309 Lys-C (?<=K)(?!P)
10-
Lys-C (no proline rule) K C full MS:1001310 Lys-C/P (?<=K)
9+
Lys-C (don't cleave before proline) K P C full MS:1001309 Lys-C (?<=K)(?!P)
10+
Lys-C (cleave before proline) K C full MS:1001310 Lys-C/P (?<=K)
1111
Lys-N K N full
12-
semi-trypsin K,R P C semi MS:1001251 Trypsin (?<=[KR])(?!P)
13-
semi-trypsin (no proline rule) K,R C semi MS:1001313 Trypsin/P (?<=[KR])
14-
trypsin K,R P C full MS:1001251 Trypsin (?<=[KR])(?!P)
15-
trypsin (no proline rule) K,R C full MS:1001313 Trypsin/P (?<=[KR])
12+
semi-trypsin K,R C semi MS:1001313 Trypsin/P (?<=[KR])
13+
trypsin K,R C full MS:1001313 Trypsin/P (?<=[KR])
1614
tryptophan oxidation W C full
1715
non-specific A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,U,V,W,Y none full MS:1001956 unspecific cleavage
1816
top-down none none MS:1001955 no cleavage

Test/AnalysisEngineTest.cs

+20-6
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,33 @@ public static void TestAnalysisEngineTests()
2828
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) };
2929

3030
PeptideWithPossibleModifications modPep = new PeptideWithPossibleModifications(6, 8, proteinList.First(), 0, "ya");
31-
3231
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);
3340

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);
3545

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) };
3749

38-
compactPeptideToProteinPeptideMatching.Add(key, value);
50+
compactPeptideToProteinPeptideMatching.Add(compactPeptide1, value);
51+
compactPeptideToProteinPeptideMatching.Add(compactPeptide2, value2);
52+
compactPeptideToProteinPeptideMatching.Add(compactPeptide3, value3);
3953

4054
List<MorpheusModification> fixedModifications = new List<MorpheusModification>();
4155
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() });
4458

4559
var protease = new Protease("Custom Protease", new List<string> { "K" }, new List<string>(), OldLogicTerminus.C, CleavageSpecificity.Full, null, null, null);
4660

0 commit comments

Comments
 (0)