Ejemplo n.º 1
0
        public UMCClusterTreeViewModel(UMCClusterLightMatched matchedCluster, TreeItemViewModel parent)
        {
            m_items = new ObservableCollection<TreeItemViewModel>();
            m_parent = parent;
            m_cluster = matchedCluster;
            var features = new UMCCollectionTreeViewModel(matchedCluster.Cluster);
            features.FeatureSelected += feature_FeatureSelected;
            features.Name = "Features";

            // Cluster level statistics
            var cluster = matchedCluster.Cluster;
            AddStatistics("Mass", cluster.MassMonoisotopic);

            var item = new StringTreeViewItem(
                cluster.Net.ToString("F3",
                    CultureInfo.InvariantCulture),
                "NET");

            m_items.Add(item);

            if (cluster.DriftTime > 0)
            {
                AddStatistics("Drift Time", cluster.DriftTime);
            }
            AddStatistics("Datasets", cluster.DatasetMemberCount);
            AddStatistics("Total", cluster.MemberCount);

            AddStatistics("Total MS/MS", cluster.MsMsCount);
            AddStatistics("Total Identifications", cluster.IdentifiedSpectraCount);

            var allIdentifications = new GenericCollectionTreeViewModel();
            allIdentifications.Name = "Identifications";

            // Items to display the base childen.
            var identifications = new PeptideCollectionTreeViewModel(cluster);
            identifications.Name = "Search Results";
            identifications.FeatureSelected += feature_FeatureSelected;

            var spectra = new MsMsCollectionTreeViewModel(cluster);
            spectra.Name = "MS/MS";
            m_spectra = spectra;
            spectra.SpectrumSelected += spectra_SpectrumSelected;
            spectra.FeatureSelected += feature_FeatureSelected;

            var matches = new MassTagCollectionMatchTreeViewModel(matchedCluster.ClusterMatches);
            matches.Name = "AMT Tags";

            allIdentifications.Items.Add(identifications);
            allIdentifications.Items.Add(spectra);
            allIdentifications.Items.Add(matches);
            m_allIdentifications = allIdentifications;

            m_items.Add(features);
            m_items.Add(allIdentifications);
        }
Ejemplo n.º 2
0
        public UMCClusterTreeViewModel(UMCClusterLightMatched matchedCluster, TreeItemViewModel parent)
        {
            m_items   = new ObservableCollection <TreeItemViewModel>();
            m_parent  = parent;
            m_cluster = matchedCluster;
            var features = new UMCCollectionTreeViewModel(matchedCluster.Cluster);

            features.FeatureSelected += feature_FeatureSelected;
            features.Name             = "Features";

            // Cluster level statistics
            var cluster = matchedCluster.Cluster;

            AddStatistics("Mass", cluster.MassMonoisotopic);


            var item = new StringTreeViewItem(
                cluster.Net.ToString("F3",
                                     CultureInfo.InvariantCulture),
                "NET");

            m_items.Add(item);

            if (cluster.DriftTime > 0)
            {
                AddStatistics("Drift Time", cluster.DriftTime);
            }
            AddStatistics("Datasets", cluster.DatasetMemberCount);
            AddStatistics("Total", cluster.MemberCount);

            AddStatistics("Total MS/MS", cluster.MsMsCount);
            AddStatistics("Total Identifications", cluster.IdentifiedSpectraCount);

            var allIdentifications = new GenericCollectionTreeViewModel();

            allIdentifications.Name = "Identifications";

            // Items to display the base childen.
            var identifications = new PeptideCollectionTreeViewModel(cluster);

            identifications.Name             = "Search Results";
            identifications.FeatureSelected += feature_FeatureSelected;


            var spectra = new MsMsCollectionTreeViewModel(cluster);

            spectra.Name              = "MS/MS";
            m_spectra                 = spectra;
            spectra.SpectrumSelected += spectra_SpectrumSelected;
            spectra.FeatureSelected  += feature_FeatureSelected;

            var matches = new MassTagCollectionMatchTreeViewModel(matchedCluster.ClusterMatches);

            matches.Name = "AMT Tags";

            allIdentifications.Items.Add(identifications);
            allIdentifications.Items.Add(spectra);
            allIdentifications.Items.Add(matches);
            m_allIdentifications = allIdentifications;

            m_items.Add(features);
            m_items.Add(allIdentifications);
        }