halapi hierarchichalalignmentformatapi

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Pages
halRearrangement.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 _HALREARRANGEMENT_H
8 #define _HALREARRANGEMENT_H
9
10 #include <vector>
11 #include <string>
12 #include "halDefs.h"
13 #include "halTopSegmentIterator.h"
14
15 namespace hal {
16
23 class Rearrangement
24 {
25 public:
26
27 enum ID { Insertion = 0, Deletion, Duplication, Translocation,
28 Transposition, Inversion, Complex, Invalid, Gap,
29 Missing, Nothing};
30
32 virtual ID getID() const = 0;
33
36 virtual hal_size_t getLength() const = 0;
37
40 virtual hal_size_t getNumContainedGaps() const = 0;
41
45 virtual hal_size_t getNumContainedGapBases() const = 0;
46
48 virtual TopSegmentIteratorConstPtr getLeftBreakpoint() const = 0;
49
51 virtual TopSegmentIteratorConstPtr getRightBreakpoint() const = 0;
52
56 virtual bool identifyFromLeftBreakpoint(TopSegmentIteratorConstPtr
57 topSegment) = 0;
58
61 virtual bool identifyDeletionFromLeftBreakpoint(TopSegmentIteratorConstPtr
62 topSegment) = 0;
63
67 virtual std::pair<hal_index_t, hal_index_t> getDeletedRange() const = 0;
68
72 virtual bool identifyInsertionFromLeftBreakpoint(TopSegmentIteratorConstPtr
73 topSegment) = 0;
74
78 virtual std::pair<hal_index_t, hal_index_t> getInsertedRange() const = 0;
79
83 virtual std::pair<hal_index_t, hal_index_t> getDuplicatedRange() const = 0;
84
86 virtual bool identifyNext() = 0;
87
90 virtual hal_size_t getGapLengthThreshold() const = 0;
91
94 virtual void setGapLengthThreshold(hal_size_t threshold) = 0;
95
100 virtual void setAtomic(bool atomic) = 0;
101
102 /* Get the atomic behaviour */
103 virtual bool getAtomic() const = 0;
104
105 /* Set the threshold for missing data (N's) in a rearranged segment
106 * @param nThreshold Value between 0 and 1. If the number of N's
107 * in the rearranged segment / segment length > nThreshold, then
108 * the rearrangement is termed "missing data". */
109 virtual void setNThreshold(double nThreshold) = 0;
110
111 /* Get the threshold for missing data (N's) in a rearranged segment
112 * If the number of N's
113 * in the rearranged segment / segment length > nThreshold, then
114 * the rearrangement is termed "missing data". */
115 virtual double getNThreshold() const = 0;
116
117 protected:
118 friend class counted_ptr<Rearrangement>;
119 friend class counted_ptr<const Rearrangement>;
121 virtual ~Rearrangement() = 0;
122 };
123
124 inline Rearrangement::~Rearrangement() {}
125
126 }
127 #endif
hal::Rearrangement::identifyFromLeftBreakpoint
virtual bool identifyFromLeftBreakpoint(TopSegmentIteratorConstPtr topSegment)=0
hal::Rearrangement::setAtomic
virtual void setAtomic(bool atomic)=0
hal::Rearrangement::identifyDeletionFromLeftBreakpoint
virtual bool identifyDeletionFromLeftBreakpoint(TopSegmentIteratorConstPtr topSegment)=0
hal::Rearrangement::getDeletedRange
virtual std::pair< hal_index_t, hal_index_t > getDeletedRange() const =0
hal::Rearrangement::identifyNext
virtual bool identifyNext()=0
hal::Rearrangement::setGapLengthThreshold
virtual void setGapLengthThreshold(hal_size_t threshold)=0
hal::Rearrangement::getInsertedRange
virtual std::pair< hal_index_t, hal_index_t > getInsertedRange() const =0
hal::Rearrangement::getNumContainedGaps
virtual hal_size_t getNumContainedGaps() const =0
hal::Rearrangement::~Rearrangement
virtual ~Rearrangement()=0
Definition: halRearrangement.h:124
hal::Rearrangement::getDuplicatedRange
virtual std::pair< hal_index_t, hal_index_t > getDuplicatedRange() const =0
hal::Rearrangement::getNumContainedGapBases
virtual hal_size_t getNumContainedGapBases() const =0
hal::Rearrangement::getGapLengthThreshold
virtual hal_size_t getGapLengthThreshold() const =0
hal::Rearrangement
Definition: halRearrangement.h:23
hal::Rearrangement::identifyInsertionFromLeftBreakpoint
virtual bool identifyInsertionFromLeftBreakpoint(TopSegmentIteratorConstPtr topSegment)=0
hal::Rearrangement::getLeftBreakpoint
virtual TopSegmentIteratorConstPtr getLeftBreakpoint() const =0
hal::Rearrangement::getRightBreakpoint
virtual TopSegmentIteratorConstPtr getRightBreakpoint() const =0
hal::Rearrangement::getLength
virtual hal_size_t getLength() const =0
hal::Rearrangement::getID
virtual ID getID() const =0