All Classes Namespaces Functions Pages
halSegment.h
/*
* Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALSEGMENT_H
#define _HALSEGMENT_H
#include <string>
#include <vector>
#include <set>
#include "halDefs.h"
namespace hal {
class Segment
{
public:
virtual void setArrayIndex(Genome* genome, hal_index_t arrayIndex) = 0;
virtual void setArrayIndex(const Genome* genome, hal_index_t arrayIndex)
const = 0;
virtual const Genome* getGenome() const = 0;
virtual Genome* getGenome() = 0;
virtual const Sequence* getSequence() const = 0;
virtual Sequence* getSequence() = 0;
virtual hal_index_t getStartPosition() const = 0;
virtual hal_index_t getEndPosition() const = 0;
virtual hal_size_t getLength() const = 0;
virtual void getString(std::string& outString) const = 0;
virtual void setCoordinates(hal_index_t startPos, hal_size_t length) = 0;
virtual hal_index_t getArrayIndex() const = 0;
virtual bool leftOf(hal_index_t genomePos) const = 0;
virtual bool rightOf(hal_index_t genomePos) const = 0;
virtual bool overlaps(hal_index_t genomePos) const = 0;
virtual bool isFirst() const = 0;
virtual bool isLast() const = 0;
virtual bool isMissingData(double nThreshold) const = 0;
virtual bool isTop() const = 0;
virtual hal_size_t getMappedSegments(
std::set<MappedSegmentConstPtr>& outSegments,
const Genome* tgtGenome,
const std::set<const Genome*>* genomesOnPath = NULL,
bool doDupes = true,
hal_size_t minLength = 0) const = 0;
virtual void print(std::ostream& os) const = 0;
protected:
friend class counted_ptr<Segment>;
friend class counted_ptr<const Segment>;
virtual ~Segment() = 0;
};
inline Segment::~Segment() {}
inline std::ostream& operator<<(std::ostream& os, const Segment& s)
{
s.print(os);
return os;
}
}
#endif
hal::Segment::getArrayIndex
virtual hal_index_t getArrayIndex() const =0
hal::Segment
Definition: halSegment.h:21
hal::Genome
Definition: halGenome.h:24
hal::Segment::rightOf
virtual bool rightOf(hal_index_t genomePos) const =0
hal::Segment::getEndPosition
virtual hal_index_t getEndPosition() const =0
hal::Segment::getSequence
virtual const Sequence * getSequence() const =0
hal::Segment::leftOf
virtual bool leftOf(hal_index_t genomePos) const =0
hal::Segment::isFirst
virtual bool isFirst() const =0
hal::Segment::isTop
virtual bool isTop() const =0
hal::Segment::setArrayIndex
virtual void setArrayIndex(Genome *genome, hal_index_t arrayIndex)=0
hal::Segment::isLast
virtual bool isLast() const =0
hal::Segment::getMappedSegments
virtual hal_size_t getMappedSegments(std::set< MappedSegmentConstPtr > &outSegments, const Genome *tgtGenome, const std::set< const Genome * > *genomesOnPath=NULL, bool doDupes=true, hal_size_t minLength=0) const =0
hal::Segment::getString
virtual void getString(std::string &outString) const =0
hal::Segment::setCoordinates
virtual void setCoordinates(hal_index_t startPos, hal_size_t length)=0
hal::Segment::getGenome
virtual const Genome * getGenome() const =0
hal::Segment::isMissingData
virtual bool isMissingData(double nThreshold) const =0
hal::Segment::getStartPosition
virtual hal_index_t getStartPosition() const =0
hal::Segment::print
virtual void print(std::ostream &os) const =0
hal::Sequence
Definition: halSequence.h:20
hal::Segment::overlaps
virtual bool overlaps(hal_index_t genomePos) const =0
hal::Segment::getLength
virtual hal_size_t getLength() const =0