yat  0.21pre
GenomicPosition.h
1 #ifndef theplu_yat_omic_gemomic_position
2 #define theplu_yat_omic_gemomic_position
3 
4 // $Id: GenomicPosition.h 3999 2020-10-08 23:22:32Z peter $
5 
6 /*
7  Copyright (C) 2010, 2012, 2013, 2018, 2020 Peter Johansson
8 
9  The yat library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 3 of the
12  License, or (at your option) any later version.
13 
14  The yat library 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 GNU
17  General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with yat. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #include <boost/operators.hpp>
24 
25 #include <string>
26 
27 namespace theplu {
28 namespace yat {
29 namespace omic {
30 
41  class GenomicPosition : boost::operators<GenomicPosition>
42  {
43  public:
47  GenomicPosition(void);
48 
54  GenomicPosition(unsigned short chr , unsigned long pos);
55 
69  GenomicPosition(const std::string& chr , unsigned long pos);
70 
82  GenomicPosition(const std::string& chr, const std::string& pos);
83 
87  unsigned short& chromosome(void);
88 
92  const unsigned short& chromosome(void) const;
93 
97  unsigned long int& position(void);
98 
102  const unsigned long int& position(void) const;
103 
104  private:
105  unsigned short chr_;
106  unsigned long pos_;
107  };
108 
118  bool operator<(const GenomicPosition& lhs, const GenomicPosition& rhs);
119 
127  bool operator==(const GenomicPosition& lhs, const GenomicPosition& rhs);
128 
142  unsigned short chr2int(const std::string& str);
143 
144 }}}
145 #endif
Definition: GenomicPosition.h:41
The Department of Theoretical Physics namespace as we define it.
unsigned short chr2int(const std::string &str)
transform a string to unsigned short chromosome number
unsigned long int & position(void)
unsigned short & chromosome(void)

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14