@Override
    public double[] computeValue(char refBase, FastaWindow window, AlignmentColumn col) {

        values[major] = 0.0;
        values[minor] = 0.0;

        int countMajor = 0;
        int countMinor = 0;

        if (col.getDepth() > 0) {

            calculateAlleles(col.getBases(), col.getDepth(), refBase);
            Iterator<MappedRead> it = col.getIterator();

            while(it.hasNext()) {
                MappedRead read = it.next();
                if (read.hasBaseAtReferencePos(col.getCurrentPosition())) {
                    byte b = read.getBaseAtReferencePos(col.getCurrentPosition());
                    byte q = read.getQualityAtReferencePos(col.getCurrentPosition());

                    if (isPhred33) q += 31;

                    if ((char) b == getMajorAllele()) {
                        values[major] += q;
                        countMajor++;
                    } else if ((char) b == getMinorAllele()) {
                        values[minor] += q;
                        countMinor++;
                    }
                }
            }
        }

        if (countMajor > 0)
            values[major] = values[major] / (double)countMajor;
        if (countMinor > 0)
            values[minor] = values[minor] / (double)countMinor;

        return values;
    }