1 // ***************************************************************************
2 // SamFormatParser.h (c) 2010 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // All rights reserved.
5 // ---------------------------------------------------------------------------
6 // Last modified: 23 December 2010 (DB)
7 // ---------------------------------------------------------------------------
8 // Provides functionality for parsing SAM header text into SamHeader object
9 // ***************************************************************************
11 #ifndef SAM_FORMAT_PARSER_H
12 #define SAM_FORMAT_PARSER_H
18 // This file is not part of the BamTools API. It exists purely as an
19 // implementation detail. This header file may change from version to version
20 // without notice, or even be removed.
33 class SamFormatParser {
37 SamFormatParser(BamTools::SamHeader& header);
38 ~SamFormatParser(void);
40 // parse text & populate header data
42 void Parse(const std::string& headerText);
46 void ParseSamLine(const std::string& line);
47 void ParseHDLine(const std::string& line);
48 void ParseSQLine(const std::string& line);
49 void ParseRGLine(const std::string& line);
50 void ParsePGLine(const std::string& line);
51 void ParseCOLine(const std::string& line);
52 const std::vector<std::string> Split(const std::string& line, const char delim);
59 } // namespace Internal
60 } // namespace BamTools
62 #endif // SAM_FORMAT_PARSER_H