Наследование: IAminoAcid
Пример #1
0
        public static ModificationSites Set(this ModificationSites sites, AminoAcid aminoacid)
        {
            if(aminoacid != null)
                sites |= aminoacid.Site;

            return sites;
        }
Пример #2
0
        public static ModificationSites Set(this ModificationSites sites, char aminoacid)
        {
            AminoAcid aa;

            if (AminoAcid.TryGetResidue(aminoacid, out aa))
            {
                sites |= aa.Site;
            }
            return(sites);
        }
Пример #3
0
        public Peptide(string sequence, AminoAcidPolymer parent, int startResidue)
            : base(sequence)
        {
            Parent       = parent;
            StartResidue = startResidue;
            EndResidue   = startResidue + Length - 1;

            if (parent != null)
            {
                if (StartResidue > 0)
                {
                    PreviousAminoAcid = parent.AminoAcids[StartResidue - 1];
                }

                if (EndResidue < parent.Length - 1)
                {
                    NextAminoAcid = parent.AminoAcids[EndResidue + 1];
                }
            }
        }
Пример #4
0
 private static void AddResidueToDictionary(AminoAcid residue)
 {
     Residues.Add(residue.Letter.ToString(CultureInfo.InvariantCulture), residue);
     Residues.Add(residue.Name, residue);
     Residues.Add(residue.Symbol, residue);
     ResiduesByLetter[residue.Letter] = residue;
     ResiduesByLetter[Char.ToLower(residue.Letter)] = residue;
 }
Пример #5
0
 public static bool TryGetResidue(string symbol, out AminoAcid residue)
 {
     return Residues.TryGetValue(symbol, out residue);
 }
Пример #6
0
 public static bool TryGetResidue(char letter, out AminoAcid residue)
 {
     residue = null;
     if (letter > 'z' || letter < 0)
         return false;
     residue = ResiduesByLetter[letter];
     return residue != null;
 }
Пример #7
0
 public static AminoAcid AddResidue(string name, char oneLetterAbbreviation, string threeLetterAbbreviation, string chemicalFormula, ModificationSites site)
 {
     var residue = new AminoAcid(name, oneLetterAbbreviation, threeLetterAbbreviation, chemicalFormula, site);
     AddResidueToDictionary(residue);
     return residue;
 }
Пример #8
0
 public static bool TryGetResidue(string symbol, out AminoAcid residue)
 {
     return(Residues.TryGetValue(symbol, out residue));
 }