54 m_sequences = sequenceList;
58 m_rowDoubles.resize(m_sequences.size(), 0.0);
59 m_rowStrings.resize(m_sequences.size());
77 BlockList::const_iterator
b, be =
m_blocks.end();
80 copy->UpdateBlockMap();
136 BlockList::const_iterator
b, be =
m_blocks.end();
144 ERROR_MESSAGE(
"CheckAlignedBlock() - checks aligned blocks only");
158 SequenceList::const_iterator sequence =
m_sequences.begin();
159 for (row=0; row<block->
NSequences(); ++row, ++sequence) {
162 if (nextBlock) nextRange = nextBlock->GetRangeOfRow(row);
164 (prevRange &&
range->from <= prevRange->
to) ||
165 (nextRange &&
range->to >= nextRange->from) ||
167 range->to >= (
int)(*sequence)->Length())
186 if ((leftBlock && !leftBlock->
IsAligned()) ||
187 (rightBlock && !rightBlock->
IsAligned())) {
188 ERROR_MESSAGE(
"CreateNewUnalignedBlockBetween() - passed an unaligned block");
192 unsigned int row, from, to, length;
193 SequenceList::const_iterator s, se =
m_sequences.end();
198 for (row=0, s=
m_sequences.begin(); s!=se; ++row, ++s) {
208 to = (*s)->Length() - 1;
212 length = to - from + 1;
213 if ((((
int)to) - ((
int)from) + 1) < 0) {
214 ERROR_MESSAGE(
"CreateNewUnalignedBlockBetween() - unaligned length < 0");
217 if (length > newBlock->
m_width)
230 BlockList::iterator
a, ae =
m_blocks.end();
232 Block *newUnalignedBlock;
238 if (newUnalignedBlock)
240 prevAlignedBlock = alignedBlock;
245 if (newUnalignedBlock) {
254 unsigned int i = 0, j,
n = 0;
255 BlockList::iterator
b, be =
m_blocks.end();
269 for (j=0; j<(*b)->m_width; ++j, ++
i) {
285 char *character)
const
288 unsigned int seqIndex;
296 *character =
toupper((
unsigned char)(*character));
298 *character =
tolower((
unsigned char)(*character));
305 const Sequence **sequence,
unsigned int *index,
bool *isAligned)
const
317 requestedJustification =
eLeft;
319 requestedJustification =
eRight;
340 ERROR_MESSAGE(
"BlockMultipleAlignment::GetBlock() - coordinate out of range");
349 if ((
int)seqIndex >=
range->from && (
int)seqIndex <= range->to)
361 range = (*m_cacheBlockIterator)->GetRangeOfRow(row);
362 if ((
int)seqIndex >=
range->from && (
int)seqIndex <= range->to) {
372 BlockList::const_iterator
b =
m_blocks.begin();
373 if (
m_blocks.size() > 0 && (*b)->IsAligned())
375 else if (
m_blocks.size() >= 2 && (*(++
b))->IsAligned())
391 return (slaveRange->from + masterSeqIndex - masterRange->
from);
395 unsigned int *blockColumn,
unsigned int *blockWidth)
const
399 if (
info.block->IsAligned()) {
400 *blockColumn =
info.blockColumn;
401 *blockWidth =
info.block->m_width;
408 BlockList::iterator
b, be =
m_blocks.end();
410 if (*
b == block)
break;
411 prevBlock =
b->GetPointer();
419 BlockList::const_iterator
b, be =
m_blocks.end();
421 if (*
b == block)
break;
422 prevBlock =
b->GetPointer();
429 BlockList::iterator
b, be =
m_blocks.end();
442 BlockList::const_iterator
b, be =
m_blocks.end();
456 const Block *prevBlock;
460 prevBlock =
m_blocks.back().GetPointer();
466 BlockList::iterator
b, be =
m_blocks.end();
468 if (*
b == insertAt) {
473 WARNING_MESSAGE(
"BlockMultipleAlignment::InsertBlockBefore() - couldn't find insertAt block");
478 BlockList::iterator
b, be =
m_blocks.end();
480 if (*
b == insertAt) {
486 WARNING_MESSAGE(
"BlockMultipleAlignment::InsertBlockBefore() - couldn't find insertAt block");
491 BlockList::iterator
b, be =
m_blocks.end();
499 WARNING_MESSAGE(
"BlockMultipleAlignment::RemoveBlock() - couldn't find block");
504 unsigned int blockColumn, blockWidth;
508 TRACE_MESSAGE(
"trying to move block boundary from " << columnFrom <<
" to " << columnTo);
512 int requestedShift = columnTo - columnFrom, actualShift = 0;
516 if (blockColumn == 0 && requestedShift > 0 && requestedShift < (
int)
info.block->m_width) {
517 actualShift = requestedShift;
519 for (row=0; row<
NRows(); ++row) {
521 info.block->SetRangeOfRow(row,
range->from + requestedShift,
range->to);
523 info.block->m_width -= requestedShift;
525 if (prevBlock && !prevBlock->
IsAligned()) {
526 for (row=0; row<
NRows(); ++row) {
530 prevBlock->
m_width += requestedShift;
533 if (newUnalignedBlock)
540 else if (blockColumn ==
info.block->m_width - 1 &&
541 requestedShift < 0 && ((
unsigned int) -requestedShift) <
info.block->m_width) {
542 actualShift = requestedShift;
544 for (row=0; row<
NRows(); ++row) {
546 info.block->SetRangeOfRow(row,
range->from,
range->to + requestedShift);
548 info.block->m_width += requestedShift;
550 if (nextBlock && !nextBlock->
IsAligned()) {
551 for (row=0; row<
NRows(); ++row) {
555 nextBlock->
m_width -= requestedShift;
558 if (newUnalignedBlock)
565 else if (blockColumn ==
info.block->m_width - 1 && requestedShift > 0) {
567 if (nextBlock && !nextBlock->
IsAligned()) {
569 actualShift = requestedShift;
570 for (row=0; row<
NRows(); ++row) {
573 if (nRes < actualShift)
578 for (row=0; row<
NRows(); ++row) {
580 info.block->SetRangeOfRow(row,
range->from,
range->to + actualShift);
584 info.block->m_width += actualShift;
585 nextBlock->
m_width -= actualShift;
595 else if (blockColumn == 0 && requestedShift < 0) {
597 if (prevBlock && !prevBlock->
IsAligned()) {
599 actualShift = requestedShift;
600 for (row=0; row<
NRows(); ++row) {
603 if (nRes < -actualShift) actualShift = -nRes;
607 for (row=0; row<
NRows(); ++row) {
609 info.block->SetRangeOfRow(row,
range->from + actualShift,
range->to);
613 info.block->m_width -= actualShift;
614 prevBlock->
m_width += actualShift;
623 if (actualShift != 0) {
633 if (fromAlignmentIndex == toAlignmentIndex)
637 *blockFrom =
m_blockMap[fromAlignmentIndex].block,
638 *blockTo =
m_blockMap[toAlignmentIndex].block;
644 if (blockTo != blockFrom && blockTo->
IsAligned())
656 if (blockFrom != blockTo &&
657 ((ABlock == blockFrom && prevUABlock != blockTo && nextUABlock != blockTo) ||
658 (ABlock == blockTo && prevUABlock != blockFrom && nextUABlock != blockFrom)))
661 int requestedShift, actualShift = 0, width = 0;
665 unsigned int fromSeqIndex, toSeqIndex;
670 requestedShift = toSeqIndex - fromSeqIndex;
675 requestedShift = toAlignmentIndex - fromAlignmentIndex;
679 if (prevUABlock) prevRange = prevUABlock->
GetRangeOfRow(row);
680 if (nextUABlock) nextRange = nextUABlock->GetRangeOfRow(row);
681 if (requestedShift > 0) {
683 width = prevRange->
to - prevRange->
from + 1;
684 actualShift = (width > requestedShift) ? requestedShift : width;
687 width = nextRange->to - nextRange->from + 1;
688 actualShift = (width > -requestedShift) ? requestedShift : -width;
690 if (actualShift == 0)
return false;
692 TRACE_MESSAGE(
"shifting row " << row <<
" by " << actualShift);
699 for (
unsigned int i=0;
i<
NRows(); ++
i) {
701 width = prevRange->
to - prevRange->
from + 1;
703 ERROR_MESSAGE(
"BlockMultipleAlignment::ShiftRow() - negative width on left");
704 if ((
unsigned int) width > prevUABlock->
m_width)
707 if (prevUABlock->
m_width == 0) {
708 TRACE_MESSAGE(
"removing zero-m_width unaligned block on left");
718 nextUABlock->SetRangeOfRow(row, nextRange->from - actualShift, nextRange->to);
719 nextUABlock->m_width = 0;
720 for (
unsigned int i=0;
i<
NRows(); ++
i) {
721 nextRange = nextUABlock->GetRangeOfRow(
i);
722 width = nextRange->to - nextRange->from + 1;
724 ERROR_MESSAGE(
"BlockMultipleAlignment::ShiftRow() - negative width on right");
725 if ((
unsigned int) width > nextUABlock->m_width)
726 nextUABlock->m_width = width;
728 if (nextUABlock->m_width == 0) {
729 TRACE_MESSAGE(
"removing zero-m_width unaligned block on right");
739 ERROR_MESSAGE(
"BlockMultipleAlignment::ShiftRow() - shift failed to create valid aligned block");
748 if (!
info.block->IsAligned() ||
info.block->m_width < 2 ||
info.blockColumn == 0)
754 info.block->m_width =
info.blockColumn;
758 for (
unsigned int row=0; row<
NRows(); ++row) {
767 ERROR_MESSAGE(
"BlockMultipleAlignment::SplitBlock() - split failed to create valid m_blocks");
776 *expandedBlock =
m_blockMap[fromAlignmentIndex].block,
777 *lastBlock =
m_blockMap[toAlignmentIndex].block;
778 if (expandedBlock == lastBlock)
781 for (
i=fromAlignmentIndex;
i<=toAlignmentIndex; ++
i)
790 Block *deletedBlock =
NULL, *blockToDelete;
791 for (
i=fromAlignmentIndex;
i<=toAlignmentIndex; ++
i) {
793 if (blockToDelete == expandedBlock)
795 if (blockToDelete != deletedBlock) {
796 deletedBlock = blockToDelete;
802 ERROR_MESSAGE(
"BlockMultipleAlignment::MergeBlocks() - merge failed to create valid block");
813 if (!prevUABlock ||
info.block !=
m_blockMap[toAlignmentIndex].block)
815 unsigned int row, seqIndexFrom, seqIndexTo,
816 newBlockWidth = toAlignmentIndex - fromAlignmentIndex + 1,
817 origWidth = prevUABlock->
m_width;
818 vector < unsigned int > seqIndexesFrom(
NRows()), seqIndexesTo(
NRows());
821 for (row=0; row<
NRows(); ++row) {
825 seqIndexTo - seqIndexFrom + 1 != newBlockWidth)
827 seqIndexesFrom[row] = seqIndexFrom;
828 seqIndexesTo[row] = seqIndexTo;
837 bool deletePrevUABlock =
true, deleteNextUABlock =
true;
840 for (row=0; row<
NRows(); ++row) {
844 rangeWidth = prevRange->
to - seqIndexesTo[row];
846 ERROR_MESSAGE(
"BlockMultipleAlignment::CreateBlock() - negative nextRange width");
847 else if (rangeWidth > 0) {
848 if ((
unsigned int) rangeWidth > nextUABlock->
m_width)
849 nextUABlock->
m_width = rangeWidth;
850 deleteNextUABlock =
false;
854 rangeWidth = seqIndexesFrom[row] - prevRange->
from;
856 ERROR_MESSAGE(
"BlockMultipleAlignment::CreateBlock() - negative prevRange width");
857 else if (rangeWidth > 0) {
858 if ((
unsigned int) rangeWidth > prevUABlock->
m_width)
859 prevUABlock->
m_width = rangeWidth;
860 deletePrevUABlock =
false;
863 ABlock->
SetRangeOfRow(row, seqIndexesFrom[row], seqIndexesTo[row]);
866 ABlock->
m_width = newBlockWidth;
868 ERROR_MESSAGE(
"BlockMultipleAlignment::CreateBlock() - bad block m_widths sum");
872 if (deletePrevUABlock) {
873 TRACE_MESSAGE(
"deleting zero-width unaligned block on left");
876 if (deleteNextUABlock) {
877 TRACE_MESSAGE(
"deleting zero-width unaligned block on right");
882 ERROR_MESSAGE(
"BlockMultipleAlignment::CreateBlock() - failed to create valid block");
900 if (prevBlock && !prevBlock->
IsAligned() && nextBlock && !nextBlock->IsAligned()) {
902 unsigned int maxWidth = 0, width;
903 for (
unsigned int row=0; row<
NRows(); ++row) {
905 nextRange = nextBlock->GetRangeOfRow(row);
906 width = nextRange->
to - prevRange->
from + 1;
908 if (width > maxWidth)
917 else if (prevBlock && !prevBlock->
IsAligned()) {
919 for (
unsigned int row=0; row<
NRows(); ++row) {
928 else if (nextBlock && !nextBlock->IsAligned()) {
930 for (
unsigned int row=0; row<
NRows(); ++row) {
932 nextRange = nextBlock->GetRangeOfRow(row);
933 nextBlock->SetRangeOfRow(row,
range->from, nextRange->
to);
935 nextBlock->m_width += block->
m_width;
969 if (row >=
NRows()) {
970 ERROR_MESSAGE(
"BlockMultipleAlignment::DeleteRow() - row out of range");
975 vector < bool > removeRows(
NRows(),
false);
976 removeRows[row] =
true;
984 (*b)->DeleteRow(row);
985 if ((*b)->m_width == 0) {
1005 BlockList::const_iterator
b, be =
m_blocks.end();
1009 uabs->push_back(uab);
1011 uabs->resize(uabs->size());
1018 BlockList::iterator
b, be =
m_blocks.end();
1022 uabs->push_back(uab);
1024 uabs->resize(uabs->size());
1028 const vector < unsigned int >& slavesToRemove,
AlignmentList *pairwiseAlignments)
1030 if (slavesToRemove.size() == 0)
return false;
1034 vector < bool > removeRows(
NRows(),
false);
1035 for (
i=0;
i<slavesToRemove.size(); ++
i) {
1036 if (slavesToRemove[
i] > 0 && slavesToRemove[
i] <
NRows()) {
1037 removeRows[slavesToRemove[
i]] =
true;
1039 ERROR_MESSAGE(
"BlockMultipleAlignment::ExtractRows() - can't extract row "
1040 << slavesToRemove[
i]);
1045 if (pairwiseAlignments) {
1051 UngappedAlignedBlockList::const_iterator u, ue = uaBlocks.end();
1053 for (
i=0;
i<slavesToRemove.size(); ++
i) {
1060 for (u=uaBlocks.begin(); u!=ue; ++u) {
1064 range = (*u)->GetRangeOfRow(slavesToRemove[
i]);
1071 ERROR_MESSAGE(
"BlockMultipleAlignment::ExtractRows() - error creating new alignment");
1075 pairwiseAlignments->push_back(newAlignment);
1090 (*b)->DeleteRows(removeRows, slavesToRemove.size());
1091 if ((*b)->m_width == 0) {
1116 BlockList::const_iterator nb, nbe = newAlignment->
m_blocks.end();
1117 BlockList::iterator
b, be =
m_blocks.end();
1119 AlignedBlockMap correspondingNewBlocks;
1122 if (!(*b)->IsAligned())
1124 for (nb=newAlignment->
m_blocks.begin(); nb!=nbe; ++nb) {
1125 if (!(*nb)->IsAligned())
1128 newRange = (*nb)->GetRangeOfRow(0);
1129 thisRange = (*b)->GetRangeOfRow(0);
1130 if (newRange->
from <= thisRange->
from && newRange->
to >= thisRange->
to) {
1136 if (nb == nbe)
return false;
1140 unsigned int i, nNewRows = newAlignment->
m_sequences.size() - 1;
1144 for (
i=0;
i<nNewRows; ++
i) {
1157 (*b)->AddRows(nNewRows);
1160 AlignedBlockMap::const_iterator ab, abe = correspondingNewBlocks.end();
1162 for (ab=correspondingNewBlocks.begin(); ab!=abe; ++ab) {
1163 thisMaster = ab->first->GetRangeOfRow(0);
1164 newMaster = ab->second->GetRangeOfRow(0);
1165 for (
i=0;
i<nNewRows; ++
i) {
1166 newRange = ab->second->GetRangeOfRow(
i + 1);
1167 ab->first->SetRangeOfRow(
NRows() +
i - nNewRows,
1169 newRange->
to + thisMaster->
to - newMaster->
to);
1176 if (!(*b)->IsAligned()) {
1177 BlockList::iterator
bb(
b);
1188 ERROR_MESSAGE(
"BlockMultipleAlignment::MergeAlignment() - internal update after merge failed");
1194 template <
class T >
1198 if (newOrder.size() != v.size()) {
1202 vector < bool > isPresent(v.size(),
false);
1204 for (
r=0;
r<v.size();
r++) {
1205 if (isPresent[newOrder[
r]]) {
1206 ERROR_MESSAGE(
"ReorderVector() - invalid newOrder: repeated/missing row");
1209 isPresent[newOrder[
r]] =
true;
1213 T reordered(v.size());
1214 for (
r=0;
r<v.size();
r++)
1215 reordered[
r] = v[newOrder[
r]];
1224 if (newOrder[0] != 0) {
1233 ERROR_MESSAGE(
"reordering of sequences and status info failed");
1236 BlockList::iterator
b, be =
m_blocks.end();
1238 okay = (okay && (*b)->ReorderRows(newOrder));
1247 if (!multiple || slaveRow >= multiple->
NRows()) {
1248 ERROR_MESSAGE(
"CreatePairwiseSeqAlignFromMultipleRow() - bad parameters");
1257 denDiags.resize((m_blocks.size() > 0) ? m_blocks.size() : 1);
1259 CSeq_align::C_Segs::TDendiag::iterator d, de = denDiags.end();
1260 BlockMultipleAlignment::UngappedAlignedBlockList::const_iterator
b = m_blocks.begin();
1262 for (d=denDiags.begin(); d!=de; ++d, ++
b) {
1267 denDiag->
SetIds().resize(2);
1272 denDiag->
SetIds().front() = id;
1273 if (m_blocks.size() > 0) {
1274 range = (*b)->GetRangeOfRow(0);
1282 denDiag->
SetIds().back() = id;
1283 if (m_blocks.size() > 0) {
1284 range = (*b)->GetRangeOfRow(slaveRow);
1290 denDiag->
SetLen((m_blocks.size() > 0) ? (*b)->m_width : 0);
1299 BlockList::const_iterator
b, be =
m_blocks.end();
1301 if ((*b)->IsAligned())
1309 ERROR_MESSAGE(
"BlockMultipleAlignment::GetAlignmentIndex() - coordinate out of range");
1313 unsigned int alignmentIndex, blockColumn;
1317 for (alignmentIndex=0; alignmentIndex<
m_totalWidth; ++alignmentIndex) {
1320 if (block !=
m_blockMap[alignmentIndex].block) {
1323 range = block->GetRangeOfRow(row);
1324 if ((
int)seqIndex >=
range->from && (
int)seqIndex <= range->to) {
1328 justification =
eLeft;
1329 else if (block ==
m_blocks.front())
1334 for (blockColumn=0; blockColumn<block->m_width; ++blockColumn) {
1335 if (seqIndex == block->GetIndexAt(blockColumn, row, justification))
1336 return alignmentIndex + blockColumn;
1338 ERROR_MESSAGE(
"BlockMultipleAlignment::GetAlignmentIndex() - can't find index in block");
1345 ERROR_MESSAGE(
"BlockMultipleAlignment::GetAlignmentIndex() - confused");
1367 for (
unsigned int row=0; row<
NSequences(); ++row) {
1377 RangeList::iterator
r =
m_ranges.begin();
1378 for (
unsigned int i=0;
i<row; ++
i)
1397 switch (justification) {
1399 seqIndex =
range->from + blockColumn;
1406 extraSpace = (
m_width - rangeWidth) / 2;
1407 if (blockColumn < extraSpace || blockColumn >= extraSpace + rangeWidth)
1410 seqIndex =
range->from + blockColumn - extraSpace;
1414 rangeMiddle = (rangeWidth / 2) + (rangeWidth % 2);
1415 extraSpace =
m_width - rangeWidth;
1416 if (blockColumn < rangeMiddle)
1417 seqIndex =
range->from + blockColumn;
1418 else if (blockColumn >= extraSpace + rangeMiddle)
1424 if ((
int)seqIndex <
range->from || (
int)seqIndex >
range->to)
1442 RangeList::iterator
r =
m_ranges.begin();
1443 for (
unsigned int i=0;
i<row; ++
i)
1459 for (
unsigned int row=0; row<
NSequences(); ++row) {
User-defined methods of the data storage class.
#define WARNING_MESSAGE(s)
bool CreateBlock(unsigned int fromAlignmentIndex, unsigned int toAlignmentIndex, eUnalignedJustification justification)
unsigned int GetAlignedSlaveIndex(unsigned int masterSeqIndex, unsigned int slaveRow) const
bool GetCharacterAt(unsigned int alignmentColumn, unsigned int row, eUnalignedJustification justification, char *character) const
BlockMultipleAlignment * Clone(void) const
std::list< BlockMultipleAlignment * > AlignmentList
unsigned int NAlignedBlocks(void) const
std::vector< const Sequence * > SequenceList
unsigned int m_totalWidth
const UnalignedBlock * GetUnalignedBlockBefore(const UngappedAlignedBlock *aBlock) const
unsigned int m_cachePrevRow
bool MoveBlockBoundary(unsigned int columnFrom, unsigned int columnTo)
bool DeleteRow(unsigned int row)
std::vector< double > m_rowDoubles
BlockList::const_iterator m_cacheBlockIterator
bool CheckAlignedBlock(const Block *newBlock) const
void InsertBlockAfter(const Block *insertAt, Block *newBlock)
bool ShiftRow(unsigned int row, unsigned int fromAlignmentIndex, unsigned int toAlignmentIndex, eUnalignedJustification justification)
void SetRowDouble(unsigned int row, double value) const
const Block * GetBlock(unsigned int row, unsigned int seqIndex) const
void GetModifiableUngappedAlignedBlocks(ModifiableUngappedAlignedBlockList *blocks)
const BLAST_Matrix * GetPSSM(void) const
void SetRowStatusLine(unsigned int row, const std::string &value) const
~BlockMultipleAlignment(void)
const Sequence * GetMaster(void) const
unsigned int GetFirstAlignedBlockPosition(void) const
bool ReorderRows(const std::vector< unsigned int > &newOrder)
std::vector< const UngappedAlignedBlock * > UngappedAlignedBlockList
void RemovePSSM(void) const
bool ExtractRows(const std::vector< unsigned int > &slavesToRemove, AlignmentList *pairwiseAlignments)
const Sequence * GetSequenceOfRow(unsigned int row) const
void GetUngappedAlignedBlocks(UngappedAlignedBlockList *blocks) const
Block * GetBlockAfter(const Block *block)
unsigned int GetAlignmentIndex(unsigned int row, unsigned int seqIndex, eUnalignedJustification justification)
bool GetSequenceAndIndexAt(unsigned int alignmentColumn, unsigned int row, eUnalignedJustification justification, const Sequence **sequence, unsigned int *index, bool *isAligned) const
unsigned int NRows(void) const
void RemoveBlock(Block *block)
UnalignedBlock * CreateNewUnalignedBlockBetween(const Block *left, const Block *right)
Block * GetBlockBefore(const Block *block)
BlockMultipleAlignment(const SequenceList &sequenceList)
void ClearRowInfo(void) const
const std::string & GetRowStatusLine(unsigned int row) const
void GetBlockList(ConstBlockList &cbl) const
double GetRowDouble(unsigned int row) const
void InsertBlockBefore(Block *newBlock, const Block *insertAt)
void GetAlignedBlockPosition(unsigned int alignmentIndex, unsigned int *blockColumn, unsigned int *blockWidth) const
bool DeleteBlock(unsigned int alignmentIndex)
bool MergeBlocks(unsigned int fromAlignmentIndex, unsigned int toAlignmentIndex)
bool IsAligned(unsigned int row, unsigned int seqIndex) const
bool AddUnalignedBlocks(void)
bool SplitBlock(unsigned int alignmentIndex)
bool DeleteAllBlocks(void)
std::vector< std::string > m_rowStrings
bool AddAlignedBlockAtEnd(UngappedAlignedBlock *newBlock)
std::vector< UngappedAlignedBlock * > ModifiableUngappedAlignedBlockList
std::vector< ncbi::CConstRef< Block > > ConstBlockList
const Block * m_cachePrevBlock
bool UpdateBlockMap(bool clearRowInfo=true)
bool MergeAlignment(const BlockMultipleAlignment *newAlignment)
virtual unsigned int GetIndexAt(unsigned int blockColumn, unsigned int row, BlockMultipleAlignment::eUnalignedJustification justification) const =0
const BlockMultipleAlignment * m_parentAlignment
void SetRangeOfRow(unsigned int row, int from, int to)
const Range * GetRangeOfRow(int row) const
unsigned int NSequences(void) const
bool ReorderRows(const std::vector< unsigned int > &newOrder)
virtual bool IsAligned(void) const =0
std::string m_sequenceString
const ncbi::objects::CSeq_id & GetPreferredIdentifier(void) const
Block * Clone(const BlockMultipleAlignment *newMultiple) const
void DeleteRows(std::vector< bool > &removeRows, unsigned int nToRemove)
UnalignedBlock(const BlockMultipleAlignment *multiple)
void DeleteRow(unsigned int row)
unsigned int GetIndexAt(unsigned int blockColumn, unsigned int row, BlockMultipleAlignment::eUnalignedJustification justification) const
void DeleteRow(unsigned int row)
char GetCharacterAt(unsigned int blockColumn, unsigned int row) const
void DeleteRows(std::vector< bool > &removeRows, unsigned int nToRemove)
Block * Clone(const BlockMultipleAlignment *newMultiple) const
UngappedAlignedBlock(const BlockMultipleAlignment *multiple)
unsigned int GetIndexAt(unsigned int blockColumn, unsigned int row, BlockMultipleAlignment::eUnalignedJustification justification=BlockMultipleAlignment::eCenter) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
EDiagSev
Severity level for the posted diagnostics.
@ eDiag_Warning
Warning message.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
void SetDim(TDim value)
Assign a value to Dim data member.
void SetDim(TDim value)
Assign a value to Dim data member.
void SetType(TType value)
Assign a value to Type data member.
TStarts & SetStarts(void)
Assign a value to Starts data member.
void SetLen(TLen value)
Assign a value to Len data member.
list< CRef< CDense_diag > > TDendiag
TIds & SetIds(void)
Assign a value to Ids data member.
@ eType_partial
mapping pieces together
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
range(_Ty, _Ty) -> range< _Ty >
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
bool ReorderVector(T &v, const std::vector< unsigned int > &newOrder)
CSeq_align * CreatePairwiseSeqAlignFromMultipleRow(const BlockMultipleAlignment *multiple, const BlockMultipleAlignment::UngappedAlignedBlockList &m_blocks, unsigned int slaveRow)
void VectorRemoveElements(std::vector< T > &v, const std::vector< bool > &remove, unsigned int nToRemove)
BLAST_Matrix * CreateBlastMatrix(const BlockMultipleAlignment *bma)