OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aligned_region.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_SEQ_ALIGNED_REGION_HH
20 #define OST_SEQ_ALIGNED_REGION_HH
21 
22 /*
23  Author: Marco Biasini
24  */
25 #include <ost/seq/module_config.hh>
28 
29 namespace ost { namespace seq {
30 
31 
39 public:
41  AlignedRegion(const AlignmentHandle& aln,
42  int start, int end, int master=-1);
43 
45  int GetEnd() const;
47  int GetStart() const;
48  int GetMaster() const;
49  void SetMaster(int master);
51  void Delete();
54  void Replace(const AlignedRegion& aln_r);
55 
58  void ShiftLeft(int n);
59 
63  void ShiftRight(int n);
64 
68  int GetLength() const;
69 
71  AlignmentHandle GetAlignmentHandle() const;
72 
76  AlignedColumn operator[](int index) const;
77 
82 
83  bool operator==(const AlignedRegion& rhs) const;
84  bool operator!=(const AlignedRegion& rhs) const;
85 private:
86  AlignmentHandle aln_;
87  int start_;
88  int end_ ;
89  int master_;
90 };
91 
92 typedef std::vector<AlignedRegion> AlignedRegionList;
93 
94 }}
95 
96 #endif
#define DLLEXPORT_OST_SEQ
pointer_it< T > end(const std::vector< T > &values)
bool DLLEXPORT_OST_GEOM operator==(const Line2 &l1, const Line2 &l2)
DLLEXPORT_OST_IMG_BASE bool operator!=(const ImageHandle &lhs, const ConstImageHandle &rhs)
represents a region in a sequence alignment
pointer_it< T > begin(const std::vector< T > &values)
Provides access to a column in a aligned region or a sequence alignment.
AlignedColumnIterator iterator
representation of a multiple sequence alignemnt consisting of two or more sequences ...
std::vector< AlignedRegion > AlignedRegionList