Пример #1
0
 public AnalysisGraphEventArgs(AnalysisGraph graph)
 {
     AnalysisGraph = graph;
 }
        public void BuildAnalysisGraph(AnalysisConfig config)
        {
            var graph = new AnalysisGraph();

            // Create a feature database
            if (config.ShouldCreateFeatureDatabaseOnly)
            {
                graph.AddNode(CreateNode(AnalysisStep.FindFeatures, "Feature Creation",
                    "Creates or loads features from deisotoped data."));
            }
            else
            {
                if (config.ShouldLoadMTDB)
                {
                    var node = new AnalysisGraphNode
                    {
                        Name = "Load MTDB",
                        Description = "Loads an AMT Tag Database for alignment or peptide identification",
                        CurrentStep = AnalysisStep.LoadMtdb,
                        Method =
                            config.InitialStep == AnalysisStep.FindFeatures
                                ? CreateMtdb
                                : new DelegateAnalysisMethod(LoadMtdb)
                    };

                    graph.AddNode(node);
                }

                switch (config.InitialStep)
                {
                    case AnalysisStep.LoadMtdb:
                    case AnalysisStep.FindFeatures:
                        graph.AddNode(CreateNode(AnalysisStep.FindFeatures, "Feature Creation And Alignment",
                            "Creates or loads features from deisotoped data and aligns them to a baseline."));
                        graph.AddNode(CreateNode(AnalysisStep.Clustering, "Cluster Features",
                            "Clusters features across datasets."));
                        graph.AddNode(CreateNode(AnalysisStep.PeakMatching, "Feature Identification",
                            "Matches features to an AMT Tag database."));
                        break;
                    case AnalysisStep.Alignment:
                        graph.AddNode(CreateNode(AnalysisStep.Alignment, "Feature Alignment",
                            "Aligns features to a reference to correct for systematic errors."));
                        graph.AddNode(CreateNode(AnalysisStep.Clustering, "Cluster Features",
                            "Clusters features across datasets."));
                        graph.AddNode(CreateNode(AnalysisStep.PeakMatching, "Feature Identification",
                            "Matches features to an AMT Tag database."));
                        break;
                    case AnalysisStep.Clustering:
                        graph.AddNode(CreateNode(AnalysisStep.Clustering, "Cluster Features",
                            "Clusters features across datasets."));
                        graph.AddNode(CreateNode(AnalysisStep.PeakMatching, "Feature Identification",
                            "Matches features to an AMT Tag database."));
                        break;
                    case AnalysisStep.PeakMatching:
                        graph.AddNode(CreateNode(AnalysisStep.PeakMatching, "Feature Identification",
                            "Matches features to an AMT Tag database."));
                        break;
                }
            }
            config.AnalysisGraph = graph;
        }