void calcDegeneracy() {
		degeneracy = new HashMap<String, Integer>();

		for (char base1 : DnaCoder.TO_BASE)
			for (char base2 : DnaCoder.TO_BASE)
				for (char base3 : DnaCoder.TO_BASE) {

					char c[] = { base1, base2, base3 };
					String codonStrOld = new String(c);
					String aaOld = aa(codonStrOld);

					for (int pos = 0; pos < 3; pos++) {
						int count = 0;
						for (char baseNew : DnaCoder.TO_BASE) {
							char codon[] = { base1, base2, base3 };
							codon[pos] = baseNew;
							String codonStrNew = new String(codon);
							String aaNew = aa(codonStrNew);

							if (aaOld.equals(aaNew)) count++; // Same AA after changing base[pos]? => count (it's a degenerate)
						}

						String key = codonStrOld.toUpperCase() + "_" + pos;
						degeneracy.put(key, count);
					}
				}
	}