Skip to content

Commit cb22dbd

Browse files
author
stefanks
authored
Modification fixes
packages
2 parents 5ebc0ab + 7985c09 commit cb22dbd

29 files changed

+311
-330
lines changed

CMD/CMD.csproj

+22-22
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,30 @@
3939
<LangVersion>6</LangVersion>
4040
</PropertyGroup>
4141
<ItemGroup>
42-
<Reference Include="Chemistry, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
43-
<HintPath>..\packages\mzLib.1.0.146\lib\Chemistry.dll</HintPath>
42+
<Reference Include="Chemistry, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
43+
<HintPath>..\packages\mzLib.1.0.148\lib\Chemistry.dll</HintPath>
4444
</Reference>
4545
<Reference Include="FluentCommandLineParser, Version=1.4.3.0, Culture=neutral, processorArchitecture=MSIL">
4646
<HintPath>..\packages\FluentCommandLineParser.1.4.3\lib\net35\FluentCommandLineParser.dll</HintPath>
4747
</Reference>
48-
<Reference Include="ManagedThermoHelperLayer, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
49-
<HintPath>..\packages\mzLib.1.0.146\lib\ManagedThermoHelperLayer.dll</HintPath>
48+
<Reference Include="ManagedThermoHelperLayer, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
49+
<HintPath>..\packages\mzLib.1.0.148\lib\ManagedThermoHelperLayer.dll</HintPath>
5050
</Reference>
51-
<Reference Include="MassSpectrometry, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
52-
<HintPath>..\packages\mzLib.1.0.146\lib\MassSpectrometry.dll</HintPath>
51+
<Reference Include="MassSpectrometry, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
52+
<HintPath>..\packages\mzLib.1.0.148\lib\MassSpectrometry.dll</HintPath>
5353
</Reference>
5454
<Reference Include="MathNet.Numerics, Version=3.17.0.0, Culture=neutral, processorArchitecture=MSIL">
5555
<HintPath>..\packages\MathNet.Numerics.3.17.0\lib\net40\MathNet.Numerics.dll</HintPath>
5656
<Private>True</Private>
5757
</Reference>
58-
<Reference Include="mzIdentML, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
59-
<HintPath>..\packages\mzLib.1.0.146\lib\mzIdentML.dll</HintPath>
58+
<Reference Include="mzIdentML, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
59+
<HintPath>..\packages\mzLib.1.0.148\lib\mzIdentML.dll</HintPath>
6060
</Reference>
61-
<Reference Include="MzLibUtil, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
62-
<HintPath>..\packages\mzLib.1.0.146\lib\MzLibUtil.dll</HintPath>
61+
<Reference Include="MzLibUtil, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
62+
<HintPath>..\packages\mzLib.1.0.148\lib\MzLibUtil.dll</HintPath>
6363
</Reference>
64-
<Reference Include="MzML, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
65-
<HintPath>..\packages\mzLib.1.0.146\lib\MzML.dll</HintPath>
64+
<Reference Include="MzML, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
65+
<HintPath>..\packages\mzLib.1.0.148\lib\MzML.dll</HintPath>
6666
</Reference>
6767
<Reference Include="NetSerializer, Version=4.1.0.0, Culture=neutral, processorArchitecture=MSIL">
6868
<HintPath>..\packages\NetSerializer.4.1.0\lib\net45\NetSerializer.dll</HintPath>
@@ -71,11 +71,11 @@
7171
<Reference Include="Nett, Version=0.6.0.0, Culture=neutral, processorArchitecture=MSIL">
7272
<HintPath>..\packages\Nett.0.6.2\lib\Net40\Nett.dll</HintPath>
7373
</Reference>
74-
<Reference Include="Proteomics, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
75-
<HintPath>..\packages\mzLib.1.0.146\lib\Proteomics.dll</HintPath>
74+
<Reference Include="Proteomics, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
75+
<HintPath>..\packages\mzLib.1.0.148\lib\Proteomics.dll</HintPath>
7676
</Reference>
77-
<Reference Include="Spectra, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
78-
<HintPath>..\packages\mzLib.1.0.146\lib\Spectra.dll</HintPath>
77+
<Reference Include="Spectra, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
78+
<HintPath>..\packages\mzLib.1.0.148\lib\Spectra.dll</HintPath>
7979
</Reference>
8080
<Reference Include="System" />
8181
<Reference Include="System.Core" />
@@ -86,11 +86,11 @@
8686
<Reference Include="System.Data" />
8787
<Reference Include="System.Net.Http" />
8888
<Reference Include="System.Xml" />
89-
<Reference Include="Thermo, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
90-
<HintPath>..\packages\mzLib.1.0.146\lib\Thermo.dll</HintPath>
89+
<Reference Include="Thermo, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
90+
<HintPath>..\packages\mzLib.1.0.148\lib\Thermo.dll</HintPath>
9191
</Reference>
92-
<Reference Include="UsefulProteomicsDatabases, Version=1.0.146.0, Culture=neutral, processorArchitecture=AMD64">
93-
<HintPath>..\packages\mzLib.1.0.146\lib\UsefulProteomicsDatabases.dll</HintPath>
92+
<Reference Include="UsefulProteomicsDatabases, Version=1.0.148.0, Culture=neutral, processorArchitecture=AMD64">
93+
<HintPath>..\packages\mzLib.1.0.148\lib\UsefulProteomicsDatabases.dll</HintPath>
9494
</Reference>
9595
<Reference Include="Zlib.Portable, Version=1.11.0.0, Culture=neutral, processorArchitecture=MSIL">
9696
<HintPath>..\packages\Zlib.Portable.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll</HintPath>
@@ -139,12 +139,12 @@
139139
<PreBuildEvent>
140140
</PreBuildEvent>
141141
</PropertyGroup>
142-
<Import Project="..\packages\mzLib.1.0.146\build\mzLib.targets" Condition="Exists('..\packages\mzLib.1.0.146\build\mzLib.targets')" />
142+
<Import Project="..\packages\mzLib.1.0.148\build\mzLib.targets" Condition="Exists('..\packages\mzLib.1.0.148\build\mzLib.targets')" />
143143
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
144144
<PropertyGroup>
145145
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
146146
</PropertyGroup>
147-
<Error Condition="!Exists('..\packages\mzLib.1.0.146\build\mzLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\mzLib.1.0.146\build\mzLib.targets'))" />
147+
<Error Condition="!Exists('..\packages\mzLib.1.0.148\build\mzLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\mzLib.1.0.148\build\mzLib.targets'))" />
148148
</Target>
149149
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
150150
Other similar extension points exist, see Microsoft.Common.targets.

CMD/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="FluentCommandLineParser" version="1.4.3" targetFramework="net451" />
44
<package id="MathNet.Numerics" version="3.17.0" targetFramework="net451" />
5-
<package id="mzLib" version="1.0.146" targetFramework="net451" />
5+
<package id="mzLib" version="1.0.148" targetFramework="net451" />
66
<package id="NetSerializer" version="4.1.0" targetFramework="net451" />
77
<package id="Nett" version="0.6.2" targetFramework="net451" />
88
<package id="Zlib.Portable" version="1.11.0" targetFramework="net451" />

EngineLayer/Analysis/AnalysisEngine.cs

+13-14
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void ApplyProteinParsimony(out List<ProteinGroup> proteinGroups)
228228
}
229229

230230
// *** done with parsimony
231-
231+
232232
// add indistinguishable proteins
233233
var leftoverProteins = algDictionary.Keys.ToList();
234234
var proteinsToAdd = new List<Protein>();
@@ -254,16 +254,16 @@ public List<ProteinGroup> ConstructProteinGroups(HashSet<PeptideWithSetModificat
254254
{
255255
List<ProteinGroup> proteinGroups = new List<ProteinGroup>();
256256
var proteinToPeptidesMatching = new Dictionary<Protein, HashSet<PeptideWithSetModifications>>();
257-
258-
foreach(var peptide in allPeptides)
257+
258+
foreach (var peptide in allPeptides)
259259
{
260260
HashSet<PeptideWithSetModifications> peptidesHere;
261261
if (proteinToPeptidesMatching.TryGetValue(peptide.Protein, out peptidesHere))
262262
peptidesHere.Add(peptide);
263263
else
264264
proteinToPeptidesMatching.Add(peptide.Protein, new HashSet<PeptideWithSetModifications> { peptide });
265265
}
266-
266+
267267
// build protein group after parsimony (each group only has 1 protein at this point, indistinguishables will be merged during scoring)
268268
foreach (var kvp in proteinToPeptidesMatching)
269269
{
@@ -272,7 +272,7 @@ public List<ProteinGroup> ConstructProteinGroups(HashSet<PeptideWithSetModificat
272272

273273
proteinGroups.Add(new ProteinGroup(new HashSet<Protein>() { kvp.Key }, allPeptidesHere, uniquePeptidesHere));
274274
}
275-
275+
276276
foreach (var proteinGroup in proteinGroups)
277277
{
278278
proteinGroup.AllPeptides.RemoveWhere(p => !proteinGroup.Proteins.Contains(p.Protein));
@@ -654,7 +654,6 @@ public void RunQuantification(List<NewPsmWithFdr> psms, double rtTolerance, doub
654654
}
655655
*/
656656
}
657-
658657
else if (quantificationMode.Equals("TMT"))
659658
{
660659
double[] hcdTmtTagReporterIons = new double[] { 126.127725, 127.124760, 127.131079, 128.128114, 128.134433, 129.131468, 129.137787, 130.134822, 130.141141, 131.138176 };
@@ -670,21 +669,21 @@ public void RunQuantification(List<NewPsmWithFdr> psms, double rtTolerance, doub
670669
if (ms2Scan.DissociationType.Equals(DissociationType.HCD))
671670
{
672671
var possiblePeaks = ms2Scan.MassSpectrum.Where(p => (p.Mz > mzFloor) && (p.Mz < mzCeiling));
673-
672+
674673
foreach (var plex in hcdTmtTagReporterIons)
675674
{
676675
double mzTolHere = ((ppmTolerance / 1e6) * plex);
677676

678677
var goodPeaks = possiblePeaks.Where(p => Math.Abs(p.Mz - plex) < mzTolHere);
679-
678+
680679
int indexOfThisPlex = Array.IndexOf(hcdTmtTagReporterIons, plex);
681680
if (goodPeaks.Any())
682681
bestPlexPeaks[indexOfThisPlex] = goodPeaks.Select(p => p.Intensity).Max();
683682

684683
// if there was a high ppm tolerance used we may have counted close-mass plexes as the same - check for this problem
685-
if(indexOfThisPlex == 2 || indexOfThisPlex == 4 || indexOfThisPlex == 6 || indexOfThisPlex == 8)
684+
if (indexOfThisPlex == 2 || indexOfThisPlex == 4 || indexOfThisPlex == 6 || indexOfThisPlex == 8)
686685
{
687-
if((bestPlexPeaks[indexOfThisPlex] != 0) && (bestPlexPeaks[indexOfThisPlex] == bestPlexPeaks[indexOfThisPlex - 1]))
686+
if ((bestPlexPeaks[indexOfThisPlex] != 0) && (bestPlexPeaks[indexOfThisPlex] == bestPlexPeaks[indexOfThisPlex - 1]))
688687
{
689688
// double counted a plex peak - attempt to fix
690689
var thisPlexsFloor = hcdTmtTagReporterIons[indexOfThisPlex - 1] - ((ppmTolerance / 1e6) * hcdTmtTagReporterIons[indexOfThisPlex - 1]);
@@ -721,7 +720,7 @@ public void RunQuantification(List<NewPsmWithFdr> psms, double rtTolerance, doub
721720
}
722721
//else if (ms2Scan.DissociationType.Equals(DissociationType.ETD))
723722
//{
724-
//
723+
//
725724
//}
726725

727726
psm.thisPSM.newPsm.apexIntensity = bestPlexPeaks;
@@ -862,7 +861,7 @@ protected override MetaMorpheusEngineResults RunSpecific()
862861

863862
if (writePsmsAction != null)
864863
writePsmsAction(orderedPsmsWithFDR, "_allPSMs_" + searchModes[j].FileNameAddition);
865-
864+
866865
if (doHistogramAnalysis)
867866
{
868867
var limitedpsms_with_fdr = orderedPsmsWithFDR.Where(b => (b.QValue <= 0.01)).ToList();
@@ -877,15 +876,15 @@ protected override MetaMorpheusEngineResults RunSpecific()
877876
else
878877
{
879878
Status("Running FDR analysis on unique peptides...", nestedIds);
880-
if(writePsmsAction != null)
879+
if (writePsmsAction != null)
881880
writePsmsAction(DoFalseDiscoveryRateAnalysis(orderedPsmsWithPeptides.GroupBy(b => b.FullSequence).Select(b => b.FirstOrDefault()), searchModes[j]), "_uniquePeptides_" + searchModes[j].FileNameAddition);
882881
}
883882

884883
if (doParsimony)
885884
{
886885
ScoreProteinGroups(proteinGroups[j], orderedPsmsWithFDR);
887886
proteinGroups[j] = DoProteinFdr(proteinGroups[j]);
888-
if(writeProteinGroupsAction != null)
887+
if (writeProteinGroupsAction != null)
889888
writeProteinGroupsAction(proteinGroups[j], searchModes[j].FileNameAddition);
890889
}
891890

EngineLayer/Analysis/BinTreeStructure.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private void OverlappingIonSequences()
160160
foreach (Bin bin in FinalBins)
161161
foreach (var hm in bin.uniquePSMs.Where(b => !b.Value.Item3.IsDecoy))
162162
{
163-
var ya = hm.Value.Item3.thisPSM.newPsm.matchedIonsList;
163+
var ya = hm.Value.Item3.thisPSM.newPsm.matchedIonsListPositiveIsMatch;
164164
if (ya.ContainsKey(ProductType.B)
165165
&& ya.ContainsKey(ProductType.Y)
166166
&& ya[ProductType.B].Any(b => b > 0)

EngineLayer/CalibrationEngine/CalibrationEngine.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private DataPointAquisitionResults GetDataPoints()
223223

224224
// Get the peptide, don't forget to add the modifications!!!!
225225
var SequenceWithChemicalFormulas = identification.thisPSM.SequenceWithChemicalFormulas;
226-
if (SequenceWithChemicalFormulas == null || identification.thisPSM.PeptidesWithSetModifications.First().allModsOneIsNterminus.Any(b => b.Value.neutralLoss != 0))
226+
if (SequenceWithChemicalFormulas == null || identification.thisPSM.PeptidesWithSetModifications.First().allModsOneIsNterminus.Any(b => b.Value.neutralLosses.Count() != 1 || b.Value.neutralLosses.First() != 0))
227227
continue;
228228
Proteomics.Peptide coolPeptide = new Proteomics.Peptide(SequenceWithChemicalFormulas);
229229

EngineLayer/ClassicSearch/ClassicSearchEngine.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ protected override MetaMorpheusEngineResults RunSpecific()
137137
}
138138
}
139139

140-
var sortedProductMasses = yyy.FastSortedProductMasses(lp);
141-
double[] matchedIonsArray = new double[sortedProductMasses.Length];
140+
var sortedProductMasses = yyy.SortedProductMassesMightNotBeUnique(lp);
141+
double[] matchedIonMassesListPositiveIsMatch = new double[sortedProductMasses.Length];
142142

143143
for (int aede = 0; aede < searchModes.Count; aede++)
144144
{
@@ -152,15 +152,15 @@ protected override MetaMorpheusEngineResults RunSpecific()
152152
//
153153
//}
154154

155-
var score = PsmWithMultiplePossiblePeptides.MatchIons(scan.TheScan, productMassTolerance, sortedProductMasses, matchedIonsArray);
155+
var score = PsmWithMultiplePossiblePeptides.MatchIons(scan.TheScan, productMassTolerance, sortedProductMasses, matchedIonMassesListPositiveIsMatch);
156156
var psm = new PsmClassic(yyy, fileName, scan.RetentionTime, scan.MonoisotopicPrecursorIntensity, scan.MonoisotopicPrecursorMass, scan.OneBasedScanNumber, scan.OneBasedPrecursorScanNumber, scan.PrecursorCharge, scan.NumPeaks, scan.TotalIonCurrent, scan.MonoisotopicPrecursorMZ, score, theTuple.Item2);
157157
if (psm.score > 1)
158158
{
159159
PsmClassic current_best_psm = psms[aede][scan.OneBasedScanNumber - 1];
160160
if (current_best_psm == null || PsmClassic.FirstIsPreferable(psm, current_best_psm))
161161
{
162162
psms[aede][scan.OneBasedScanNumber - 1] = psm;
163-
matchedIonsArray = new double[sortedProductMasses.Length];
163+
matchedIonMassesListPositiveIsMatch = new double[sortedProductMasses.Length];
164164
}
165165
}
166166
}

0 commit comments

Comments
 (0)