All Classes Namespaces Functions Pages
halRearrangement.h
/*
* Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALREARRANGEMENT_H
#define _HALREARRANGEMENT_H
#include <vector>
#include <string>
#include "halDefs.h"
#include "halTopSegmentIterator.h"
namespace hal {
class Rearrangement
{
public:
enum ID { Insertion = 0, Deletion, Duplication, Translocation,
Transposition, Inversion, Complex, Invalid, Gap,
Missing, Nothing};
virtual ID getID() const = 0;
virtual hal_size_t getLength() const = 0;
virtual hal_size_t getNumContainedGaps() const = 0;
virtual hal_size_t getNumContainedGapBases() const = 0;
virtual TopSegmentIteratorConstPtr getLeftBreakpoint() const = 0;
virtual TopSegmentIteratorConstPtr getRightBreakpoint() const = 0;
virtual bool identifyFromLeftBreakpoint(TopSegmentIteratorConstPtr
topSegment) = 0;
virtual bool identifyDeletionFromLeftBreakpoint(TopSegmentIteratorConstPtr
topSegment) = 0;
virtual std::pair<hal_index_t, hal_index_t> getDeletedRange() const = 0;
virtual bool identifyInsertionFromLeftBreakpoint(TopSegmentIteratorConstPtr
topSegment) = 0;
virtual std::pair<hal_index_t, hal_index_t> getInsertedRange() const = 0;
virtual std::pair<hal_index_t, hal_index_t> getDuplicatedRange() const = 0;
virtual bool identifyNext() = 0;
virtual hal_size_t getGapLengthThreshold() const = 0;
virtual void setGapLengthThreshold(hal_size_t threshold) = 0;
virtual void setAtomic(bool atomic) = 0;
/* Get the atomic behaviour */
virtual bool getAtomic() const = 0;
/* Set the threshold for missing data (N's) in a rearranged segment
* @param nThreshold Value between 0 and 1. If the number of N's
* in the rearranged segment / segment length > nThreshold, then
* the rearrangement is termed "missing data". */
virtual void setNThreshold(double nThreshold) = 0;
/* Get the threshold for missing data (N's) in a rearranged segment
* If the number of N's
* in the rearranged segment / segment length > nThreshold, then
* the rearrangement is termed "missing data". */
virtual double getNThreshold() const = 0;
protected:
friend class counted_ptr<Rearrangement>;
friend class counted_ptr<const Rearrangement>;
virtual ~Rearrangement() = 0;
};
inline Rearrangement::~Rearrangement() {}
}
#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