コード例 #1
0
        public PeptideTreeViewModel(Peptide peptide, TreeItemViewModel parent)
        {
            m_parent = parent;
            m_peptide = peptide;

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

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

            AddStatistic("Id", m_peptide.Id);
            AddStatistic("Dataset Id", m_peptide.GroupId);

            AddStatistic("Precursor m/z", m_peptide.Spectrum.PrecursorMz);
            if (m_peptide.Spectrum.ParentFeature != null)
            {
                AddStatistic("Charge", m_peptide.Spectrum.ParentFeature.ChargeState);
            }
            else
            {
                AddStatistic("Charge", m_peptide.Spectrum.PrecursorChargeState);
            }

            AddString("Sequence", peptide.Sequence);
            AddStatistic("Score", peptide.Score);
            AddStatistic("Scan", peptide.Scan);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: MsMsTreeViewModel.cs プロジェクト: msdna/MultiAlign
        public MsMsTreeViewModel(MSSpectra feature, TreeItemViewModel parent)
        {
            m_feature = feature;
            m_parent = parent;

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

            AddStatistic("Id", m_feature.Id);
            AddStatistic("Dataset Id", m_feature.GroupId);
            AddStatistic("Precursor m/z", m_feature.PrecursorMz);
            if (feature.ParentFeature != null)
            {
                AddStatistic("Charge", m_feature.ParentFeature.ChargeState);
            }
            else
            {
                AddStatistic("Charge", m_feature.PrecursorChargeState);
            }
            AddStatistic("Scan", m_feature.Scan);

            Peptides = new ObservableCollection<Peptide>();

            Peptide maxPeptide = null;
            foreach (var p in m_feature.Peptides)
            {
                Peptides.Add(p);
                if (maxPeptide == null)
                {
                    maxPeptide = p;
                }
                else if (p.Score < maxPeptide.Score)
                {
                    maxPeptide = p;
                }
            }

            if (maxPeptide != null)
            {
                Name = maxPeptide.Sequence;
                AddStatistic("Score", maxPeptide.Score);
                AddStatistic("Scan", maxPeptide.Scan);
            }
            else
            {
                Name = string.Format("Unknown - Scan: {0} m/z: {1:.00} ", m_feature.Scan, m_feature.PrecursorMz);
            }
        }
コード例 #4
0
        public IdentificationCollectionTreeViewModel(IEnumerable<UMCClusterLightMatched> clusters,
            IEnumerable<Peptide> peptides,
            TreeItemViewModel parent)
        {
            var tags = new GenericCollectionTreeViewModel();
            tags.Name = "AMT Tags";

            foreach (var cluster in clusters)
            {
                foreach (var match in cluster.ClusterMatches)
                {
                    tags.Items.Add(new MassTagToClusterMatch(match.MassTag));
                }
            }

            var peptideItems = new GenericCollectionTreeViewModel();
            peptideItems.Name = "Database Searches";
            var peptideModels = (from peptide in peptides
                select new PeptideTreeViewModel(peptide)).ToList();
            foreach (var item in peptideModels)
            {
                peptideItems.Items.Add(item);
            }
        }
コード例 #5
0
 public PeptideCollectionTreeViewModel(UMCClusterLight parentCluster, TreeItemViewModel parent)
 {
     m_parent        = parent;
     m_parentCluster = parentCluster;
 }
コード例 #6
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);
        }
コード例 #7
0
 public MassTagCollectionMatchTreeViewModel(List<ClusterToMassTagMap> matches, TreeItemViewModel parent)
 {
     m_parent = parent;
     m_massTags = new ObservableCollection<MassTagMatchTreeViewModel>();
 }
コード例 #8
0
 public UMCCollectionTreeViewModel(UMCClusterLight parentCluster, TreeItemViewModel parent)
 {
     m_parent        = parent;
     m_parentCluster = parentCluster;
     m_features      = new ObservableCollection <UMCTreeViewModel>();
 }
コード例 #9
0
 public PeptideCollectionTreeViewModel(UMCClusterLight parentCluster, TreeItemViewModel parent)
 {
     m_parent = parent;
     m_parentCluster = parentCluster;
 }
コード例 #10
0
 public MassTagCollectionMatchTreeViewModel(List <ClusterToMassTagMap> matches, TreeItemViewModel parent)
 {
     m_parent   = parent;
     m_massTags = new ObservableCollection <MassTagMatchTreeViewModel>();
 }
コード例 #11
0
 public UMCCollectionTreeViewModel(UMCClusterLight parentCluster, TreeItemViewModel parent)
 {
     m_parent = parent;
     m_parentCluster = parentCluster;
     m_features = new ObservableCollection<UMCTreeViewModel>();
 }