1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
// Author: Derek Barnett
#ifndef BAMFILEMERGER_H
#define BAMFILEMERGER_H
#include <pbbam/DataSet.h>
#include <pbbam/PbiFilter.h>
#include <pbbam/ProgramInfo.h>
#include <string>
#include <vector>
namespace PacBio {
namespace BAM {
namespace common {
class BamFileMerger
{
public:
/// \brief Runs merger on a dataset, applying any supplied filters.
///
/// When this function exits, a merged BAM (and optional PBI) will have been
/// written and closed.
///
/// \param[in] dataset provides input filenames & filters
/// \param[in] outputFilename resulting BAM output
/// \param[in] mergeProgram info about the calling program. Adds a @PG entry to merged header.
/// \param[in] createPbi if true, creates a PBI alongside output BAM
///
/// \throws std::runtime_error if any any errors encountered while reading or writing
///
static void Merge(const PacBio::BAM::DataSet& dataset, const std::string& outputFilename,
const PacBio::BAM::ProgramInfo& mergeProgram = PacBio::BAM::ProgramInfo(),
bool createPbi = true);
};
} // namespace common
} // namespace BAM
} // namespace PacBio
#include "BamFileMerger.inl"
#endif // BAMFILEMERGER_H
|