public TransitionChromInfo(ChromFileInfoId fileId, int optimizationStep, float?massError, float retentionTime, float startRetentionTime, float endRetentionTime, float area, float backgroundArea, float height, float fwhm, bool fwhmDegenerate, bool?truncated, PeakIdentification identified, IList <float?> ratios, Annotations annotations, UserSet userSet) : base(fileId) { OptimizationStep = optimizationStep; MassError = massError; RetentionTime = retentionTime; StartRetentionTime = startRetentionTime; EndRetentionTime = endRetentionTime; Area = area; BackgroundArea = backgroundArea; Height = height; Fwhm = fwhm; // Crawdad can set FWHM to NaN. Need to protect against that here. if (float.IsNaN(fwhm)) { Fwhm = 0; } IsFwhmDegenerate = fwhmDegenerate; IsTruncated = truncated; Identified = identified; Ratios = ratios; Annotations = annotations; UserSet = userSet; }
public TransitionGroupChromInfo(ChromFileInfoId fileId, int optimizationStep, float peakCountRatio, float?retentionTime, float?startTime, float?endTime, float?fwhm, float?area, float?areaMs1, float?areaFragment, float?backgroundArea, float?backgroundAreaMs1, float?backgroundAreaFragment, float?height, IList <RatioValue> ratios, float?massError, int?truncated, PeakIdentification identified, float?libraryDotProduct, float?isotopeDotProduct, Annotations annotations, UserSet userSet) : base(fileId) { OptimizationStep = optimizationStep; PeakCountRatio = peakCountRatio; RetentionTime = retentionTime; StartRetentionTime = startTime; EndRetentionTime = endTime; Fwhm = fwhm; Area = area; AreaMs1 = areaMs1; AreaFragment = areaFragment; BackgroundArea = backgroundArea; BackgroundAreaMs1 = backgroundAreaMs1; BackgroundAreaFragment = backgroundAreaFragment; Height = height; Ratios = ratios; MassError = massError; Truncated = truncated; Identified = identified; LibraryDotProduct = libraryDotProduct; IsotopeDotProduct = isotopeDotProduct; Annotations = annotations; UserSet = userSet; }
public ChangedPeakBoundsEventArgs(IdentityPath groupPath, Transition transition, string nameSet, MsDataFileUri filePath, ScaledRetentionTime startTime, ScaledRetentionTime endTime, PeakIdentification identified, PeakBoundsChangeType changeType) : base(groupPath, nameSet, filePath) { Transition = transition; StartTime = startTime; EndTime = endTime; Identified = identified; ChangeType = changeType; }
private void DoFileImportTests(SrmDocument docResults, string importFile, int[] chargeList, double?[] minTime, double?[] maxTime, PeakIdentification[] identified, double?[] peakAreas, string[] peptides, int fileId, string[] precursorMzs = null, string annotationName = null) { SrmDocument docNew = ImportFileToDoc(docResults, importFile); int i = 0; // Check peptide nodes are correct foreach (PeptideDocNode peptideNode in docNew.Peptides) { Assert.AreEqual(peptideNode.Peptide.Sequence, peptides[i]); ++i; } int j = 0; foreach (TransitionGroupDocNode groupNode in docNew.PeptideTransitionGroups) { var groupChromInfo = groupNode.ChromInfos.ToList()[fileId]; // Make sure charge on each transition group is correct Assert.AreEqual(groupNode.TransitionGroup.PrecursorCharge, chargeList[j]); // Make sure imported retention time boundaries, including nulls, are correct Assert.IsTrue(ApproxEqualNullable(groupChromInfo.StartRetentionTime, minTime[j], RT_TOLERANCE)); Assert.IsTrue(ApproxEqualNullable(groupChromInfo.EndRetentionTime, maxTime[j], RT_TOLERANCE)); // Check that peak areas are updated correctly double peakArea = peakAreas[j] ?? 0; Assert.IsTrue(ApproxEqualNullable(groupChromInfo.Area, peakAreas[j], RT_TOLERANCE*peakArea)); // Check that identified values are preserved/updated appropriately Assert.IsTrue(groupChromInfo.Identified == identified[j], string.Format("No identification match for {0} ({1})", groupNode.TransitionGroup.Peptide, j)); var annotations = groupChromInfo.Annotations; if (precursorMzs != null) { Assert.AreEqual(annotations.ListAnnotations().Length, 1); Assert.AreEqual(annotations.GetAnnotation(annote), precursorMzs[j]); } else Assert.AreEqual(annotations.ListAnnotations().Length, 0); ++j; } }