halapi
hierarchichalalignmentformatapi
 All Classes Namespaces Functions Pages
halSegmentedSequence.h
1 /*
2  * Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
3  *
4  * Released under the MIT license, see LICENSE.txt
5  */
6 
7 #ifndef _HALSEGMENTEDSEQUENCE_H
8 #define _HALSEGMENTEDSEQUENCE_H
9 
10 #include "halDefs.h"
11 #include <set>
12 
13 namespace hal {
14 
24 {
25 public:
26 
28  virtual hal_size_t getSequenceLength() const = 0;
29 
33  virtual hal_size_t getNumTopSegments() const = 0;
34 
38  virtual hal_size_t getNumBottomSegments() const = 0;
39 
42  virtual TopSegmentIteratorPtr getTopSegmentIterator(
43  hal_index_t position = 0) = 0;
44 
47  virtual TopSegmentIteratorConstPtr getTopSegmentIterator(
48  hal_index_t position = 0) const = 0;
49 
51  virtual TopSegmentIteratorConstPtr getTopSegmentEndIterator() const = 0;
52 
55  virtual BottomSegmentIteratorPtr getBottomSegmentIterator(
56  hal_index_t position = 0) = 0;
57 
60  virtual BottomSegmentIteratorConstPtr getBottomSegmentIterator(
61  hal_index_t position = 0) const = 0;
62 
64  virtual BottomSegmentIteratorConstPtr getBottomSegmentEndIterator()
65  const = 0;
66 
69  virtual DNAIteratorPtr getDNAIterator(
70  hal_index_t position = 0) = 0;
71 
74  virtual DNAIteratorConstPtr getDNAIterator(
75  hal_index_t position = 0) const = 0;
76 
78  virtual DNAIteratorConstPtr getDNAEndIterator() const = 0;
79 
90  virtual ColumnIteratorConstPtr getColumnIterator(
91  const std::set<const Genome*>* targets = NULL,
92  hal_size_t maxInsertLength = 0,
93  hal_index_t position = 0,
94  hal_index_t lastPosition = NULL_INDEX,
95  bool noDupes = false,
96  bool noAncestors = false,
97  bool reverseStrand = false) const = 0;
98 
101  virtual void getString(std::string& outString) const = 0;
102 
105  virtual void setString(const std::string& inString) = 0;
106 
112  virtual void getSubString(std::string& outString, hal_size_t start,
113  hal_size_t length) const = 0;
114 
119  virtual void setSubString(const std::string& inString,
120  hal_size_t start,
121  hal_size_t length) = 0;
122 
133  virtual RearrangementPtr getRearrangement(hal_index_t position,
134  hal_size_t gapLengthThreshold,
135  double nThreshold,
136  bool atomic = false) const = 0;
137 
143  virtual GappedTopSegmentIteratorConstPtr getGappedTopSegmentIterator(
144  hal_index_t i, hal_size_t gapThreshold, bool atomic = false) const = 0;
145 
151  virtual GappedBottomSegmentIteratorConstPtr getGappedBottomSegmentIterator(
152  hal_index_t i, hal_size_t childIdx, hal_size_t gapThreshold,
153  bool atomic = false) const = 0;
154 
155 protected:
156 
158  virtual ~SegmentedSequence() = 0;
159 };
160 
162 
163 }
164 #endif
virtual TopSegmentIteratorConstPtr getTopSegmentEndIterator() const =0
virtual RearrangementPtr getRearrangement(hal_index_t position, hal_size_t gapLengthThreshold, double nThreshold, bool atomic=false) const =0
virtual void setSubString(const std::string &inString, hal_size_t start, hal_size_t length)=0
virtual ColumnIteratorConstPtr getColumnIterator(const std::set< const Genome * > *targets=NULL, hal_size_t maxInsertLength=0, hal_index_t position=0, hal_index_t lastPosition=NULL_INDEX, bool noDupes=false, bool noAncestors=false, bool reverseStrand=false) const =0
virtual BottomSegmentIteratorPtr getBottomSegmentIterator(hal_index_t position=0)=0
virtual TopSegmentIteratorPtr getTopSegmentIterator(hal_index_t position=0)=0
virtual hal_size_t getNumBottomSegments() const =0
virtual void setString(const std::string &inString)=0
virtual ~SegmentedSequence()=0
Definition: halSegmentedSequence.h:161
virtual void getString(std::string &outString) const =0
virtual hal_size_t getSequenceLength() const =0
virtual GappedBottomSegmentIteratorConstPtr getGappedBottomSegmentIterator(hal_index_t i, hal_size_t childIdx, hal_size_t gapThreshold, bool atomic=false) const =0
Definition: halSegmentedSequence.h:23
virtual BottomSegmentIteratorConstPtr getBottomSegmentEndIterator() const =0
virtual DNAIteratorConstPtr getDNAEndIterator() const =0
virtual hal_size_t getNumTopSegments() const =0
virtual GappedTopSegmentIteratorConstPtr getGappedTopSegmentIterator(hal_index_t i, hal_size_t gapThreshold, bool atomic=false) const =0
virtual void getSubString(std::string &outString, hal_size_t start, hal_size_t length) const =0
virtual DNAIteratorPtr getDNAIterator(hal_index_t position=0)=0