NCBI C++ ToolKit
|
Search Toolkit Book for AlignmentManager
#include "alignment_manager.hpp"
(Private to src/app/cn3d
.)
Public Types | |
typedef std::list< ncbi::CRef< ncbi::objects::CUpdate_align > > | UpdateAlignList |
typedef std::list< const MasterDependentAlignment * > | PairwiseAlignmentList |
typedef std::map< BlockMultipleAlignment *, bool > | UpdateMap |
Public Attributes | |
Threader * | threader |
BLASTer * | blaster |
BlockAligner * | blockAligner |
Private Member Functions | |
void | Init (void) |
void | NewAlignments (const SequenceSet *sSet, const AlignmentSet *aSet) |
Private Attributes | |
const SequenceSet * | sequenceSet |
const AlignmentSet * | alignmentSet |
std::vector< bool > | dependentsVisible |
SequenceViewer * | sequenceViewer |
UpdateViewer * | updateViewer |
BlockMultipleAlignment * | originalMultiple |
std::vector< unsigned int > | originalRowOrder |
Definition at line 67 of file alignment_manager.hpp.
typedef std::list< const MasterDependentAlignment * > AlignmentManager::PairwiseAlignmentList |
Definition at line 83 of file alignment_manager.hpp.
typedef std::list< ncbi::CRef< ncbi::objects::CUpdate_align > > AlignmentManager::UpdateAlignList |
Definition at line 71 of file alignment_manager.hpp.
typedef std::map< BlockMultipleAlignment *, bool > AlignmentManager::UpdateMap |
Definition at line 122 of file alignment_manager.hpp.
AlignmentManager::AlignmentManager | ( | const SequenceSet * | sSet, |
const AlignmentSet * | aSet | ||
) |
Definition at line 89 of file alignment_manager.cpp.
References Init(), and NewAlignments().
AlignmentManager::AlignmentManager | ( | const SequenceSet * | sSet, |
const AlignmentSet * | aSet, | ||
const UpdateAlignList & | updates | ||
) |
Definition at line 95 of file alignment_manager.cpp.
References UpdateViewer::AddAlignments(), CreateMultipleFromPairwiseWithIBM(), ERRORMSG, Init(), AlignmentSet::master, NewAlignments(), NULL, SequenceSet::sequences, UpdateViewer::SetInitialState(), BlockMultipleAlignment::updateOrigin, and updateViewer.
|
virtual |
Definition at line 152 of file alignment_manager.cpp.
References blaster, blockAligner, GlobalMessenger(), originalMultiple, Messenger::RemoveSequenceViewer(), sequenceViewer, threader, and updateViewer.
void AlignmentManager::BlockAlignAllUpdates | ( | void | ) |
Definition at line 905 of file alignment_manager.cpp.
References blockAligner, BlockAligner::CreateNewPairwiseAlignmentsByBlockAlignment(), ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), NULL, UpdateViewer::ReplaceAlignments(), SequenceDisplay::RowsAdded(), sequenceViewer, and updateViewer.
Referenced by UpdateViewerWindow::OnBlockAlign().
void AlignmentManager::BlockAlignUpdate | ( | BlockMultipleAlignment * | single | ) |
Definition at line 932 of file alignment_manager.cpp.
References a, blockAligner, BlockAligner::CreateNewPairwiseAlignmentsByBlockAlignment(), ERRORMSG, ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), n, ne(), NULL, UpdateViewer::ReplaceAlignments(), SequenceDisplay::RowsAdded(), sequenceViewer, and updateViewer.
Referenced by SequenceDisplay::MouseDown().
void AlignmentManager::CalculateRowScoresWithThreader | ( | double | weightPSSM | ) |
Definition at line 813 of file alignment_manager.cpp.
References Threader::CalculateScores(), GetCurrentMultipleAlignment(), and threader.
Referenced by SequenceDisplay::CalculateRowScoresWithThreader().
BlockMultipleAlignment * AlignmentManager::CreateMultipleFromPairwiseWithIBM | ( | const PairwiseAlignmentList & | alignments | ) |
Definition at line 310 of file alignment_manager.cpp.
References a, BlockMultipleAlignment::AddAlignedBlockAtEnd(), BlockMultipleAlignment::AddUnalignedBlocks(), AlignedToAllDependents(), ERRORMSG, BlockMultipleAlignment::GetMaster(), if(), int, Sequence::Length(), NoBlockBoundariesBetween(), NoDependentInsertionsBetween(), NULL, row, Block::SetRangeOfRow(), BlockMultipleAlignment::UpdateBlockMapAndColors(), and Block::width.
Referenced by AlignmentManager(), and NewMultipleWithRows().
void AlignmentManager::ExtendAllUpdates | ( | void | ) |
Definition at line 1118 of file alignment_manager.cpp.
References CreateNewPairwiseAlignmentsByBlockExtension(), ViewerBase::GetCurrentAlignments(), NULL, UpdateViewer::ReplaceAlignments(), sequenceViewer, and updateViewer.
Referenced by UpdateViewerWindow::OnExtend().
void AlignmentManager::ExtendUpdate | ( | BlockMultipleAlignment * | single | ) |
Definition at line 1135 of file alignment_manager.cpp.
References a, CreateNewPairwiseAlignmentsByBlockExtension(), ERRORMSG, ViewerBase::GetCurrentAlignments(), NULL, UpdateViewer::ReplaceAlignments(), sequenceViewer, and updateViewer.
Referenced by SequenceDisplay::MouseDown().
const Vector * AlignmentManager::GetAlignmentColor | ( | const Sequence * | sequence, |
unsigned int | seqIndex, | ||
StyleSettings::eColorScheme | colorScheme | ||
) | const |
Definition at line 597 of file alignment_manager.cpp.
References BlockMultipleAlignment::GetAlignmentColor(), GetCurrentMultipleAlignment(), and NULL.
void AlignmentManager::GetAlignmentSetDependentSequences | ( | std::vector< const Sequence * > * | sequences | ) | const |
Definition at line 498 of file alignment_manager.cpp.
References a, AlignmentSet::alignments, alignmentSet, and i.
Referenced by SequenceViewerWindow::OnShowHideRows().
void AlignmentManager::GetAlignmentSetDependentVisibilities | ( | std::vector< bool > * | visibilities | ) | const |
Definition at line 509 of file alignment_manager.cpp.
References AlignmentSet::alignments, alignmentSet, and dependentsVisible.
Referenced by SequenceViewerWindow::OnShowHideRows(), and SequenceViewerWindow::QueryShowAllRows().
const BlockMultipleAlignment * AlignmentManager::GetCurrentMultipleAlignment | ( | void | ) | const |
Definition at line 271 of file alignment_manager.cpp.
References ViewerBase::GetCurrentAlignments(), NULL, and sequenceViewer.
Referenced by UpdateViewer::BlastNeighbor(), UpdateViewer::BlastUpdate(), CalculateRowScoresWithThreader(), StructureSet::CenterViewOnAlignedResidues(), DoHighlightMotif(), GetAlignmentColor(), StyleManager::GetAtomStyle(), BlockMultipleAlignment::GetCharacterTraitsAt(), CDDAnnotateDialog::GetCurrentHighlightedIntervals(), IBISAnnotateDialog::GetIntervalsForSet(), UpdateViewer::GetMasterSequence(), GetStructureProteins(), CDDAnnotateDialog::HighlightInterval(), IBISAnnotateDialog::HighlightInterval(), UpdateViewer::ImportStructure(), IsAligned(), IsInAlignment(), SequenceDisplay::MouseDown(), NewAlignments(), CDDAnnotateDialog::NewOrEditMotif(), StructureWindow::OnAlignStructures(), UpdateViewerWindow::OnRunThreader(), SequenceViewerWindow::OnShowHideRows(), IBISAnnotateDialog::PopulateInteractionData(), RealignAllDependentStructures(), StructureObject::RealignStructure(), UpdateViewer::SavePendingStructures(), and UpdateViewer::SortByPSSM().
Definition at line 833 of file alignment_manager.cpp.
References ViewerBase::GetCurrentDisplay(), GetCurrentMultipleAlignment(), SequenceDisplay::GetProteinSequences(), NULL, and sequenceViewer.
Referenced by UpdateViewer::GetMasterSequence().
Definition at line 823 of file alignment_manager.cpp.
References ViewerBase::GetCurrentAlignments(), and updateViewer.
Referenced by StructureSet::RemoveUnusedSequences().
|
private |
Definition at line 74 of file alignment_manager.cpp.
References Messenger::AddSequenceViewer(), GlobalMessenger(), and NULL.
Referenced by AlignmentManager().
Definition at line 574 of file alignment_manager.cpp.
References GetCurrentMultipleAlignment(), and BlockMultipleAlignment::IsAligned().
Referenced by StyleManager::GetAtomStyle().
Definition at line 584 of file alignment_manager.cpp.
References GetCurrentMultipleAlignment(), BlockMultipleAlignment::GetSequences(), i, and ncbi::grid::netcache::search::fields::size.
Definition at line 700 of file alignment_manager.cpp.
References b, blocks, BlockMultipleAlignment::Clone(), SequenceViewer::DisplayAlignment(), StyleSettings::eAlignedShortcut, ViewerBase::EditorIsOn(), ERRORMSG, StyleSettings::eTubeShortcut, GetBLOSUM62Score(), ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), BlockMultipleAlignment::GetMaster(), BlockMultipleAlignment::GetSequenceOfRow(), BlockMultipleAlignment::GetUngappedAlignedBlocks(), GlobalMessenger(), i, Sequence::identifier, INFOMSG, BlockMultipleAlignment::MergeAlignment(), BlockMultipleAlignment::NRows(), NULL, StructureBase::parentSet, Messenger::PostRedrawAllStructures(), UpdateViewer::ReplaceAlignments(), row, SequenceDisplay::RowsAdded(), SavePairwiseFromMultiple(), UpdateViewer::SavePendingStructures(), Sequence::sequenceString, sequenceViewer, StructureSet::styleManager, MoleculeIdentifier::ToString(), TRACEMSG, SequenceViewer::TurnOnEditor(), and updateViewer.
Referenced by SequenceDisplay::MouseDown(), and UpdateViewerWindow::OnMerge().
|
private |
Definition at line 164 of file alignment_manager.cpp.
References AlignmentSet::alignments, alignmentSet, BlockMultipleAlignment::Clone(), dependentsVisible, SequenceViewer::DisplaySequences(), GetCurrentMultipleAlignment(), i, NewMultipleWithRows(), BlockMultipleAlignment::NRows(), originalMultiple, originalRowOrder, r(), SequenceSet::sequences, sequenceSet, and sequenceViewer.
Referenced by AlignmentManager().
Definition at line 554 of file alignment_manager.cpp.
References a, AlignmentSet::alignments, alignmentSet, CreateMultipleFromPairwiseWithIBM(), SequenceViewer::DisplayAlignment(), ERRORMSG, i, and sequenceViewer.
Referenced by NewAlignments(), and ShowHideCallbackFunction().
unsigned int AlignmentManager::NUpdates | ( | void | ) | const |
Definition at line 818 of file alignment_manager.cpp.
References ViewerBase::GetCurrentAlignments(), and updateViewer.
Referenced by Cn3DApp::OnInit().
void AlignmentManager::PurgeSequence | ( | const MoleculeIdentifier * | identifier | ) |
Definition at line 850 of file alignment_manager.cpp.
References BlockMultipleAlignment::Clone(), ViewerBase::EditorIsOn(), ERRORMSG, BlockMultipleAlignment::ExtractRows(), ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), BlockMultipleAlignment::GetSequenceOfRow(), i, Sequence::identifier, BlockMultipleAlignment::NRows(), NULL, UpdateViewer::ReplaceAlignments(), SequenceDisplay::RowsRemoved(), sequenceViewer, SequenceViewer::TurnOnEditor(), and updateViewer.
Referenced by StructureSet::RejectAndPurgeSequence().
void AlignmentManager::RealignAllDependentStructures | ( | bool | highlightedOnly | ) | const |
Definition at line 406 of file alignment_manager.cpp.
References b, blocks, ERRORMSG, GetAlignedResidueIndexes(), Molecule::GetAlphaCoords(), GetCurrentMultipleAlignment(), Sequence::GetOrSetMMDBLink(), StructureBase::GetParentOfType(), BlockMultipleAlignment::GetSequenceOfRow(), BlockMultipleAlignment::GetUngappedAlignedBlocks(), i, Sequence::identifier, INFOMSG, StructureSet::InitStructureAlignments(), MoleculeIdentifier::mmdbID, Sequence::molecule, BlockMultipleAlignment::NRows(), StructureBase::parentSet, MoleculeIdentifier::pdbID, StructureSet::RemoveStructureAlignments(), MoleculeIdentifier::VALUE_NOT_SET, and WARNINGMSG.
Referenced by StructureWindow::OnAlignStructures().
void AlignmentManager::RealignDependentSequences | ( | BlockMultipleAlignment * | multiple, |
const std::vector< unsigned int > & | dependentsToRealign | ||
) |
Definition at line 617 of file alignment_manager.cpp.
References UpdateViewer::AddAlignments(), UpdateViewer::CreateUpdateWindow(), eDiag_Info, eDiag_Warning, ERRORMSG, BlockMultipleAlignment::ExtractRows(), ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), SequenceDisplay::RowsRemoved(), sequenceViewer, SetDiagPostLevel(), TRACEMSG, and updateViewer.
Referenced by SequenceDisplay::MouseDown(), and SequenceViewerWindow::OnRealign().
void AlignmentManager::ReplaceUpdatesInASN | ( | ncbi::objects::CCdd::TPending & | newUpdates | ) | const |
Definition at line 842 of file alignment_manager.cpp.
References ERRORMSG, StructureBase::parentSet, StructureSet::ReplaceUpdates(), and sequenceSet.
Referenced by UpdateViewer::SaveAlignments().
void AlignmentManager::SavePairwiseFromMultiple | ( | const BlockMultipleAlignment * | multiple, |
const std::vector< unsigned int > & | rowOrder | ||
) |
Definition at line 186 of file alignment_manager.cpp.
References alignmentSet, BlockMultipleAlignment::Clone(), AlignmentSet::CreateFromMultiple(), StructureSet::ePSSMData, StructureSet::eRowOrderData, ERRORMSG, CPssm_Base::GetByRow(), CPssm_Base::GetFinalData(), CPssmFinalData_Base::GetH(), CPssmFinalData_Base::GetKappa(), CPssmFinalData_Base::GetLambda(), BlockMultipleAlignment::GetMaster(), CPssm_Base::GetNumColumns(), CPssm_Base::GetNumRows(), BlockMultipleAlignment::GetPSSM(), CPssmWithParameters_Base::GetPssm(), CPssmFinalData_Base::GetScalingFactor(), CPssmFinalData_Base::GetScores(), BlockMultipleAlignment::GetSequenceOfRow(), BlockMultipleAlignment::HasNoAlignedBlocks(), CPssm_Base::IsSetFinalData(), BlockMultipleAlignment::NRows(), originalMultiple, originalRowOrder, StructureBase::parentSet, BlockMultipleAlignment::RemovePSSM(), StructureSet::ReplaceAlignmentSet(), row, StructureSet::SetDataChanged(), and TRACEMSG.
Referenced by MergeUpdates(), and SequenceViewer::SaveAlignment().
Implements ShowHideCallbackObject.
Definition at line 518 of file alignment_manager.cpp.
References a, AlignmentSet::alignments, alignmentSet, dependentsVisible, ERRORMSG, GlobalMessenger(), i, NewMultipleWithRows(), StructureBase::parentSet, Messenger::PostRedrawAllSequenceViewers(), Messenger::PostRedrawMolecule(), ViewerBase::Refresh(), sequenceViewer, ShowHideManager::Show(), StructureSet::showHideManager, and Messenger::UnPostRedrawSequenceViewer().
Referenced by SequenceViewerWindow::QueryShowAllRows().
void AlignmentManager::ShowSequenceViewer | ( | bool | showNow | ) | const |
Definition at line 607 of file alignment_manager.cpp.
References SequenceViewer::CreateSequenceWindow(), and sequenceViewer.
Referenced by StructureWindow::LoadData(), and StructureWindow::OnShowWindow().
void AlignmentManager::ShowUpdateWindow | ( | void | ) | const |
Definition at line 612 of file alignment_manager.cpp.
References UpdateViewer::CreateUpdateWindow(), and updateViewer.
Referenced by Cn3DApp::OnInit(), and SequenceViewerWindow::OnShowUpdates().
void AlignmentManager::ThreadAllUpdates | ( | const ThreaderOptions & | options | ) |
Definition at line 678 of file alignment_manager.cpp.
References ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), Threader::Realign(), UpdateViewer::ReplaceAlignments(), sequenceViewer, threader, and updateViewer.
Referenced by UpdateViewerWindow::OnRunThreader().
void AlignmentManager::ThreadUpdate | ( | const ThreaderOptions & | options, |
BlockMultipleAlignment * | single | ||
) |
Definition at line 642 of file alignment_manager.cpp.
References a, ERRORMSG, ViewerBase::GetCurrentAlignments(), ViewerBase::GetCurrentDisplay(), n, ne(), Threader::Realign(), UpdateViewer::ReplaceAlignments(), SequenceDisplay::RowsAdded(), sequenceViewer, threader, and updateViewer.
Referenced by SequenceDisplay::MouseDown().
|
private |
Definition at line 150 of file alignment_manager.hpp.
Referenced by GetAlignmentSetDependentSequences(), GetAlignmentSetDependentVisibilities(), NewAlignments(), NewMultipleWithRows(), SavePairwiseFromMultiple(), and ShowHideCallbackFunction().
BLASTer* AlignmentManager::blaster |
Definition at line 76 of file alignment_manager.hpp.
Referenced by UpdateViewer::BlastNeighbor(), UpdateViewer::BlastUpdate(), ViewerBase::CalculateSelfHitScores(), SequenceViewerWindow::OnSelfHit(), and ~AlignmentManager().
BlockAligner* AlignmentManager::blockAligner |
Definition at line 77 of file alignment_manager.hpp.
Referenced by BlockAlignAllUpdates(), BlockAlignUpdate(), and ~AlignmentManager().
|
mutableprivate |
Definition at line 152 of file alignment_manager.hpp.
Referenced by GetAlignmentSetDependentVisibilities(), NewAlignments(), and ShowHideCallbackFunction().
|
private |
Definition at line 161 of file alignment_manager.hpp.
Referenced by NewAlignments(), SavePairwiseFromMultiple(), and ~AlignmentManager().
|
private |
Definition at line 162 of file alignment_manager.hpp.
Referenced by NewAlignments(), and SavePairwiseFromMultiple().
|
private |
Definition at line 149 of file alignment_manager.hpp.
Referenced by NewAlignments(), and ReplaceUpdatesInASN().
|
private |
Definition at line 155 of file alignment_manager.hpp.
Referenced by BlockAlignAllUpdates(), BlockAlignUpdate(), ExtendAllUpdates(), ExtendUpdate(), GetCurrentMultipleAlignment(), GetStructureProteins(), MergeUpdates(), NewAlignments(), NewMultipleWithRows(), PurgeSequence(), RealignDependentSequences(), ShowHideCallbackFunction(), ShowSequenceViewer(), ThreadAllUpdates(), ThreadUpdate(), and ~AlignmentManager().
Threader* AlignmentManager::threader |
Definition at line 75 of file alignment_manager.hpp.
Referenced by CalculateRowScoresWithThreader(), BlockMultipleAlignment::ShowGeometryViolations(), ThreadAllUpdates(), ThreadUpdate(), and ~AlignmentManager().
|
private |
Definition at line 158 of file alignment_manager.hpp.
Referenced by AlignmentManager(), BlockAlignAllUpdates(), BlockAlignUpdate(), ExtendAllUpdates(), ExtendUpdate(), GetUpdateSequences(), MergeUpdates(), NUpdates(), PurgeSequence(), RealignDependentSequences(), ShowUpdateWindow(), ThreadAllUpdates(), ThreadUpdate(), and ~AlignmentManager().