- public:
- SamHeader(const std::string& headerText = "");
- SamHeader(const SamHeader& other);
- ~SamHeader(void);
-
- // query/modify entire SamHeader at once
- public:
-
- // clear all header contents
- void Clear(void);
-
- // checks if SAM header is well-formed
- // @verbose - if true, validation errors & warnings will be printed to stderr
- // otherwise, output is suppressed and only validation check occurs
- bool IsValid(bool verbose = false) const;
-
- // retrieves the printable, SAM-formatted header
- // (with any local modifications since construction)
- std::string ToString(void) const;
-
- // query if header contains data elements
- public:
- bool HasVersion(void) const;
- bool HasSortOrder(void) const;
- bool HasGroupOrder(void) const;
- bool HasSequences(void) const;
- bool HasReadGroups(void) const;
- bool HasProgramName(void) const;
- bool HasProgramVersion(void) const;
- bool HasProgramCommandLine(void) const;
- bool HasComments(void) const;
+ SamHeader(const std::string& headerText = "");
+ SamHeader(const SamHeader& other);
+ ~SamHeader(void);
+
+ // query/modify entire SamHeader
+ void Clear(void); // clears all header contents
+ bool IsValid(bool verbose = false) const; // returns true if SAM header is well-formed
+ void SetHeaderText(const std::string& headerText); // replaces data fields with contents of SAM-formatted text
+ std::string ToString(void) const; // returns the printable, SAM-formatted header text
+
+ // convenience query methods
+ bool HasVersion(void) const; // returns true if header contains format version entry
+ bool HasSortOrder(void) const; // returns true if header contains sort order entry
+ bool HasGroupOrder(void) const; // returns true if header contains group order entry
+ bool HasSequences(void) const; // returns true if header contains any sequence entries
+ bool HasReadGroups(void) const; // returns true if header contains any read group entries
+ bool HasProgramName(void) const; // returns true if header contains program name
+ bool HasProgramVersion(void) const; // returns true if header contains program version
+ bool HasProgramCommandLine(void) const; // returns true if header contains program command line
+ bool HasComments(void) const; // returns true if header contains comments