Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_obofile.hpp
1/*
2##############################################################################
3# File: ms_obofile.hpp #
4# Mascot Parser toolkit #
5# Utility functions for accessing ontology files in the .obo format #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2008 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Source: parser/inc/ms_obofile.hpp $
12# $Author: villek@matrixscience.com $
13# $Date: 2018-07-30 16:23:53 +0100 $
14# $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19#ifndef MS_OBOFILE_HPP
20#define MS_OBOFILE_HPP
21
22
23#include <string>
24#include <vector>
25#include <map>
26
27namespace matrix_science {
34
42 class MS_MASCOTRESFILE_API ms_obofile: public ms_errors
43 {
44 public:
46 ms_obofile();
47
49 ms_obofile(const char * oboFileName);
50
52 ms_obofile(const ms_obofile& right);
53
56
57#ifndef SWIG
59 ms_obofile& operator=(const ms_obofile& right);
60#endif
62 void copyFrom(const ms_obofile* right);
63
65 void defaultValues();
66
68 std::vector<std::string> getItemFromId(const char * id) const;
69
71 std::string findIDFromTagValue(const char * tag, const char * value) const;
72
74 void parseLine(const std::string str, std::string & tag, std::string & value, std::string & comment) const;
75
77 int getNumberOfEntries() const;
78
79
80 private:
81 void clearOntology();
82 typedef std::vector<std::string> ontologyItem_t;
83 typedef std::map<std::string, ontologyItem_t> ontology_t;
84 ontology_t ontology_;
85
86 }; // class ms_obofile // end of config_group
88} // namespace matrix_science
89
90#endif // MS_OBOFILE_HPP
91
92/*------------------------------- End of File -------------------------------*/
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
The class provides simplified access to ontology files in the .obo format.
Definition: ms_obofile.hpp:43