halapi
hierarchichalalignmentformatapi
 All Classes Namespaces Functions Pages
halTopSegment.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 _HALTOPSEGMENT_H
8 #define _HALTOPSEGMENT_H
9 
10 #include "halDefs.h"
11 #include "halSegment.h"
12 
13 namespace hal {
14 
18 class TopSegment : virtual public Segment
19 {
20 public:
21 
23  virtual hal_index_t getParentIndex() const = 0;
24 
25  /* Check if segment has a parent bottom segment */
26  virtual bool hasParent() const = 0;
27 
30  virtual void setParentIndex(hal_index_t parIdx) = 0;
31 
33  virtual bool getParentReversed() const = 0;
34 
37  virtual void setParentReversed(bool isReversed) = 0;
38 
41  virtual hal_index_t getBottomParseIndex() const = 0;
42 
46  virtual void setBottomParseIndex(hal_index_t botParseIdx) = 0;
47 
50  virtual hal_offset_t getBottomParseOffset() const = 0;
51 
52  /* Check if segment has a "down" parse bottom segment in the same genome.
53  * This segment should exist by definition unless in a leaf genome */
54  virtual bool hasParseDown() const = 0;
55 
57  virtual hal_index_t getNextParalogyIndex() const = 0;
58 
59  /* Check if top segment has a paralgy in the same genome */
60  virtual bool hasNextParalogy() const = 0;
61 
65  virtual void setNextParalogyIndex(hal_index_t parIdx) = 0;
66 
70  virtual hal_index_t getLeftParentIndex() const = 0;
71 
75  virtual hal_index_t getRightParentIndex() const = 0;
76 
82  virtual bool isCanonicalParalog() const = 0;
83 
84 protected:
85  friend class counted_ptr<TopSegment>;
86  friend class counted_ptr<const TopSegment>;
87  virtual ~TopSegment() = 0;
88 };
89 
90 inline TopSegment::~TopSegment() {}
91 }
92 #endif
virtual void setNextParalogyIndex(hal_index_t parIdx)=0
Definition: halSegment.h:21
virtual hal_index_t getRightParentIndex() const =0
Definition: halTopSegment.h:18
virtual void setParentReversed(bool isReversed)=0
virtual void setBottomParseIndex(hal_index_t botParseIdx)=0
virtual bool getParentReversed() const =0
virtual hal_index_t getBottomParseIndex() const =0
virtual hal_index_t getParentIndex() const =0
virtual hal_index_t getLeftParentIndex() const =0
virtual bool isCanonicalParalog() const =0
virtual hal_offset_t getBottomParseOffset() const =0
virtual void setParentIndex(hal_index_t parIdx)=0
virtual hal_index_t getNextParalogyIndex() const =0