Example #1
0
        public override IEnumerable <DocNode> GetChoices(bool useFilter)
        {
            SrmSettings settings = DocSettings;

            List <DocNode> listPeptides = new List <DocNode>();

            foreach (var nodePep in DocNode.GetPeptideNodes(settings, useFilter))
            {
                var nodePepMaterialized = nodePep.ChangeSettings(settings, SrmSettingsDiff.ALL);
                if (!useFilter || settings.TransitionSettings.Libraries.MinIonCount == 0 || nodePepMaterialized.Children.Count != 0)
                {
                    listPeptides.Add(nodePepMaterialized);
                }
            }

            PeptideRankId rankId = DocSettings.PeptideSettings.Libraries.RankId;

            if (rankId != null && !DocNode.IsPeptideList)
            {
                listPeptides = PeptideGroup.RankPeptides(listPeptides, settings, useFilter).ToList();
            }

            MergeChosen(listPeptides, useFilter, node => ((PeptideDocNode)node).Key);

            return(listPeptides);
        }
        public override IEnumerable <DocNode> GetChoices(bool useFilter)
        {
            SrmSettings settings = DocSettings;

            List <DocNode> listPeptides = new List <DocNode>();

            foreach (var nodePep in DocNode.GetPeptideNodes(settings, useFilter))
            {
                listPeptides.Add(nodePep.ChangeSettings(settings, SrmSettingsDiff.ALL));
            }

            PeptideRankId rankId = DocSettings.PeptideSettings.Libraries.RankId;

            if (rankId != null && !DocNode.IsPeptideList)
            {
                listPeptides = PeptideGroup.RankPeptides(listPeptides, settings, useFilter).ToList();
            }

            MergeChosen(listPeptides, useFilter, node => ((PeptideDocNode)node).Key);

            return(listPeptides);
        }