double maxPurity(HashMap<String, Integer> count) {
		//---
		// Find the amino acid with max count
		//---

		// Count all amino acid 
		HashMap<String, Integer> countAa = new HashMap<String, Integer>();
		for( String key : count.keySet() ) {
			int cnt = count.get(key);
			String aa = key.split(KEY_SEPARATOR)[0];
			add(countAa, aa, cnt);
		}

		// Find AA with largest count
		int maxCountAa = 0;
		String maxAa = "";
		for( String aa : countAa.keySet() ) {
			int cntAa = countAa.get(aa);
			if( maxCountAa < cntAa ) {
				maxCountAa = cntAa;
				maxAa = aa;
			}
		}

		//---
		// Now find max and total count values for maxAa
		//---
		int totalMaxAa = 0, maxCountCodon = 0;
		String maxCodon = "";
		for( String key : count.keySet() ) {
			String aa = key.split(KEY_SEPARATOR)[0];
			if( aa.equals(maxAa) ) { // Is this count related to maxAa?
				int cnt = count.get(key);
				totalMaxAa += cnt;
				if( maxCountCodon < cnt ) { // New maximum for a codon?
					maxCountCodon = cnt;
					maxCodon = key.split(KEY_SEPARATOR)[1];
				}
			}
		}

		double purity = 0;
		if( maxCountCodon >= MIN_COUNT_CODON ) purity = ((double) maxCountCodon) / ((double) totalMaxAa);
		if( debug ) Gpr.debug("MaxAa: '" + maxAa + "'\ttotal: " + totalMaxAa + "\tmaxCodon: '" + maxCodon + "'\tcountCodon: " + maxCountCodon + "\t=> " + purity);
		return purity;
	}