public double[] GetRetentionTimes(MsDataFileUri filePath, string peptideSequence, ExplicitMods explicitMods, RetentionTimeAlignmentIndex alignmentIndex = null) { string basename = filePath.GetFileNameWithoutExtension(); var source = DocumentRetentionTimes.RetentionTimeSources.Find(basename); if (source == null) { return new double[0]; } var library = PeptideSettings.Libraries.GetLibrary(source.Library); if (library == null) { return new double[0]; } var modifiedSequences = GetTypedSequences(peptideSequence, explicitMods) .Select(typedSequence => typedSequence.ModifiedSequence); int? index = (alignmentIndex != null ? alignmentIndex.FileIndex : null); var times = library.GetRetentionTimesWithSequences(source.Name, modifiedSequences, ref index).ToArray(); if (alignmentIndex != null) alignmentIndex.FileIndex = index; return times; }
public double[] GetRetentionTimes(string filePath, string peptideSequence, ExplicitMods explicitMods, RetentionTimeAlignmentIndex alignmentIndex = null) { return GetRetentionTimes(MsDataFileUri.Parse(filePath), peptideSequence, explicitMods, alignmentIndex); }