// SamHeader.cpp (c) 2010 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
-// Last modified: 6 October 2011 (DB)
+// Last modified: 10 October 2011 (DB)
// ---------------------------------------------------------------------------
// Provides direct read/write access to the SAM header data fields.
// ***************************************************************************
-#include <api/SamConstants.h>
-#include <api/SamHeader.h>
-#include <api/internal/BamException_p.h>
-#include <api/internal/SamFormatParser_p.h>
-#include <api/internal/SamFormatPrinter_p.h>
-#include <api/internal/SamHeaderValidator_p.h>
+#include "api/SamConstants.h"
+#include "api/SamHeader.h"
+#include "api/internal/BamException_p.h"
+#include "api/internal/SamFormatParser_p.h"
+#include "api/internal/SamFormatPrinter_p.h"
+#include "api/internal/SamHeaderValidator_p.h"
using namespace BamTools;
using namespace BamTools::Internal;
using namespace std;
/*! \var SamHeader::Version
\brief corresponds to \@HD VN:\<Version\>
- Required for valid SAM header, if @HD record is present.
+ Required for valid SAM header, if \@HD record is present.
*/
/*! \var SamHeader::SortOrder
\brief corresponds to \@HD SO:\<SortOrder\>
\brief corresponds to \@RG entries
\sa SamReadGroup, SamReadGroupDictionary
*/
-/*! \var SamHeader::ProgramName
- \brief corresponds to \@PG ID:\<ProgramName\>
-*/
-/*! \var SamHeader::ProgramVersion
- \brief corresponds to \@PG VN:\<ProgramVersion\>
-*/
-/*! \var SamHeader::ProgramCommandLine
- \brief corresponds to \@PG CL:\<ProgramCommandLine\>
+/*! \var SamHeader::Programs
+ \brief corresponds to \@PG entries
+ \sa SamProgram, SamProgramChain
*/
/*! \var SamHeader::Comments
\brief corresponds to \@CO entries
}
/*! \fn std::string SamHeader::GetErrorString(void) const
- \brief Returns human-readable description of last error encountered
+ \brief Returns a human-readable description of the last error that occurred
+
+ This method allows elimination of STDERR pollution. Developers of client code
+ may choose how the messages are displayed to the user, if at all.
+
+ \return error description
*/
std::string SamHeader::GetErrorString(void) const {
return m_errorString;
/*! \fn bool SamHeader::IsValid(bool verbose = false) const
\brief Checks header contents for required data and proper formatting.
- \param verbose If set to true, validation errors & warnings will be printed to stderr.
- Otherwise, messages are available through SamHeader::GetErrorString().
+
+ \param[in] verbose If set to true, validation errors & warnings will be printed to stderr.
+ Otherwise, messages are available through SamHeader::GetErrorString().
\return \c true if SAM header is well-formed
*/
bool SamHeader::IsValid(bool verbose) const {
/*! \fn void SamHeader::SetHeaderText(const std::string& headerText)
\brief Replaces header contents with \a headerText.
- \param headerText SAM formatted-text that will be parsed into data fields
+
+ \param[in] headerText SAM formatted-text that will be parsed into data fields
*/
void SamHeader::SetHeaderText(const std::string& headerText) {