yat
0.8.3pre
|
00001 #ifndef theplu_yat_omic_gemomic_position 00002 #define theplu_yat_omic_gemomic_position 00003 00004 /* 00005 $Id: GenomicPosition.h 2389 2010-12-22 20:34:31Z peter $ 00006 00007 Copyright (C) 2010 Peter Johansson 00008 00009 The yat library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License as 00011 published by the Free Software Foundation; either version 3 of the 00012 License, or (at your option) any later version. 00013 00014 The yat library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 00023 #include <boost/operators.hpp> 00024 00025 #include <string> 00026 00027 namespace theplu { 00028 namespace yat { 00029 namespace omic { 00030 00041 class GenomicPosition : boost::operators<GenomicPosition> 00042 { 00043 public: 00047 GenomicPosition(void); 00048 00054 GenomicPosition(unsigned short chr , unsigned long pos); 00055 00067 GenomicPosition(const std::string& chr, const std::string& pos); 00068 00072 unsigned short& chromosome(void); 00073 00077 const unsigned short& chromosome(void) const; 00078 00082 unsigned long int& position(void); 00083 00087 const unsigned long int& position(void) const; 00088 00089 private: 00090 unsigned short chr_; 00091 unsigned long pos_; 00092 }; 00093 00103 bool operator<(const GenomicPosition& lhs, const GenomicPosition& rhs); 00104 00112 bool operator==(const GenomicPosition& lhs, const GenomicPosition& rhs); 00113 00127 unsigned short chr2int(const std::string& str); 00128 00129 }}} 00130 #endif