コード例 #1
0
ファイル: UMCTreeViewModel.cs プロジェクト: msdna/MultiAlign
        public UMCTreeViewModel(UMCLight feature, UMCCollectionTreeViewModel parent)
        {
            m_feature = feature;
            m_parent = parent;

            var information = SingletonDataProviders.GetDatasetInformation(m_feature.GroupId);

            if (information != null)
            {
                Name = information.DatasetName;
            }
            else
            {
                Name = string.Format("Dataset {0}", m_feature.GroupId);
            }

            AddStatistic("Id", m_feature.Id);
            AddStatistic("Dataset Id", m_feature.GroupId);
            AddStatistic("Mass", m_feature.MassMonoisotopicAligned, "N2");
            AddStatistic("NET", m_feature.Net, "N2");
            if (m_feature.DriftTime > 0)
            {
                AddStatistic("Drift Time", m_feature.DriftTime, "N2");
            }
            AddStatistic("Charge", m_feature.ChargeState);
        }
コード例 #2
0
        public UMCTreeViewModel(UMCLight feature, UMCCollectionTreeViewModel parent)
        {
            m_feature = feature;
            m_parent  = parent;

            var information = SingletonDataProviders.GetDatasetInformation(m_feature.GroupId);

            if (information != null)
            {
                Name = information.DatasetName;
            }
            else
            {
                Name = string.Format("Dataset {0}", m_feature.GroupId);
            }

            AddStatistic("Id", m_feature.Id);
            AddStatistic("Dataset Id", m_feature.GroupId);
            AddStatistic("Mass", m_feature.MassMonoisotopicAligned, "N2");
            AddStatistic("NET", m_feature.Net, "N2");
            if (m_feature.DriftTime > 0)
            {
                AddStatistic("Drift Time", m_feature.DriftTime, "N2");
            }
            AddStatistic("Charge", m_feature.ChargeState);
        }
コード例 #3
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);
        }
コード例 #4
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);
        }