Beispiel #1
0
        public RetentionTimeAlignment GetRetentionTimeAlignment(MsDataFile other)
        {
            var key            = new RetentionTimeAlignments.AlignmentKey(Id, other.Id);
            var alignmentValue = Workspace.RetentionTimeAlignments.GetAlignment(key);

            if (null != alignmentValue)
            {
                return(alignmentValue);
            }
            RetentionTimeAlignment result;
            IList <string>         regressedPeptides;
            var regressionWithOutliers = RegressTimes(other, out regressedPeptides);
            var refined = regressionWithOutliers.Refine();

            if (refined != null)
            {
                result = new RetentionTimeAlignment(refined.Slope, refined.Intercept);
            }
            else
            {
                result = RetentionTimeAlignment.Invalid;
            }
            Workspace.RetentionTimeAlignments.AddAlignment(key, result);
            return(result);
        }
Beispiel #2
0
 public void AddAlignment(AlignmentKey alignmentKey, RetentionTimeAlignment alignmentValue)
 {
     _alignments = ImmutableSortedList.FromValues(
         _alignments.Concat(new[]
     {
         new KeyValuePair <AlignmentKey, RetentionTimeAlignment>(alignmentKey, alignmentValue)
     }));
 }
 public void AddAlignment(AlignmentKey alignmentKey, RetentionTimeAlignment alignmentValue)
 {
     _alignments = ImmutableSortedList.FromValues(
             _alignments.Concat(new[]
                 {
                     new KeyValuePair<AlignmentKey, RetentionTimeAlignment>(alignmentKey, alignmentValue)
                 }));
 }