Esempio n. 1
0
 /// <summary>
 ///     Add a new node to the list of those to execute.
 /// </summary>
 /// <param name="node"></param>
 public void AddNode(AnalysisGraphNode node)
 {
     if (m_nodes.Count < 1)
         m_nodes.Add(node);
     else
     {
         m_nodes[m_nodes.Count - 1].Next = node;
         m_nodes.Add(node);
     }
 }
        public AnalysisGraphNodeViewModel(AnalysisGraphNode node)
        {
            if (node == null)
                throw new ArgumentNullException("node");

            // This safely updates the UI thread in case the current analysis is running on a separate thread.
            Action update = () => OnPropertyChanged("IsCurrent");

            m_node = node;
            m_node.StatusChanged += (sender, args) => ThreadSafeDispatcher.Invoke(update);
        }
Esempio n. 3
0
 /// <summary>
 ///     Add a new node to the list of those to execute.
 /// </summary>
 /// <param name="node"></param>
 public void AddNode(AnalysisGraphNode node)
 {
     if (m_nodes.Count < 1)
     {
         m_nodes.Add(node);
     }
     else
     {
         m_nodes[m_nodes.Count - 1].Next = node;
         m_nodes.Add(node);
     }
 }
Esempio n. 4
0
        private AnalysisGraphNode CreateNode(AnalysisStep step, string name, string description)
        {
            var node = new AnalysisGraphNode
            {
                Name        = name,
                Description = description,
                CurrentStep = step,
                Method      = m_methodMap[step]
            };

            return(node);
        }
 private AnalysisGraphNode CreateNode(AnalysisStep step, string name, string description)
 {
     var node = new AnalysisGraphNode
     {
         Name = name,
         Description = description,
         CurrentStep = step,
         Method = m_methodMap[step]
     };
     return node;
 }
        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;
        }
Esempio n. 7
0
        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;
        }