private void decodeReadBases(String readBases) {
        StringBuilder output = new StringBuilder(readBases.length());
        for (int i = 0; i < readBases.length(); i++) {
            char c = readBases.charAt(i);
            if (c == '^') {
                i++;
            } else if (c == '$') {
            } else if (c == '.' || c == ',') {
                output.append(refBase);
            } else {
                output.append(c);
            }
        }
        readBases = output.toString();
        Matcher m = p.matcher(readBases);
        while (m.find()) {
            Pattern p2 = Pattern.compile("(\\+|-)" + m.group() + "(A|C|G|T|M|R|W|S|Y|K|V|H|D|B|X|N){" + m.group() + "}", Pattern.CASE_INSENSITIVE);
            Matcher m2 = p2.matcher(readBases);
            StringBuffer sb = new StringBuffer();
            while (m2.find()) {
                m2.appendReplacement(sb, "");
                if (m2.group().startsWith("+")) {
                    String b = m2.group().replace("+" + m.group(), "");
                    Integer count = indels.get(b.toUpperCase());
                    if (count == null) {
                        count = 0;
                    }
                    indels.put(b.toUpperCase(), count + 1);
                }
            }
            m2.appendTail(sb);
            readBases = sb.toString();
        }
        this.readBases = readBases.toUpperCase();
    }