Main Page | Class Hierarchy | Class List | File List | Class Members

SeqLoc Class Reference

Responsibilities:
This is a general interface for dealing with specific
locations on a double stranded sequence
SeqLoc is implemented specifically with the idea of traversing through a double stranded sequence. More...

#include <SeqLoc.h>

Inheritance diagram for SeqLoc:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SeqLoc (dsu::Strand_t, int, int)
 a sequence location is made up of a strand, (positive or negative, or both) and the 5' 3' location.

 SeqLoc (const SeqLoc &)
 copy constructor

virtual ~SeqLoc ()
 object does not manage dynamic memory allocation

dsu::Strand_t getStrnd () const
 return which strand this location refers to

int getEnd5 () const
 get 5' end (always from positive perspective)

int getEnd3 () const
 get 3' end (always from positive perspective)

bool inRange (int) const
unsigned length () const
 sequence location length: 3'-5'+1

bool isEnd5Set () const
 if 5' == -1 returns false, true otherwise

bool isEnd3Set () const
 if 3' == -1 returns false, true otherwise

bool operator== (const SeqLoc &sl) const
 returns true if both sequence locations are on the same strand, and have the same 5' and 3' values

virtual const string & getTypeStr () const
 object identifier, useful, for polymorophic applications of SeqLoc

virtual void print (std::ostream &, const string &="") const
 print sequence location information

virtual int getClosestEnd5 (int) const
 returns 5' (derived classes overide this behavior)

virtual int getClosestEnd3 (int, int) const
 returns 3' (derived classes overide this behavior)

virtual bool isActualOverlap (int, int) const
 Precondition, int,int are already within the boundaries of this sequence location this only applies to seqlocations broken into sub sequence elements, e.g.

void setEnd5 (int)
 user can set 5' end

void setEnd3 (int)
 user can set 3' end

void setStrnd (dsu::Strand_t strnd)
 user can set 3' end


Friends

std::ostream & operator<< (std::ostream &, const SeqLoc &)
bool operator< (const SeqLoc &, const SeqLoc &)
bool isOverlap (const SeqLoc &, const SeqLoc &)

Detailed Description

Responsibilities:
This is a general interface for dealing with specific
locations on a double stranded sequence
SeqLoc is implemented specifically with the idea of traversing through a double stranded sequence.

This means that 5' < 3' always, and that the sequence location may refer to exclusively to one strand or both depending on the constructor Collaborators:
None. SeqLoc is the Base Class of a hierarchy


Constructor & Destructor Documentation

SeqLoc::SeqLoc dsu::Strand_t  ,
int  ,
int 
 

a sequence location is made up of a strand, (positive or negative, or both) and the 5' 3' location.

5' is from the positive strand perspective always, so 5' < 3' always. The 5' and 3' coordinates are inclusive so that the length of the sequence is 3'-5'+1

Parameters:
strand - dsu::ePos,dsu::eNeg or dsu::eEither
int - 5' location
int - 3' location


Member Function Documentation

bool SeqLoc::inRange int   )  const
 

Parameters:
int - refers to an idx to a base pair in the sequence
returns true if the idx falls within the 5',3' coordinates of this sequence location

virtual bool SeqLoc::isActualOverlap int  ,
int 
const [inline, virtual]
 

Precondition, int,int are already within the boundaries of this sequence location this only applies to seqlocations broken into sub sequence elements, e.g.

DataSetAbstractProduct

virtual void SeqLoc::print std::ostream &  ,
const string &  = ""
const [virtual]
 

print sequence location information

Parameters:
const string& - prints always take an optional string argument that allows the user to prepend a string to the output

Reimplemented in DataSetAbstractProduct, and Prediction.


The documentation for this class was generated from the following files: