pub fn guess(ct: &LetterCounts) -> Option<Alphabet>Expand description
Easel’s esl_abc_GuessAlphabet(): the alphabet implied by a letter composition, or None
when the composition does not determine it.
Rules, in order (n = total letters):
- n ≤ 10 → unknown (too little evidence);
- n > 2000 and all N → DNA (genome assemblies led by N runs);
- any of
EFIJLOPQZ→ protein; - ≥ 98%
ACGTNand all of A, C, G, T seen → DNA; - ≥ 98%
ACGUNand all of A, C, G, U seen → RNA; - ≥ 98% amino-acid letters (or N, T, X), more
DHKMRSVWYthanACG, and at least 15 different letters seen → protein (as written in Easel this cannot fire: when rule 3 does not apply, at most 14 of these letters can occur; kept for fidelity); - otherwise unknown.