示例#1
0
        public MsSpectraViewModel(MSSpectra spectrum)
        {
            Peptides = new ObservableCollection<PeptideViewModel>();
            spectrum.Peptides.ForEach(x => Peptides.Add(new PeptideViewModel(x)));

            var info = SingletonDataProviders.GetDatasetInformation(spectrum.GroupId);
            if (info != null)
            {
                Dataset = new DatasetInformationViewModel(info);
            }

            Spectrum = spectrum;
            SelectedSpectrumPlotModel = new MsMsSpectraViewModel(spectrum, "");

            if (spectrum.ParentFeature != null)
            {
                var msFeature = spectrum.ParentFeature;
                var umc = msFeature.ParentFeature;
                if (umc != null)
                {
                    var newList = new List<UMCLight> {umc};

                    var xic = new XicViewModel(newList, "xic")
                    {
                        Model =
                        {
                            IsLegendVisible = false,
                            TitleFontSize = 0
                        }
                    };

                    SelectedSpectrumXic = xic;
                }
            }
        }
示例#2
0
        private void UpdateSpectra(MsSpectraViewModel value)
        {
            if (value != null)
            {
                var spectrum = value.Spectrum;
                var name     = string.Format("scan {0} @ {1} m/z ", spectrum.Scan,
                                             spectrum.PrecursorMz);
                SelectedSpectrumPlotModel = new MsMsSpectraViewModel(value.Spectrum, name);

                SelectedSpectrumPlotModel.SetMax(m_maxMz, m_maxIntensity);
            }
        }
示例#3
0
        public MsSpectraViewModel(MSSpectra spectrum)
        {
            Peptides = new ObservableCollection <PeptideViewModel>();
            spectrum.Peptides.ForEach(x => Peptides.Add(new PeptideViewModel(x)));

            var info = SingletonDataProviders.GetDatasetInformation(spectrum.GroupId);

            if (info != null)
            {
                Dataset = new DatasetInformationViewModel(info);
            }

            Spectrum = spectrum;
            SelectedSpectrumPlotModel = new MsMsSpectraViewModel(spectrum, "");

            if (spectrum.ParentFeature != null)
            {
                var msFeature = spectrum.ParentFeature;
                var umc       = msFeature.GetParentFeature();
                if (umc != null)
                {
                    var newList = new List <UMCLight> {
                        umc
                    };

                    var xic = new XicViewModel(newList, "xic")
                    {
                        Model =
                        {
                            IsLegendVisible = false,
                            TitleFontSize   = 0
                        }
                    };

                    SelectedSpectrumXic = xic;
                }
            }
        }
        private void UpdateSpectra(MsSpectraViewModel value)
        {
            if (value != null)
            {
                var spectrum = value.Spectrum;
                var name = string.Format("scan {0} @ {1} m/z ", spectrum.Scan,
                    spectrum.PrecursorMz);
                SelectedSpectrumPlotModel = new MsMsSpectraViewModel(value.Spectrum, name);

                SelectedSpectrumPlotModel.SetMax(m_maxMz, m_maxIntensity);
            }
        }