Example #1
0
        public ChooseIrtStandardPeptidesDlg(SrmDocument document, string documentFilePath, ICollection <DbIrtPeptide> dbIrtPeptides, IEnumerable <PeptideGroupDocNode> peptideGroups)
        {
            InitializeComponent();

            Document          = document;
            Regression        = null;
            _documentFilePath = documentFilePath;
            _dbIrtPeptides    = dbIrtPeptides;

            _librarySpectra = new List <SpectrumMzInfo>();
            _irtAdd         = new List <MeasuredRetentionTime>();
            _irtTargets     = null;

            comboExisting.Items.AddRange(IrtStandard.ALL.Where(standard => !standard.Name.Equals(IrtStandard.EMPTY.Name) && !standard.Name.Equals(IrtStandard.AUTO.Name))
                                         .Cast <object>().ToArray());
            comboExisting.SelectedIndex = 0;

            PeptideGroupDocNode[] proteinsContainingCommonIrts, proteinsNotContainingCommonIrts;
            CreateIrtCalculatorDlg.SeparateProteinGroups(peptideGroups, out proteinsContainingCommonIrts, out proteinsNotContainingCommonIrts);
            foreach (var protein in proteinsContainingCommonIrts.Concat(proteinsNotContainingCommonIrts))
            {
                comboProteins.Items.Add(new PeptideGroupItem(protein));
            }

            if (proteinsContainingCommonIrts.Any())
            {
                comboProteins.SelectedIndex = 0;
            }

            UpdateSelection(this, null);
        }
Example #2
0
        public ChooseIrtStandardPeptidesDlg(SrmDocument document, string documentFilePath, IEnumerable <PeptideGroupDocNode> peptideGroups)
        {
            InitializeComponent();

            Document          = document;
            _documentFilePath = documentFilePath;

            _librarySpectra      = new List <SpectrumMzInfo>();
            _irtPeptides         = new List <MeasuredRetentionTime>();
            _irtPeptideSequences = null;

            PeptideGroupDocNode[] proteinsContainingCommonIrts, proteinsNotContainingCommonIrts;
            CreateIrtCalculatorDlg.SeparateProteinGroups(peptideGroups, out proteinsContainingCommonIrts, out proteinsNotContainingCommonIrts);
            foreach (var protein in proteinsContainingCommonIrts.Concat(proteinsNotContainingCommonIrts))
            {
                comboProteins.Items.Add(new PeptideGroupItem(protein));
            }

            if (proteinsContainingCommonIrts.Any())
            {
                comboProteins.SelectedIndex = 0;
            }

            UpdateSelection(this, null);
        }