#include <Match.h>

Public Member Functions | |
| Match () | |
| Match (const Match &m) | |
| Match (int qb, int qe, int tb, int te) | |
| ~Match () | |
| Match & | operator= (const Match &m) |
| bool | operator< (const Match &m) const |
| bool | operator== (const Match &m) const |
| const Range & | queryRange () const |
| const Range & | targetRange () 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) |
This class will not store the query and target ids. A derived class will store this information.
| Match::Match | ( | ) | [inline] |
Build an empty Match
| Match::Match | ( | const Match & | m | ) | [inline] |
| Match::Match | ( | int | qb, | |
| int | qe, | |||
| int | tb, | |||
| int | te | |||
| ) | [inline] |
| Match::~Match | ( | ) | [inline] |
| 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.
| const Range& Match::queryRange | ( | ) | const [inline] |
returs a reference to a const range object
References q.
Referenced by M8MatchChain::add(), Blmodel::getExpectedTargetRange(), Tblastn::isFirstQueryMatch(), Tblastn::isLastQueryMatch(), M8MatchChain::M8MatchChain(), MatchQueryLessThan::operator()(), afterMatchQuery::operator()(), beforeMatchQuery::operator()(), cmpTargetDirectionalPtr::operator()(), cmpTargetPtr::operator()(), cmpQueryPtr::operator()(), operator<<(), Tblastn::overlapFirstQueryMatch(), Tblastn::overlapLastQueryMatch(), and Boxchain::queryOverlap().
| const Range& Match::targetRange | ( | ) | const [inline] |
References t.
Referenced by M8MatchChain::add(), Blmodel::getExpectedTargetRange(), main(), nextGoodModel(), cmpTargetDirectionalPtr::operator()(), cmpTargetPtr::operator()(), cmpQueryPtr::operator()(), and operator<<().
| int Match::targetBegin | ( | ) | const [inline] |
References Range::begin(), and t.
Referenced by Linkmatch::bestModel(), Blmodel::getExpectedTargetRange(), cmpMatchTbeginIntPtr::operator()(), cmpMatchTbeginInt::operator()(), Linkmatch::removeChain(), and Boxchain::targetBegin().
| int Match::targetEnd | ( | ) | const [inline] |
References Range::end(), and t.
Referenced by Linkmatch::bestModel(), Blmodel::getExpectedTargetRange(), cmpMatchTendIntPtr::operator()(), cmpMatchTendInt::operator()(), Linkmatch::removeChain(), and Boxchain::targetEnd().
| int Match::queryBegin | ( | ) | const [inline] |
| int Match::queryEnd | ( | ) | const [inline] |
References Range::end(), and q.
Referenced by Blmodel::getExpectedTargetRange(), Boxchain::queryCovered(), Boxchain::queryEnd(), Blmodel::queryHasStop(), and Linkmatch::removeChain().
| int Match::queryLength | ( | ) | const [inline] |
Reimplemented in Blmodel.
References Range::length(), and q.
Referenced by Boxchain::querySeqCovered().
| int Match::targetLength | ( | ) | const [inline] |
| char Match::targetDirection | ( | ) | const [inline] |
| 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] |
References Range::direction(), and t.
Referenced by Linkmatch::bestModel(), and Linkmatch::removeChain().
| 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.
| 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] |
References queryOverlapFraction().
| 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] |
References targetOverlapFraction().
| 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] |
References Range::minusContain(), Range::plusContain(), q, and t.
| 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] |
| 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] |
| 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().
| ostream& operator<< | ( | ostream & | ous, | |
| const Match & | m | |||
| ) | [friend] |
Referenced by asDelimitedString(), combine(), M8Match::combine(), contain(), coveredBy(), isNull(), onMinus(), onPlus(), operator<(), operator=(), operator==(), output(), overlap(), overlay(), overlayFraction(), plusContain(), qcontain(), qoverlap(), qplustminusContain(), queryBegin(), queryDistance(), queryEnd(), queryLength(), queryOverlapFraction(), queryOverlapFractionMerge(), queryRange(), set(), setNull(), and similar().
Referenced by asDelimitedString(), combine(), M8Match::combine(), contain(), coveredBy(), isNull(), onMinus(), onPlus(), operator<(), operator=(), operator==(), output(), overlap(), overlay(), overlayFraction(), plusContain(), qplustminusContain(), set(), setNull(), setTargetRange(), similar(), targetBegin(), targetDirection(), targetDistance(), targetEnd(), targetLength(), targetOnMinus(), targetOnPlus(), targetOverlapFraction(), targetOverlapFractionMerge(), targetRange(), tcontain(), and toverlap().
1.5.6