示例#1
0
        public List <IPeptide> Create(IProtein protein)
        {
            List <IPeptide> peptideList = new List <IPeptide>();
            List <string>   sequences   = generator.Generate(protein.GetSequence());

            foreach (string seq in sequences)
            {
                GeneralPeptide peptide = new GeneralPeptide(protein.GetID(), seq);
                peptideList.Add(peptide);
            }
            protein.SetPeptides(peptideList);
            return(peptideList);
        }
        public override List <string> GeneratePeptideSequences(IProtein protein)
        {
            if (protein.GetPeptides().Count == 0)
            {
                List <string> sequences =
                    GeneratePeptideSequence.Generate(
                        protein.GetSequence(), parameter.GetProtease(),
                        parameter.GetMissCleavage(), parameter.GetMiniLength());
                return(sequences);
            }

            List <IPeptide>  peptides = protein.GetPeptides();
            HashSet <string> seqList  = new HashSet <string>();

            foreach (IPeptide peptide in peptides)
            {
                string seq = peptide.GetSequence();
                seqList.UnionWith(GeneratePeptideSequence.Generate(
                                      seq, parameter.GetProtease(), parameter.GetMissCleavage(),
                                      parameter.GetMiniLength()));
            }
            return(seqList.ToList());
        }
 public override List <string> GeneratePeptideSequences(IProtein protein)
 {
     return(GeneratePeptideSequence.Generate(
                protein.GetSequence(), parameter.GetProtease(),
                parameter.GetMissCleavage(), parameter.GetMiniLength()));
 }