#include <halSegment.h>
Public Member Functions | |
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 |
Friends | |
class | counted_ptr< Segment > |
class | counted_ptr< const Segment > |
Interface for a segment of DNA. Note that segments should not be written to outside of creating new genomes.
|
pure virtual |
Get the index of the segment in the segment array
|
pure virtual |
Get the segment's end position (start + len - 1) in the genome Slicing and reversal will apply as above for iterators
|
pure virtual |
Get the containing (read-only) genome
|
pure virtual |
Get the containing genome
|
pure virtual |
Get the length of the segment (number of bases)
|
pure virtual |
Get homologous segments in target genome. Returns the number of mapped segments found.
outSegments | Output. Mapped segments are sorted along the target genome. |
tgtGenome | Target genome to map to. Can be the same as current. |
genomesOnPath | Intermediate genomes that must be visited on the way to tgt. If this is specified as NULL, then the path will be computed automatically (using hal::getGenomesInSpanningTree(this->getGenome(), tgtGenome)). Specifying this can avoid recomputing the path over and over again when, say, calling getMappedSegments repeatedly for the same source and target. |
doDupes | Specify whether paralogy edges are followed |
minLength | Minimum length of segments to consider. It is potentially much faster to filter using this parameter than doing a second pass on the output. If minLength is 0, then no segments are filtered based on length |
|
pure virtual |
Get the containing (read-only) sequence
|
pure virtual |
Get the containing sequence
|
pure virtual |
Get the start position of the segment. Note that the start position is currently always in FORWARD GENOME coordinates. That said, if the underlying object is an iterator is in reverse orientation, the segment is read from right (startposition) to left (startposition - length -1) Similarly, if called from an iterator, the slicing offsets are taken into account
|
pure virtual |
Get the DNA string corresponding to the segment from the genome
outString | string into which the results are copied |
|
pure virtual |
Check whether segment is the first segment of a sequence if underlying object is reversed iterator, then checks if last
|
pure virtual |
Check whether segment is the last segment of a sequence if underlying object is reversed iterator, then checks if first
|
pure virtual |
Test if the fraction of N's in the segment is greater than a given threshold.
nThreshold | Maximum fraction of N's in the segment for it to no be considered missing data |
|
pure virtual |
Check if underlying segment is a top segment (easier than doing a downcast. Returns true if it's a top segment and false if it's a bottom segment
|
pure virtual |
Determine if current segment is to the left of a genome coordinate
genomePos | Index of DNA character in genome |
|
pure virtual |
Determine if current segment is to the right of a genome coordinate
genomePos | Index of DNA character in genome |
|
pure virtual |
Print contents of segment
Implemented in hal::MappedSegment.
|
pure virtual |
Determine if current segment is to the right of a genome coordinate
genomePos | Index of DNA character in genome |
|
pure virtual |
Set the current array index of the segment. This writes no information to the database, but just moves the position of the segment
genome | Genome whose array we want to move segment to |
arrayIndex | Index in genomes array (in genome segment coordinates) |
|
pure virtual |
Set the current array index of the segment. This writes no information to the database, but just moves the position of the segment
genome | Genome whose array we want to move segment to |
arrayIndex | Index in genomes array (in genome segment coordinates) |
|
pure virtual |
Set the segment's start position in the genome
startPos | Start position |
length | Length |