NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
BlockModel Class Reference

Search Toolkit Book for BlockModel

#include <algo/structure/cd_utils/cuBlock.hpp>

+ Collaboration diagram for BlockModel:

Public Member Functions

 BlockModel ()
 BlockModel (const CRef< CSeq_align > seqAlign, bool forSlave=true)
 BlockModel (CRef< CSeq_id > sedId, bool withOneBlock=true)
 BlockModel (const BlockModel &rhs)
void addBlock (Block &block)
bool isAlike (const BlockModel &rhs) const
bool operator== (const BlockModel &rhs) const
bool contain (const BlockModel &rhs) const
pair< DeltaBlockModel *, booloperator- (const BlockModel &bm) const
pair< DeltaBlockModel *, boolintersect (const BlockModel &bm) const
pair< BlockModel *, booloperator+ (const DeltaBlockModel &delta) const
BlockModeloperator= (const BlockModel &rhs)
BlockModelcompleteCastTo (const BlockModel &target) const
void findIntersectingBlocks (const Block &target, vector< int > &result) const
vector< Block > & getBlocks ()
BlockgetBlock (int bn)
int getBlockNumber (int pos) const
const vector< Block > & getBlocks () const
CRef< CSeq_idgetSeqId () const
void setSeqId (CRef< CSeq_id > seqId)
CRef< CSeq_aligntoSeqAlign (const BlockModel &master) const
bool blockMatch (const BlockModel &bm) const
bool completeModelExtendsIntoUnallowedGappedRegion (const BlockModel &completeModel, int sequenceLength, const vector< int > *commonBlockExt=NULL) const
int getLastAlignedPosition () const
int getFirstAlignedPosition () const
int getTotalBlockLength () const
int getGapToNTerminal (int bn) const
int getGapToCTerminal (int bn, int len=-1) const
bool isValid (int seqLen, int &errBlock) const
bool overlap (const BlockModel &bm) const
void addOffset (int nExt)
bool mask (const BlockModel &maskBlockModel)
bool mask (const vector< Block > &maskBlocks)
void clipToRange (unsigned int min, unsigned max)
string toString () const

Static Public Member Functions

static string toString (const BlockModel &bm)

Private Member Functions

bool intersectOneBlock (const Block &aBlock, DeltaBlockModel &delta) const
bool minusOneBlock (const Block &aBlock, DeltaBlockModel &delta) const

Private Attributes

vector< Blockm_blocks
CRef< CSeq_idm_seqId

Detailed Description

Definition at line 67 of file cuBlock.hpp.

Constructor & Destructor Documentation

◆ BlockModel() [1/4]

BlockModel::BlockModel ( )

Definition at line 191 of file cuBlock.cpp.

Referenced by operator+().

◆ BlockModel() [2/4]

BlockModel::BlockModel ( const CRef< CSeq_align seqAlign,
bool  forSlave = true 

Definition at line 196 of file cuBlock.cpp.

References assert, GetBlockLengths(), GetBlockStarts(), GetSeqID(), i, m_blocks, and m_seqId.

◆ BlockModel() [3/4]

BlockModel::BlockModel ( CRef< CSeq_id sedId,
bool  withOneBlock = true 

Definition at line 210 of file cuBlock.cpp.

References m_blocks.

◆ BlockModel() [4/4]

BlockModel::BlockModel ( const BlockModel rhs)

Definition at line 220 of file cuBlock.cpp.

Member Function Documentation

◆ addBlock()

void BlockModel::addBlock ( Block block)

Definition at line 225 of file cuBlock.cpp.

References m_blocks, and Block::setId().

Referenced by IntersectByMaster().

◆ addOffset()

void BlockModel::addOffset ( int  nExt)

Definition at line 649 of file cuBlock.cpp.

References i, and m_blocks.

◆ blockMatch()

bool BlockModel::blockMatch ( const BlockModel bm) const

◆ clipToRange()

void BlockModel::clipToRange ( unsigned int  min,
unsigned  max 

Definition at line 808 of file cuBlock.cpp.

References getBlocks(), mask(), max(), and min().

◆ completeCastTo()

BlockModel * BlockModel::completeCastTo ( const BlockModel target) const

Definition at line 469 of file cuBlock.cpp.

References contain().

Referenced by MultipleAlignment::locateChildRow().

◆ completeModelExtendsIntoUnallowedGappedRegion()

bool BlockModel::completeModelExtendsIntoUnallowedGappedRegion ( const BlockModel completeModel,
int  sequenceLength,
const vector< int > *  commonBlockExt = NULL 
) const

◆ contain()

bool BlockModel::contain ( const BlockModel rhs) const

Definition at line 398 of file cuBlock.cpp.

References i, isAlike(), and m_blocks.

Referenced by completeCastTo(), and MultipleAlignment::findParentalEquivalent().

◆ findIntersectingBlocks()

void BlockModel::findIntersectingBlocks ( const Block target,
vector< int > &  result 
) const

Definition at line 524 of file cuBlock.cpp.

References i, Block::isIntersecting(), m_blocks, and result.

Referenced by intersectOneBlock(), and minusOneBlock().

◆ getBlock()

Block& BlockModel::getBlock ( int  bn)

◆ getBlockNumber()

int BlockModel::getBlockNumber ( int  pos) const

◆ getBlocks() [1/2]

vector<Block>& BlockModel::getBlocks ( )

◆ getBlocks() [2/2]

const vector<Block>& BlockModel::getBlocks ( ) const

Definition at line 101 of file cuBlock.hpp.

References m_blocks.

◆ getFirstAlignedPosition()

int BlockModel::getFirstAlignedPosition ( ) const

Definition at line 602 of file cuBlock.cpp.

References Block::getStart(), and m_blocks.

Referenced by overlap().

◆ getGapToCTerminal()

int BlockModel::getGapToCTerminal ( int  bn,
int  len = -1 
) const

◆ getGapToNTerminal()

int BlockModel::getGapToNTerminal ( int  bn) const

Definition at line 618 of file cuBlock.cpp.

References delta(), and m_blocks.

Referenced by BlockModelPair::extendMidway(), and CDUpdater::isFragmentedSeq().

◆ getLastAlignedPosition()

int BlockModel::getLastAlignedPosition ( ) const

Definition at line 596 of file cuBlock.cpp.

References Block::getEnd(), and m_blocks.

Referenced by isValid(), overlap(), and PssmScorer::score().

◆ getSeqId()

CRef< CSeq_id > BlockModel::getSeqId ( ) const

◆ getTotalBlockLength()

int BlockModel::getTotalBlockLength ( ) const

◆ intersect()

pair< DeltaBlockModel *, bool > BlockModel::intersect ( const BlockModel bm) const

Definition at line 431 of file cuBlock.cpp.

References delta(), i, intersectOneBlock(), and m_blocks.

Referenced by intersectOneBlock(), and BlockModelPair::remaster().

◆ intersectOneBlock()

bool BlockModel::intersectOneBlock ( const Block aBlock,
DeltaBlockModel delta 
) const

Definition at line 508 of file cuBlock.cpp.

References delta(), findIntersectingBlocks(), intersect(), and m_blocks.

Referenced by intersect().

◆ isAlike()

bool BlockModel::isAlike ( const BlockModel rhs) const

Definition at line 238 of file cuBlock.cpp.

References m_blocks, m_seqId, and SeqIdsMatch().

Referenced by contain(), and operator==().

◆ isValid()

bool BlockModel::isValid ( int  seqLen,
int errBlock 
) const

Definition at line 657 of file cuBlock.cpp.

References getLastAlignedPosition(), i, int, and m_blocks.

Referenced by toSeqAlign().

◆ mask() [1/2]

bool BlockModel::mask ( const BlockModel maskBlockModel)

Definition at line 717 of file cuBlock.cpp.

References getBlocks(), getSeqId(), result, and SeqIdsMatch().

Referenced by clipToRange(), and BlockModelPair::mask().

◆ mask() [2/2]

bool BlockModel::mask ( const vector< Block > &  maskBlocks)

◆ minusOneBlock()

bool BlockModel::minusOneBlock ( const Block aBlock,
DeltaBlockModel delta 
) const

Definition at line 493 of file cuBlock.cpp.

References delta(), findIntersectingBlocks(), and m_blocks.

Referenced by operator-().

◆ operator+()

pair< BlockModel *, bool > BlockModel::operator+ ( const DeltaBlockModel delta) const

Definition at line 444 of file cuBlock.cpp.

References BlockModel(), delta(), Block::getLen(), Block::getStart(), m_blocks, m_seqId, and result.

◆ operator-()

pair< DeltaBlockModel *, bool > BlockModel::operator- ( const BlockModel bm) const

◆ operator=()

BlockModel & BlockModel::operator= ( const BlockModel rhs)

Definition at line 231 of file cuBlock.cpp.

References m_blocks, and m_seqId.

◆ operator==()

bool BlockModel::operator== ( const BlockModel rhs) const

Definition at line 247 of file cuBlock.cpp.

References i, isAlike(), and m_blocks.

◆ overlap()

bool BlockModel::overlap ( const BlockModel bm) const

◆ setSeqId()

void BlockModel::setSeqId ( CRef< CSeq_id seqId)

Definition at line 103 of file cuBlock.hpp.

References m_seqId.

Referenced by ConsensusMaker::makeConsensus().

◆ toSeqAlign()

CRef< CSeq_align > BlockModel::toSeqAlign ( const BlockModel master) const

◆ toString() [1/2]

string BlockModel::toString ( ) const

◆ toString() [2/2]

string BlockModel::toString ( const BlockModel bm)

Definition at line 865 of file cuBlock.cpp.

Member Data Documentation

◆ m_blocks

vector<Block> BlockModel::m_blocks

◆ m_seqId

CRef< CSeq_id > BlockModel::m_seqId

Definition at line 138 of file cuBlock.hpp.

Referenced by BlockModel(), getSeqId(), isAlike(), operator+(), operator=(), overlap(), setSeqId(), and toString().

The documentation for this class was generated from the following files:
Modified on Tue Apr 23 07:39:36 2024 by rev. 669887