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

        values[0] = 0;
        int count = 0;

        if (col.getDepth() > 0) {
            Iterator<MappedRead> it = col.getIterator();
            while (it.hasNext()) {
                MappedRead read = it.next();
                if (read.hasBaseAtReferencePos(col.getCurrentPosition())) {
                    // Exclude ambiguous base
                    if (read.getBaseAtReferencePos(col.getCurrentPosition()) == 'N')
                        continue;

                    // Only count variant base
                    if (read.getBaseAtReferencePos(col.getCurrentPosition()) != refBase) {
                        values[0] += read.getRecord().getMappingQuality();
                        count++;
                    }
                }
            }
        }

        if (count > 0)
            values[0] = values[0] / (double)count;

        return values;
    }