MDA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
ProteinSequence.hpp
Go to the documentation of this file.
1 /*
2  * ProteinSequence.h
3  *
4  * Created on: Jun 10, 2013
5  * Author: Carsten Kemena
6  *
7  * This file is part of MDAT.
8  *
9  * MDAT is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * MDAT is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with MDAT. If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23 
28 #ifndef PROTEINSEQUENCE_H_
29 #define PROTEINSEQUENCE_H_
30 
31 
32 // boost header
33 #include <boost/lexical_cast.hpp>
34 
35 #include "Sequence.hpp"
36 #include "../Annotation/DomainArchitecture.hpp"
37 
38 
39 namespace MDAT
40 {
41 
51 {
52 private:
53  DomainArchitecture _dom_architecture;
54 
55 public:
57 
58 
62  ProteinSequence(const std::string &seq_name, const std::string &seq, const std::string &comment_="", size_t seq_id=0);
66  ProteinSequence(const std::string &seq_name, const std::string &comment_, unsigned int seq_length, size_t seq_id=0);
70  ProteinSequence(const Sequence &seq);
71 
72 
73  virtual ~ProteinSequence();
79 
80 
85  void add_domain(const Domain &dom)
86  {
87  _dom_architecture.add_domain(dom);
88  }
89 
90 
97  {
98  return _dom_architecture;
99  }
100 
104  const DomainArchitecture &
105  dom_archi() const
106  {
107  return _dom_architecture;
108  }
109 
110 
116  Domain &
117  domain(size_t index)
118  {
119  return _dom_architecture[index];
120  }
121 
126  size_t
127  n_domains() const
128  {
129  return _dom_architecture.length();
130  }
132 };
133 
134 
141 } /* namespace Sequence */
142 #endif /* PROTEINSEQUENCE_H_ */