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