Esempio n. 1
0
 public override bool Equals(object obj)
 {
     if (this == obj)
     {
         return(true);
     }
     if (obj is AminoAcid)
     {
         AminoAcid other = (AminoAcid)obj;
         return(other.letter == letter);
     }
     return(false);
 }
Esempio n. 2
0
        private static AminoAcid[] InitAminoAcids()
        {
            AminoAcid alanine = new AminoAcid("C3H5NO", "Alanine", "Ala", 'A', 7.4, new[] { "GCT", "GCC", "GCA", "GCG" },
                                              "hydrophobic aliphatic", true, 1.8);
            AminoAcid arginine = new AminoAcid("C6H12N4O", "Arginine", "Arg", 'R', 4.2,
                                               new[] { "CGT", "CGC", "CGA", "CGG", "AGA", "AGG" }, "charged basic", true, -4.5);
            AminoAcid asparagine = new AminoAcid("C4H6N2O2", "Asparagine", "Asn", 'N', 4.4, new[] { "AAT", "AAC" }, "polar neutral",
                                                 true, -3.5);
            AminoAcid asparticAcid = new AminoAcid("C4H5NO3", "Aspartic acid", "Asp", 'D', 5.9, new[] { "GAT", "GAC" },
                                                   "charged acidic", true, -3.5);
            AminoAcid cysteine = new AminoAcid("C3H5NOS", "Cysteine", "Cys", 'C', 3.3, new[] { "TGT", "TGC" }, "polar neutral", true,
                                               2.5);
            AminoAcid glutamicAcid = new AminoAcid("C5H7NO3", "Glutamic acid", "Glu", 'E', 5.8, new[] { "GAA", "GAG" },
                                                   "charged acidic", true, -3.5);
            AminoAcid glutamine = new AminoAcid("C5H8N2O2", "Glutamine", "Gln", 'Q', 3.7, new[] { "CAA", "CAG" }, "polar neutral",
                                                true, -3.5);
            AminoAcid glycine = new AminoAcid("C2H3NO", "Glycine", "Gly", 'G', 7.4, new[] { "GGT", "GGC", "GGA", "GGG" }, "", true,
                                              -0.4);
            AminoAcid histidine = new AminoAcid("C6H7N3O", "Histidine", "His", 'H', 2.9, new[] { "CAT", "CAC" }, "charged basic",
                                                true, -3.2);
            AminoAcid isoleucine = new AminoAcid("C6H11NO", "Isoleucine", "Ile", 'I', 3.8, new[] { "ATT", "ATC", "ATA" },
                                                 "hydrophobic aliphatic", true, 4.5);
            AminoAcid leucine = new AminoAcid("C6H11NO", "Leucine", "Leu", 'L', 7.6,
                                              new[] { "TTA", "TTG", "CTT", "CTC", "CTA", "CTG" }, "hydrophobic aliphatic", true, 3.8);
            AminoAcid lysine = new AminoAcid("C6H12N2O", "Lysine", "Lys", 'K', 7.2, new[] { "AAA", "AAG" }, "charged basic", true,
                                             -3.9);
            AminoAcid methionine = new AminoAcid("C5H9NOS", "Methionine", "Met", 'M', 1.8, new[] { "ATG" }, "polar neutral", true,
                                                 1.9);
            AminoAcid phenylalanine = new AminoAcid("C9H9NO", "Phenylalanine", "Phe", 'F', 4, new[] { "TTT", "TTC" },
                                                    "hydrophobic aromatic", true, 2.8);
            AminoAcid proline = new AminoAcid("C5H7NO", "Proline", "Pro", 'P', 5, new[] { "CCT", "CCC", "CCA", "CCG" }, "", true,
                                              -1.6);
            AminoAcid serine = new AminoAcid("C3H5NO2", "Serine", "Ser", 'S', 8.1,
                                             new[] { "TCT", "TCC", "TCA", "TCG", "AGT", "AGC" }, "polar neutral", true, -0.8);
            AminoAcid threonine = new AminoAcid("C4H7NO2", "Threonine", "Thr", 'T', 6.2, new[] { "ACT", "ACC", "ACA", "ACG" },
                                                "polar neutral", true, -0.7);
            AminoAcid tryptophan = new AminoAcid("C11H10N2O", "Tryptophan", "Trp", 'W', 1.3, new[] { "TGG" }, "hydrophobic aromatic",
                                                 true, -0.9);
            AminoAcid tyrosine = new AminoAcid("C9H9NO2", "Tyrosine", "Tyr", 'Y', 3.3, new[] { "TAT", "TAC" },
                                               "hydrophobic aromatic", true, -1.3);
            AminoAcid valine = new AminoAcid("C5H9NO", "Valine", "Val", 'V', 6.8, new[] { "GTT", "GTC", "GTA", "GTG" },
                                             "hydrophobic aliphatic", true, 4.2);
            AminoAcid selenocysteine = new AminoAcid("C3H7NO2Se", "Selenocysteine", "Sec", 'U', 0.0, new[] { "TGA" }, "", false, 0.0);

            AminoAcid[] aas = new[] {
                alanine, arginine, asparagine, asparticAcid, cysteine, glutamine, glutamicAcid, glycine, histidine, isoleucine,
                leucine, lysine, methionine, phenylalanine, proline, serine, threonine, tryptophan, tyrosine, valine, selenocysteine
            };
            return(aas);
        }
Esempio n. 3
0
        public static Image GetImage(AminoAcid aa)
        {
            object resource = Resources.ResourceManager.GetObject(aa.Letter.ToString(CultureInfo.InvariantCulture));

            return(resource is Image ? (Image)resource : null);
        }
Esempio n. 4
0
 private static AminoAcid[] InitAminoAcids()
 {
     AminoAcid alanine = new AminoAcid("C3H5NO", "Alanine", "Ala", 'A', 7.4, new[]{"GCT", "GCC", "GCA", "GCG"},
         "hydrophobic aliphatic", true, 1.8);
     AminoAcid arginine = new AminoAcid("C6H12N4O", "Arginine", "Arg", 'R', 4.2,
         new[]{"CGT", "CGC", "CGA", "CGG", "AGA", "AGG"}, "charged basic", true, -4.5);
     AminoAcid asparagine = new AminoAcid("C4H6N2O2", "Asparagine", "Asn", 'N', 4.4, new[]{"AAT", "AAC"}, "polar neutral",
         true, -3.5);
     AminoAcid asparticAcid = new AminoAcid("C4H5NO3", "Aspartic acid", "Asp", 'D', 5.9, new[]{"GAT", "GAC"},
         "charged acidic", true, -3.5);
     AminoAcid cysteine = new AminoAcid("C3H5NOS", "Cysteine", "Cys", 'C', 3.3, new[]{"TGT", "TGC"}, "polar neutral", true,
         2.5);
     AminoAcid glutamicAcid = new AminoAcid("C5H7NO3", "Glutamic acid", "Glu", 'E', 5.8, new[]{"GAA", "GAG"},
         "charged acidic", true, -3.5);
     AminoAcid glutamine = new AminoAcid("C5H8N2O2", "Glutamine", "Gln", 'Q', 3.7, new[]{"CAA", "CAG"}, "polar neutral",
         true, -3.5);
     AminoAcid glycine = new AminoAcid("C2H3NO", "Glycine", "Gly", 'G', 7.4, new[]{"GGT", "GGC", "GGA", "GGG"}, "", true,
         -0.4);
     AminoAcid histidine = new AminoAcid("C6H7N3O", "Histidine", "His", 'H', 2.9, new[]{"CAT", "CAC"}, "charged basic",
         true, -3.2);
     AminoAcid isoleucine = new AminoAcid("C6H11NO", "Isoleucine", "Ile", 'I', 3.8, new[]{"ATT", "ATC", "ATA"},
         "hydrophobic aliphatic", true, 4.5);
     AminoAcid leucine = new AminoAcid("C6H11NO", "Leucine", "Leu", 'L', 7.6,
         new[]{"TTA", "TTG", "CTT", "CTC", "CTA", "CTG"}, "hydrophobic aliphatic", true, 3.8);
     AminoAcid lysine = new AminoAcid("C6H12N2O", "Lysine", "Lys", 'K', 7.2, new[]{"AAA", "AAG"}, "charged basic", true,
         -3.9);
     AminoAcid methionine = new AminoAcid("C5H9NOS", "Methionine", "Met", 'M', 1.8, new[]{"ATG"}, "polar neutral", true,
         1.9);
     AminoAcid phenylalanine = new AminoAcid("C9H9NO", "Phenylalanine", "Phe", 'F', 4, new[]{"TTT", "TTC"},
         "hydrophobic aromatic", true, 2.8);
     AminoAcid proline = new AminoAcid("C5H7NO", "Proline", "Pro", 'P', 5, new[]{"CCT", "CCC", "CCA", "CCG"}, "", true,
         -1.6);
     AminoAcid serine = new AminoAcid("C3H5NO2", "Serine", "Ser", 'S', 8.1,
         new[]{"TCT", "TCC", "TCA", "TCG", "AGT", "AGC"}, "polar neutral", true, -0.8);
     AminoAcid threonine = new AminoAcid("C4H7NO2", "Threonine", "Thr", 'T', 6.2, new[]{"ACT", "ACC", "ACA", "ACG"},
         "polar neutral", true, -0.7);
     AminoAcid tryptophan = new AminoAcid("C11H10N2O", "Tryptophan", "Trp", 'W', 1.3, new[]{"TGG"}, "hydrophobic aromatic",
         true, -0.9);
     AminoAcid tyrosine = new AminoAcid("C9H9NO2", "Tyrosine", "Tyr", 'Y', 3.3, new[]{"TAT", "TAC"},
         "hydrophobic aromatic", true, -1.3);
     AminoAcid valine = new AminoAcid("C5H9NO", "Valine", "Val", 'V', 6.8, new[]{"GTT", "GTC", "GTA", "GTG"},
         "hydrophobic aliphatic", true, 4.2);
     AminoAcid selenocysteine = new AminoAcid("C3H7NO2Se", "Selenocysteine", "Sec", 'U', 0.0, new[]{"TGA"}, "", false, 0.0);
     AminoAcid[] aas = new[]{
         alanine, arginine, asparagine, asparticAcid, cysteine, glutamine, glutamicAcid, glycine, histidine, isoleucine,
         leucine, lysine, methionine, phenylalanine, proline, serine, threonine, tryptophan, tyrosine, valine, selenocysteine
     };
     return aas;
 }
Esempio n. 5
0
 public static char[] GetSingleLetters(AminoAcid[] aas)
 {
     char[] result = new char[aas.Length];
     for (int i = 0; i < aas.Length; i++){
         result[i] = aas[i].letter;
     }
     return result;
 }
Esempio n. 6
0
 public static Image GetImage(AminoAcid aa)
 {
     object resource = Resources.ResourceManager.GetObject(aa.Letter.ToString(CultureInfo.InvariantCulture));
     return resource is Image ? (Image) resource : null;
 }
Esempio n. 7
0
 public static AminoAcid[] FromLetters(char[] c)
 {
     AminoAcid[] result = new AminoAcid[c.Length];
     for (int i = 0; i < c.Length; i++){
         result[i] = FromLetter(c[i]);
     }
     return result;
 }