当前位置: 首页>>代码示例>>C#>>正文


C# SrmDocument类代码示例

本文整理汇总了C#中SrmDocument的典型用法代码示例。如果您正苦于以下问题:C# SrmDocument类的具体用法?C# SrmDocument怎么用?C# SrmDocument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SrmDocument类属于命名空间,在下文中一共展示了SrmDocument类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShareTypeDlg

        private const string BULLET = "\u2022 "; // Not L10N

        #endregion Fields

        #region Constructors

        public ShareTypeDlg(SrmDocument document)
        {
            InitializeComponent();

            int lineHeight = labelMessage.Height;

            StringBuilder sbLabel = new StringBuilder();
            sbLabel.AppendLine(Resources.ShareTypeDlg_ShareTypeDlg_The_document_can_be_shared_either_in_its_complete_form_or_in_a_minimal_form_intended_for_read_only_use_with);
            var listMinimizations = new List<string>();
            if (document.Settings.HasBackgroundProteome)
                listMinimizations.Add(BULLET + Resources.ShareTypeDlg_ShareTypeDlg_its_background_proteome_disconnected);
            if (document.Settings.HasRTCalcPersisted)
                listMinimizations.Add(BULLET + Resources.ShareTypeDlg_ShareTypeDlg_its_retention_time_calculator_minimized_to_contain_only_standard_peptides_and_library_peptides_used_in_the_document);
            if (document.Settings.HasLibraries)
                listMinimizations.Add(BULLET + Resources.ShareTypeDlg_ShareTypeDlg_all_libraries_minimized_to_contain_only_precursors_used_in_the_document);
            int lastIndex = listMinimizations.Count - 1;
            if (lastIndex < 0)
            {
                throw new InvalidOperationException(
                    string.Format(Resources.ShareTypeDlg_ShareTypeDlg_Invalid_use_of__0__for_document_without_background_proteome_retention_time_calculator_or_libraries,
                        typeof(ShareTypeDlg).Name));
            }
            if (listMinimizations.Count > 0)
                sbLabel.AppendLine().Append(TextUtil.LineSeparate(listMinimizations)).AppendLine();

            sbLabel.AppendLine().Append(Resources.ShareTypeDlg_ShareTypeDlg_Choose_the_appropriate_sharing_option_below);
            labelMessage.Text = sbLabel.ToString();
            Height += Math.Max(0, labelMessage.Height - lineHeight * 3);
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:35,代码来源:ShareTypeDlg.cs

示例2: RefineDlg

        public RefineDlg(SrmDocument document)
        {
            _document = document;
            _settings = document.Settings;

            InitializeComponent();

            Icon = Resources.Skyline;

            // Fill label type combo box
            comboRefineLabelType.Items.Add(string.Empty);
            comboRefineLabelType.Items.Add(IsotopeLabelType.LIGHT_NAME);
            foreach (var typedMods in _settings.PeptideSettings.Modifications.GetHeavyModifications())
                comboRefineLabelType.Items.Add(typedMods.LabelType.Name);
            comboRefineLabelType.SelectedIndex = 0;
            comboReplicateUse.SelectedIndex = 0;

            var settings = document.Settings;
            if (!settings.HasResults)
            {
                tabControl1.TabPages.Remove(tabResults);
            }

            if (settings.PeptideSettings.Libraries.HasLibraries)
            {
                labelMinDotProduct.Enabled = textMinDotProduct.Enabled = groupLibCorr.Enabled = true;
            }
            if (settings.TransitionSettings.FullScan.IsHighResPrecursor)
            {
                labelMinIdotProduct.Enabled = textMinIdotProduct.Enabled = groupLibCorr.Enabled = true;
            }
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:32,代码来源:RefineDlg.cs

示例3: CreateGraphData

 protected override GraphData CreateGraphData(SrmDocument document, PeptideGroupDocNode selectedProtein, TransitionGroupDocNode selectedGroup, DisplayTypeChrom displayType)
 {
     int? result = null;
     if (RTLinearRegressionGraphPane.ShowReplicate == ReplicateDisplay.single)
         result = GraphSummary.ResultsIndex;
     return new AreaGraphData(document, selectedGroup, selectedProtein, result, displayType, PaneKey);
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:7,代码来源:AreaPeptideGraphPane.cs

示例4: CheckAll

 public static void CheckAll(SrmDocument document)
 {
     using (var checkReportCompatibility = new CheckReportCompatibility(document))
     {
         checkReportCompatibility.CheckAll();
     }
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:7,代码来源:CheckReportCompatibility.cs

示例5: LoadBackground

        protected override bool LoadBackground(IDocumentContainer container, SrmDocument document, SrmDocument docCurrent)
        {
            var lib = GetOptimizationLibrary(docCurrent);
            if (lib != null && !lib.IsNone && !lib.IsUsable)
                lib = LoadLibrary(container, lib);
            if (lib == null || !ReferenceEquals(document.Id, container.Document.Id))
            {
                // Loading was cancelled or document changed
                EndProcessing(document);
                return false;
            }

            SrmDocument docNew;
            do
            {
                // Change the document to use the new library
                docCurrent = container.Document;
                if (!ReferenceEquals(GetOptimizationLibrary(docCurrent), GetOptimizationLibrary(container.Document)))
                    return false;
                docNew = docCurrent.ChangeSettings(docCurrent.Settings.ChangeTransitionPrediction(predict =>
                    predict.ChangeOptimizationLibrary(lib)));
            }
            while (!CompleteProcessing(container, docNew, docCurrent));
            return true;
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:25,代码来源:OptimizationDbManager.cs

示例6: RemoteChromDataProvider

 public RemoteChromDataProvider(SrmDocument document, IRetentionTimePredictor retentionTimePredictor, ChromFileInfo chromFileInfo, ProgressStatus progressStatus, int startPercent,
     int endPercent, ILoadMonitor loader)
     : base(chromFileInfo, progressStatus, startPercent, endPercent, loader)
 {
     _document = document;
     ChorusUrl chorusUrl = (ChorusUrl)chromFileInfo.FilePath;
     _chorusAccount = chorusUrl.FindChorusAccount(Settings.Default.ChorusAccountList);
     var chromatogramRequestProviders = new List<ChromatogramRequestProvider>();
     foreach (bool firstPass in new[] {true, false})
     {
         if (null == retentionTimePredictor && !firstPass)
         {
             continue;
         }
         var chromatogramRequestProvider = new ChromatogramRequestProvider(document, chorusUrl,
             retentionTimePredictor, firstPass);
         if (0 == chromatogramRequestProvider.ChromKeys.Count)
         {
             continue;
         }
         chromatogramRequestProviders.Add(chromatogramRequestProvider);
     }
     _chromatogramRequestProviders = chromatogramRequestProviders.ToArray();
     _chromTaskLists = new ChromTaskList[_chromatogramRequestProviders.Length];
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:25,代码来源:RemoteChromDataProvider.cs

示例7: ApplyPeak

        public static SrmDocument ApplyPeak(SrmDocument doc, PeptideTreeNode nodePepTree, TransitionGroupDocNode nodeTranGroup,
            int resultsIndex, int? resultsFile, bool subsequent, ILongWaitBroker longWaitBroker)
        {
            nodeTranGroup = nodeTranGroup ?? PickTransitionGroup(doc, nodePepTree, resultsIndex);

            PeakMatchData referenceTarget;
            PeakMatchData[] referenceMatchData;
            DateTime? runTime;
            GetReferenceData(doc, nodePepTree.DocNode, nodeTranGroup, resultsIndex, resultsFile, out referenceTarget, out referenceMatchData, out runTime);

            var chromatograms = doc.Settings.MeasuredResults.Chromatograms;
            for (int i = 0; i < chromatograms.Count; i++)
            {
                var chromSet = chromatograms[i];
                for (int j = 0; j < chromSet.MSDataFileInfos.Count; j++)
                {
                    var fileInfo = chromSet.MSDataFileInfos[j];
                    if ((i == resultsIndex && (!resultsFile.HasValue || resultsFile.Value == j)) ||
                        (subsequent && runTime != null && fileInfo.RunStartTime < runTime))
                    {
                        continue;
                    }

                    var bestMatch = GetPeakMatch(doc, chromSet, fileInfo, nodeTranGroup, referenceTarget, referenceMatchData);
                    if (bestMatch != null)
                        doc = bestMatch.ChangePeak(doc, nodePepTree, nodeTranGroup, chromSet.Name, fileInfo.FilePath);
                }
                longWaitBroker.SetProgressCheckCancel(i + 1, chromatograms.Count);
            }
            return doc;
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:31,代码来源:PeakMatcher.cs

示例8: SrmDocumentSharing

 public SrmDocumentSharing(SrmDocument document, string documentPath, string sharedPath, bool completeSharing)
 {
     Document = document;
     DocumentPath = documentPath;
     SharedPath = sharedPath;
     CompleteSharing = completeSharing;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:7,代码来源:SrmDocumentSharing.cs

示例9: CheckReportCompatibility

 public CheckReportCompatibility(SrmDocument document)
 {
     IDocumentContainer documentContainer = new MemoryDocumentContainer();
     Assert.IsTrue(documentContainer.SetDocument(document, null));
     _database = new Database(document.Settings);
     _database.AddSrmDocument(document);
     _dataSchema = new SkylineDataSchema(documentContainer, DataSchemaLocalizer.INVARIANT);
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:8,代码来源:CheckReportCompatibility.cs

示例10: CreateGraphData

        protected override GraphData CreateGraphData(SrmDocument document, PeptideGroupDocNode selectedProtein, TransitionGroupDocNode selectedGroup, DisplayTypeChrom displayType)
        {
            int? result = null;
            if (RTLinearRegressionGraphPane.ShowReplicate == ReplicateDisplay.single)
                result = GraphSummary.ResultsIndex;

            return new RTGraphData(document, selectedGroup, selectedProtein, result, displayType, GraphSummary.StateProvider.GetRetentionTimeTransformOperation());
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:8,代码来源:RTPeptideGraphPane.cs

示例11: PeakBoundaryImporter

 public PeakBoundaryImporter(SrmDocument document)
 {
     Document = document;
     AnnotationsAdded = new List<string>();
     UnrecognizedFiles = new HashSet<string>();
     UnrecognizedPeptides = new HashSet<string>();
     UnrecognizedChargeStates = new HashSet<UnrecognizedChargeState>();
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:8,代码来源:ImportPeakBoundaries.cs

示例12: DriftTimeFinder

 /// <summary>
 /// Finds drift times by examining loaded results in a document.
 /// </summary>
 /// <param name="document">The document to be inspected</param>
 /// <param name="documentFilePath">Aids in locating the raw files</param>
 /// <param name="existing">If non-null, will be examined for any existing drift time measurements (which may be overwritten) </param>
 /// <param name="progressMonitor">Optional progress monitor for this potentially long operation</param>
 public DriftTimeFinder(SrmDocument document, string documentFilePath, DriftTimePredictor existing, IProgressMonitor progressMonitor)
 {
     _document = document;
     _documentFilePath = documentFilePath;
     _existing = existing;
     _currentDisplayedTransitionGroupDocNode = null;
     _progressMonitor = progressMonitor;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:15,代码来源:DriftTimeFinder.cs

示例13: ChromatogramExporter

 public ChromatogramExporter(SrmDocument document)
 {
     Document = document;
     _settings = Document.Settings;
     _measuredResults = _settings.MeasuredResults;
     _matchTolerance = (float)_settings.TransitionSettings.Instrument.MzMatchTolerance;
     _chromatogramSets = _measuredResults.Chromatograms;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:8,代码来源:ExportChromatograms.cs

示例14: IsNotLoadedDocumentExplained

 public static string IsNotLoadedDocumentExplained(SrmDocument document)
 {
     // Not loaded if the predictor is not usable
     var calc = GetIonMobilityLibrary(document);
     if (calc == null || calc.IsNone || calc.IsUsable)
         return null;
     return "IonMobilityLibraryManager : GetIonMobilityLibrary(document) not usable and not none"; // Not L10N
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:8,代码来源:IonMobilityLibraryManager.cs

示例15: ChromCacheMinimizer

 public ChromCacheMinimizer(SrmDocument document, ChromatogramCache chromatogramCache)
 {
     Document = document;
     ChromatogramCache = chromatogramCache;
     var chromGroupHeaderInfos = chromatogramCache.ChromGroupHeaderInfos.ToArray();
     Array.Sort(chromGroupHeaderInfos, CompareLocation);
     ChromGroupHeaderInfos = Array.AsReadOnly(chromGroupHeaderInfos);
     _tolerance = (float) Document.Settings.TransitionSettings.Instrument.MzMatchTolerance;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:9,代码来源:ChromCacheMinimizer.cs


注:本文中的SrmDocument类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。