void HDFCmpExperimentGroup::AddQVs(const std::vector<UChar> &qualityValues,
                                   const std::string &fieldName, unsigned int *offsetBegin,
                                   unsigned int *offsetEnd)
{
    std::vector<UChar> paddedQualityValues = qualityValues;
    paddedQualityValues.push_back(0);
    HDFArray<UChar> *arrayPtr = NULL;

    // This seems to be how we do it
    if (fieldName == "DeletionQV") {
        arrayPtr = &deletionQV;
    } else if (fieldName == "InsertionQV") {
        arrayPtr = &insertionQV;
    } else if (fieldName == "MergeQV") {
        arrayPtr = &mergeQV;
    } else if (fieldName == "SubstitutionQV") {
        arrayPtr = &substitutionQV;
    } else {
        assert(false);
    }

    if (!arrayPtr->isInitialized) arrayPtr->Initialize(experimentGroup, fieldName);
    *offsetBegin = arrayPtr->size();
    *offsetEnd = arrayPtr->size() + qualityValues.size();

    arrayPtr->Write(&paddedQualityValues[0], paddedQualityValues.size());
}
void HDFCmpExperimentGroup::AddTags(const std::vector<char> &qualityValues,
                                    const std::string &fieldName, unsigned int *offsetBegin,
                                    unsigned int *offsetEnd)
{
    std::vector<char> paddedQualityValues = qualityValues;
    paddedQualityValues.push_back(0);
    HDFArray<char> *arrayPtr = NULL;

    if (fieldName == "DeletionTag") {
        arrayPtr = &deletionTag;
    } else if (fieldName == "SubstitutionTag") {
        arrayPtr = &substitutionTag;
    } else {
        assert(false);
    }

    if (!arrayPtr->isInitialized) arrayPtr->Initialize(experimentGroup, fieldName);
    *offsetBegin = arrayPtr->size();
    *offsetEnd = arrayPtr->size() + qualityValues.size();

    arrayPtr->Write(&paddedQualityValues[0], paddedQualityValues.size());
}