Ejemplo n.º 1
0
        public static ResultNameMap <RetentionTimeSource> ListAvailableRetentionTimeSources(SrmSettings settings)
        {
            if (!settings.TransitionSettings.FullScan.IsEnabled)
            {
                return(ResultNameMap <RetentionTimeSource> .EMPTY);
            }
            IEnumerable <RetentionTimeSource> sources = new RetentionTimeSource[0];

            foreach (var library in settings.PeptideSettings.Libraries.Libraries)
            {
                if (library == null || !library.IsLoaded)
                {
                    continue;
                }
                sources = sources.Concat(library.ListRetentionTimeSources());
            }
            return(ResultNameMap.FromNamedElements(sources));
        }
Ejemplo n.º 2
0
 private static IDictionary<string, double> GetFirstRetentionTimes(
     SrmSettings settings, RetentionTimeSource retentionTimeSource)
 {
     var libraryRetentionTimes = settings.GetRetentionTimes(MsDataFileUri.Parse(retentionTimeSource.Name));
     if (null == libraryRetentionTimes)
     {
         return new Dictionary<string, double>();
     }
     return libraryRetentionTimes.GetFirstRetentionTimes();
 }
Ejemplo n.º 3
0
 public DataRow(SrmSettings settings, RetentionTimeSource target, RetentionTimeSource timesToAlign)
     : this()
 {
     DocumentRetentionTimes = settings.DocumentRetentionTimes;
     Target = target;
     Source = timesToAlign;
     Assume.IsNotNull(target, "target"); // Not L10N
     Assume.IsNotNull(DocumentRetentionTimes.FileAlignments, "DocumentRetentionTimes.FileAlignments"); // Not L10N
     var fileAlignment = DocumentRetentionTimes.FileAlignments.Find(target.Name);
     if (fileAlignment != null)
     {
         Assume.IsNotNull(fileAlignment.RetentionTimeAlignments, "fileAlignment.RetentionTimeAlignments"); // Not L10N
         Assume.IsNotNull(Source, "Source"); // Not L10N
         Alignment = fileAlignment.RetentionTimeAlignments.Find(Source.Name);
     }
     TargetTimes = GetFirstRetentionTimes(settings, target);
     SourceTimes = GetFirstRetentionTimes(settings, timesToAlign);
 }
Ejemplo n.º 4
0
 public DataFileKey(RetentionTimeSource retentionTimeSource)
     : this()
 {
     RetentionTimeSource = retentionTimeSource;
 }
Ejemplo n.º 5
0
 public bool Equals(RetentionTimeSource other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other.Library, Library);
 }
Ejemplo n.º 6
0
 public static ResultNameMap<RetentionTimeSource> ListAvailableRetentionTimeSources(SrmSettings settings)
 {
     if (!settings.TransitionSettings.FullScan.IsEnabled)
     {
         return ResultNameMap<RetentionTimeSource>.EMPTY;
     }
     IEnumerable<RetentionTimeSource> sources = new RetentionTimeSource[0];
     foreach (var library in settings.PeptideSettings.Libraries.Libraries)
     {
         if (library == null || !library.IsLoaded)
         {
             continue;
         }
         sources = sources.Concat(library.ListRetentionTimeSources());
     }
     return ResultNameMap.FromNamedElements(sources);
 }