Match Class Reference

#include <Match.h>

Inheritance diagram for Match:

Blmodel M8Match M8MatchEX

List of all members.

Public Member Functions

 Match ()
 Match (const Match &m)
 Match (int qb, int qe, int tb, int te)
 ~Match ()
Matchoperator= (const Match &m)
bool operator< (const Match &m) const
bool operator== (const Match &m) const
const RangequeryRange () const
const RangetargetRange () const
int targetBegin () const
int targetEnd () const
int queryBegin () const
int queryEnd () const
int queryLength () const
int targetLength () const
char targetDirection () const
bool onPlus () const
bool onMinus () const
bool targetOnPlus () const
bool targetOnMinus () const
bool isNull () const
int qoverlap (const Match &m, bool sameDirection=true) const
int toverlap (const Match &m, bool sameDirection=true) const
pair< int, int > overlap (const Match &m, bool sd=true) const
pair< int, int > overlay (const Match &m) const
pair< float, float > overlayFraction (const Match &m) const
pair< float, float > queryOverlapFraction (const Match &m, bool sameDirection=true) const
float queryOverlapFractionMax (const Match &m, bool sameDirection=true) const
float queryOverlapFractionMerge (const Match &m, bool sameDirection=true) const
pair< float, float > targetOverlapFraction (const Match &m, bool sameDirection=true) const
float targetOverlapFractionMax (const Match &m, bool sameDirection=true) const
float targetOverlapFractionMerge (const Match &m, bool sameDirection=true) const
bool contain (const Match &m, bool sameDirection=true) const
bool qcontain (const Match &m, bool sd=true) const
bool tcontain (const Match &m, bool sd=true) const
bool similar (const Match &m, bool sd=true) const
bool coveredBy (const Match &m, bool sd=true, float fraction=0.8) const
bool plusContain (const Match &m) const
bool qplustminusContain (const Match &m) const
int queryDistance (const Match &m)
int targetDistance (const Match &m)
pair< int, int > combine (const Match &m)
void setNull ()
void setTargetRange (int b, int e)
void set (int qb, int qe, int tb, int te)
ostream & output (ostream &ous, const char delimiter[]="\t") const
string asDelimitedString (const char delimiter[]=",") const

Protected Attributes

Range q
Range t

Friends

ostream & operator<< (ostream &ous, const Match &m)


Detailed Description

describe one of the possibly many sequene matches from query to target q->t This should be a generic match, because different program may represent matches in slightly different ways.

This class will not store the query and target ids. A derived class will store this information.


Constructor & Destructor Documentation

Match::Match (  )  [inline]

Build an empty Match

Match::Match ( const Match m  )  [inline]

Match::Match ( int  qb,
int  qe,
int  tb,
int  te 
) [inline]

Build a match object based on the ranges of match given.

Parameters:
qb query begin index inclusive
qe query end index inclusive
tb target begin index
te target end index Whether the index is 0 or 1-bases depends on the application.

Match::~Match (  )  [inline]


Member Function Documentation

Match & Match::operator= ( const Match m  ) 

References q, and t.

Referenced by M8Match::operator=().

bool Match::operator< ( const Match m  )  const

Match A is absolutely before B with no overlap.

Right now this oerator should only be meaningful to Matches that are both in the + direction | |------| | | A | | |------| | | |----| | | | | | B | | |----| \/------------------------> target When comparing matches A and B, A<B, where the horizontal direction is target, from small to large. The vertical dimension is the query axis, from top to buttom (small to large). Alternative definition is A.q.begin < B.q.begin and A.t.begin < B.t.begin

References Range::begin(), Range::end(), onPlus(), q, and t.

bool Match::operator== ( const Match m  )  const [inline]

Test identical match

References q, and t.

const Range& Match::queryRange (  )  const [inline]

const Range& Match::targetRange (  )  const [inline]

int Match::targetBegin (  )  const [inline]

int Match::targetEnd (  )  const [inline]

int Match::queryBegin (  )  const [inline]

int Match::queryEnd (  )  const [inline]

int Match::queryLength (  )  const [inline]

Reimplemented in Blmodel.

References Range::length(), and q.

Referenced by Boxchain::querySeqCovered().

int Match::targetLength (  )  const [inline]

Reimplemented in Blmodel.

References Range::length(), and t.

char Match::targetDirection (  )  const [inline]

References Range::direction(), and t.

Referenced by Boxchain::direction().

bool Match::onPlus (  )  const [inline]

This is a more generic function. Testing both query and target on the + direction.

References Range::direction(), q, and t.

Referenced by operator<().

bool Match::onMinus (  )  const [inline]

References Range::direction(), q, and t.

bool Match::targetOnPlus (  )  const [inline]

bool Match::targetOnMinus (  )  const [inline]

References Range::direction(), and t.

bool Match::isNull (  )  const [inline]

both query and target are NULL objects

References Range::isNull(), q, and t.

int Match::qoverlap ( const Match m,
bool  sameDirection = true 
) const [inline]

query overlap amount

References Range::overlap(), and q.

int Match::toverlap ( const Match m,
bool  sameDirection = true 
) const [inline]

target overlap amount

References Range::overlap(), and t.

pair<int, int> Match::overlap ( const Match m,
bool  sd = true 
) const [inline]

it return the query,target overlap as a pair of integers return 0 if no overlap.

Parameters:
sd has the same power as the parameter in the Range class. If set true, then overlap is computed only for Ranges in the same direction. Otherwise, return 0.

References Range::overlap(), q, and t.

Referenced by M8Match::combine().

pair<int, int> Match::overlay ( const Match m  )  const [inline]

regardless of direction

References Range::overlay(), q, and t.

pair<float,float> Match::overlayFraction ( const Match m  )  const [inline]

References Range::overlayFraction(), q, and t.

pair< float, float > Match::queryOverlapFraction ( const Match m,
bool  sameDirection = true 
) const

return the query overlap fractions of this and m as compared to the queryRange for both objects. Compare to ...OverlapFractionMerge() methods that return only one number.

References Range::length(), Range::overlap(), and q.

Referenced by queryOverlapFractionMax().

float Match::queryOverlapFractionMax ( const Match m,
bool  sameDirection = true 
) const [inline]

float Match::queryOverlapFractionMerge ( const Match m,
bool  sameDirection = true 
) const [inline]

return the overlaping fraction of the query Ranges as compared to the merged Ranges of the two Ranges

return negative numbers if no overlap.

References Range::overlapFraction(), and q.

Referenced by MatchQueryLessThan::operator()(), and beforeMatchQuery::operator()().

pair< float, float > Match::targetOverlapFraction ( const Match m,
bool  sameDirection = true 
) const

float Match::targetOverlapFractionMax ( const Match m,
bool  sameDirection = true 
) const [inline]

float Match::targetOverlapFractionMerge ( const Match m,
bool  sameDirection = true 
) const [inline]

the overlap fraction compared the merged range The same function in Range class overlapFraction().

Parameter: sameDirection if true, then return 0 for target Ranges that are on the opposite strand.

References Range::overlapFraction(), and t.

Referenced by afterMatchQuery::operator()().

bool Match::contain ( const Match m,
bool  sameDirection = true 
) const [inline]

if the sameDirection is true, the only the ranges are in the same directions are they compared. Test both query and target contain relation.

References Range::contain(), q, and t.

Referenced by Linkmatch::bestModel(), M8Match::contain(), and Linkmatch::removeChain().

bool Match::qcontain ( const Match m,
bool  sd = true 
) const [inline]

References Range::contain(), and q.

bool Match::tcontain ( const Match m,
bool  sd = true 
) const [inline]

References Range::contain(), and t.

bool Match::similar ( const Match m,
bool  sd = true 
) const [inline]

References q, Range::similar(), and t.

bool Match::coveredBy ( const Match m,
bool  sd = true,
float  fraction = 0.8 
) const

References Range::length(), Range::overlap(), q, and t.

bool Match::plusContain ( const Match m  )  const [inline]

both the query and the target are in the plus direction

References Range::plusContain(), q, and t.

bool Match::qplustminusContain ( const Match m  )  const [inline]

int Match::queryDistance ( const Match m  )  [inline]

References Range::distance(), and q.

int Match::targetDistance ( const Match m  )  [inline]

References Range::distance(), and t.

pair<int,int> Match::combine ( const Match m  )  [inline]

merge query and target range separately, return the respective overlapping region for query and target in a pair<int, int>. This returned pair is directional sensitive. If the underlying Range is in oppositve direction, then the overlap is 0.

References Range::combine(), q, and t.

Referenced by M8Match::combine().

void Match::setNull (  )  [inline]

References q, and t.

Referenced by Linkmatch::removeChain().

void Match::setTargetRange ( int  b,
int  e 
) [inline]

References Range::set(), and t.

void Match::set ( int  qb,
int  qe,
int  tb,
int  te 
) [inline]

References q, Range::set(), and t.

Referenced by Linkmatch::removeChain().

ostream& Match::output ( ostream &  ous,
const char  delimiter[] = "\t" 
) const [inline]

for outpu to a tabular format

Reimplemented in M8Match.

References Range::output(), q, and t.

Referenced by operator<<(), and M8Match::output().

string Match::asDelimitedString ( const char  delimiter[] = ","  )  const [inline]

could be used for SQL statements

Reimplemented in M8Match.

References Range::asDelimitedString(), q, and t.

Referenced by M8Match::asDelimitedString().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ous,
const Match m 
) [friend]


Member Data Documentation

Range Match::q [protected]

Range Match::t [protected]


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

Generated on Wed Aug 10 11:57:12 2011 for Softwares from Orpara by  doxygen 1.5.6