Exemple #1
0
static
void H5FilenamesFromBasH5(const string& basFileName,
                          vector<string>* const output)
{
    HDFNewBasReader reader;
    if (reader.Initialize(basFileName))
        for (const auto& baxFileName : reader.GetBaxFileNames())
            output->push_back(baxFileName);
    else
        output->push_back(basFileName);
}
std::vector<std::string> FileOfFileNames::Bas2Bax(std::string &basFN)
{
    // There are two types of bas.h5 files.
    // Before SMRT 2.0, bas.h5 files contain all the /PulseData data,
    // in this case, return the bas.h5.
    // After SMRT 2.0, bas.h5 files have been changed to only contain
    // paths to bax.h5 files (in the /MultiPart/Parts group), while
    // all base calls and QVs are in bax.h5 files. In this case,
    // return path to the bax.h5 files. Assumption is that bax.h5
    // files are in the same directory as bas.h5 file.
    std::vector<std::string> baxFNs;
    HDFNewBasReader reader;
    if (reader.Initialize(basFN) != 0) {
        baxFNs = reader.GetBaxFileNames();
    } else {
        baxFNs.push_back(basFN);
    }
    reader.Close();
    return baxFNs;
}