NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CPhyloTreeDataSource Class Reference

Search Toolkit Book for CPhyloTreeDataSource

#include <gui/widgets/phylo_tree/phylo_tree_ds.hpp>

+ Inheritance diagram for CPhyloTreeDataSource:
+ Collaboration diagram for CPhyloTreeDataSource:

Classes

class  visitor_read_properties
 

Public Types

typedef CAppJobDispatcher::TJobID TJobID
 
typedef CPhyloTree TTreeType
 
typedef CPhyloTree::TTreeIdx TTreeIdx
 
typedef CPhyloTree::TNodeType TNodeType
 
typedef CPhyloTree::TClusterID TClusterID
 
typedef std::map< int, size_t > TClusterToColorMap
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Public Types inherited from IQueryDataSource
typedef vector< pair< string, string > > TNamedQueries
 

Public Member Functions

 CPhyloTreeDataSource (const objects::CBioTreeContainer &tree, objects::CScope &scope, bool expand_all=false)
 Throws exception if tree is empty - at least 1 node is required. More...
 
 ~CPhyloTreeDataSource ()
 
void Init (const objects::CBioTreeContainer &tree, objects::CScope &scope, bool expand_all=false)
 Throws exception if tree is empty - at least 1 node is required. More...
 
void Clear ()
 
void SetColorIndices (CPhyloTreeScheme *scheme)
 
string GenerateTooltipFormat ()
 
void ComputeLengthsFromRoot ()
 Create sorted array of distances of nodes from the parent (the m_LenDistribution array) More...
 
float GetClosestLen (float pct) const
 Look in vector of sorted distances of nodes from the root and given a pct (0..1), return the distance closest to that value. More...
 
bool HasLenDistribution () const
 Return true if data is available (for trees without distances, may not be) More...
 
void MeasureTree (TTreeIdx node)
 
void MeasureTree ()
 
void ApplyAttributes (CBioTreeAttrReader::TAttrTable &attrs, CPhyloTreeScheme *scheme, const string &labelfmt="")
 
bool HasClusters ()
 
void Clusterize (CPhyloTreeScheme *scheme)
 
void ReRoot (TTreeIdx root_idx)
 Set the root node of the tree to the node at root_idx. More...
 
void ReRootEdge (TTreeIdx edge_child_node)
 Re-root on the edge between the selected node and its parent. More...
 
void ReRootMidpoint ()
 Re-root tree using midpoint-method. More...
 
set< CPhyloNodeData::TIDCollapseByDistance (int leaf_count_target, SCollapsable *collapse_func)
 Collapse, based on distance, enough nodes in the tree to get the total number of leaves down to the requested number. More...
 
void Relabel (CPhyloTreeScheme *scheme, string labelFmt)
 
void Sort (bool ascending)
 
void SortDist (bool ascending)
 
void SortLabel (bool ascending)
 
void SortLabelRange (bool ascending)
 
TModelRect GetBoundRect ()
 
void Clean ()
 
void Filter ()
 
void FilterDistances (double x_dist)
 
CPhyloTreeGetTree ()
 
const CPhyloTreeGetTree () const
 
void SetTreeLabel (const CTreeLabel &l)
 Label for tree (optional element of biotreecontainer) More...
 
CTreeLabel GetTreeLabel () const
 
CTreeGraphicsModelGetModel ()
 Get model for rendering. More...
 
const CBioTreeFeatureDictionaryGetDictionary () const
 
unsigned int GetNumNodes (void)
 
unsigned int GetVisibleNodes (void)
 
unsigned int GetNumEdges (void)
 
int GetWidth (void)
 
int GetSize (void)
 
int GetMaxLabelLen (void)
 
double GetNormDistance (void)
 
double GetMinDistance (void)
 
TClusterID GetMaxClusterID ()
 
vector< TTreeIdxFindNodes (const string &query, size_t &num_queried, CStringMatching::EStringMatching string_matching, NStr::ECase use_case) const
 search for nodes via the specified text matching algorithm More...
 
const vector< CPhyloTree::TID > & GetStringQueryIDs () const
 Get IDs selected by most recent call to FindNodes. More...
 
TTreeIdx IterateOverSelNodes (int direction, bool highlight)
 
TTreeIdx GetCurrentSearchNode () const
 
void SetCurrentSearchNode (TTreeIdx node_idx)
 
CPhyloSelectionSetMgrGetSelectionSets ()
 
void UpdateSelectionSets (CPhyloTreeScheme *scheme)
 
const TClusterToColorMapGetClusterToColorMap () const
 Get map that translates cluster-ids to color indices. More...
 
void Cut ()
 
void Paste ()
 
TTreeIdx NewNode (bool after=true)
 
void Remove (bool subtree=true)
 
void RemoveSelected ()
 
void MoveNode (bool up)
 
bool ClipboardEmpty () const
 
void SetCollapsedLabel (CPhyloTree::TTreeIdx idx)
 Collapse single node, do any relabeling if needed. More...
 
void SetCollapsedLabels (const vector< CPhyloNodeData::TID > &node_ids)
 Collapse all nodes in node_ids, doing relabeling if needed. More...
 
void CollapseSelected ()
 
IQueryDataSource interface implementation
virtual string GetColumnLabel (size_t col) const
 get number and names of columns in data source More...
 
virtual size_t GetColsCount () const
 
virtual CMacroQueryExecGetQueryExec (bool casesensitive, CStringMatching::EStringMatching matching)
 Create an appropriate instance of a subclass of CQueryExec for that will be used to execute a query on the data source. More...
 
virtual void SetQueryResults (CMacroQueryExec *q)
 Set selection results to be whatever elements are selected in 'q'. More...
 
virtual void ClearQueryResults ()
 Clear any current results from previous queries. More...
 
virtual CRef< objects::CScope > GetScope ()
 Return a scope for the data source, if available. More...
 
virtual void ExecuteStringQuery (const string &query, size_t &num_selected, size_t &num_queried, CStringMatching::EStringMatching string_matching=CStringMatching::ePlainSearch, NStr::ECase use_case=NStr::eCase)
 Execute a string-matching query on the underlying data. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from IQueryDataSource
virtual ~IQueryDataSource ()
 dtor More...
 

Protected Attributes

CRef< CPhyloTreem_TreeModel
 
CTreeLabel m_TreeLabel
 
CPhyloTreeCalculatorm_Calc
 
CRef< objects::CScope > m_Scope
 
TTreeIdx m_SearchCurrentNode
 
TClusterToColorMap m_ClusterToColorMap
 
std::vector< float > m_LenDistribution
 
vector< CPhyloTree::TIDm_StringQueryIDs
 Temporary storage for string query results to get ID's back to caller. More...
 

Static Protected Attributes

static CPhyloTree m_sTreeClipboard
 static (to allow copying between trees) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 231 of file phylo_tree_ds.hpp.

Member Typedef Documentation

◆ TClusterID

Definition at line 240 of file phylo_tree_ds.hpp.

◆ TClusterToColorMap

typedef std::map<int, size_t> CPhyloTreeDataSource::TClusterToColorMap

Definition at line 241 of file phylo_tree_ds.hpp.

◆ TJobID

Definition at line 236 of file phylo_tree_ds.hpp.

◆ TNodeType

Definition at line 239 of file phylo_tree_ds.hpp.

◆ TTreeIdx

Definition at line 238 of file phylo_tree_ds.hpp.

◆ TTreeType

Definition at line 237 of file phylo_tree_ds.hpp.

Constructor & Destructor Documentation

◆ CPhyloTreeDataSource()

CPhyloTreeDataSource::CPhyloTreeDataSource ( const objects::CBioTreeContainer &  tree,
objects::CScope &  scope,
bool  expand_all = false 
)

Throws exception if tree is empty - at least 1 node is required.

Definition at line 165 of file phylo_tree_ds.cpp.

References Init().

◆ ~CPhyloTreeDataSource()

CPhyloTreeDataSource::~CPhyloTreeDataSource ( )

Definition at line 173 of file phylo_tree_ds.cpp.

References m_Calc, and NULL.

Member Function Documentation

◆ ApplyAttributes()

void CPhyloTreeDataSource::ApplyAttributes ( CBioTreeAttrReader::TAttrTable attrs,
CPhyloTreeScheme scheme,
const string labelfmt = "" 
)

◆ Clean()

void CPhyloTreeDataSource::Clean ( )

◆ Clear()

void CPhyloTreeDataSource::Clear ( void  )

◆ ClearQueryResults()

void CPhyloTreeDataSource::ClearQueryResults ( )
virtual

Clear any current results from previous queries.

Implements IQueryDataSource.

Definition at line 946 of file phylo_tree_ds.cpp.

References m_SearchCurrentNode, and CTreeModel< CPhyloTreeNode >::Null().

Referenced by CPhyloTreeWidget::OnUpdateSelChanged(), and SetQueryResults().

◆ ClipboardEmpty()

bool CPhyloTreeDataSource::ClipboardEmpty ( ) const
inline

◆ Clusterize()

void CPhyloTreeDataSource::Clusterize ( CPhyloTreeScheme scheme)

◆ CollapseByDistance()

set< CPhyloNodeData::TID > CPhyloTreeDataSource::CollapseByDistance ( int  leaf_count_target,
SCollapsable collapse_func 
)

◆ CollapseSelected()

void CPhyloTreeDataSource::CollapseSelected ( )

◆ ComputeLengthsFromRoot()

void CPhyloTreeDataSource::ComputeLengthsFromRoot ( )

◆ Cut()

void CPhyloTreeDataSource::Cut ( )

◆ ExecuteStringQuery()

void CPhyloTreeDataSource::ExecuteStringQuery ( const string query,
size_t &  num_selected,
size_t &  num_queried,
CStringMatching::EStringMatching  string_matching = CStringMatching::ePlainSearch,
NStr::ECase  use_case = NStr::eCase 
)
virtual

Execute a string-matching query on the underlying data.

Parameters
[in]queryReference to a pattern to search for.
[out]num_selectedNumber of matching rows.
[out]num_queriedTotal rows queried.
[in]string_matchingString matching algorithm to use.
[in]use_caseWhether to do a case sensitive compare (default), or not.

Implements IQueryDataSource.

Definition at line 951 of file phylo_tree_ds.cpp.

References CPhyloTree::ClearSelection(), FindNodes(), CPhyloNodeData::GetId(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetValue(), Info(), LOG_POST, m_SearchCurrentNode, m_StringQueryIDs, m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), query, and CPhyloTree::SetSelection().

◆ Filter()

void CPhyloTreeDataSource::Filter ( )

◆ FilterDistances()

void CPhyloTreeDataSource::FilterDistances ( double  x_dist)

◆ FindNodes()

vector< CPhyloTree::TTreeIdx > CPhyloTreeDataSource::FindNodes ( const string query,
size_t &  num_queried,
CStringMatching::EStringMatching  string_matching,
NStr::ECase  use_case 
) const

search for nodes via the specified text matching algorithm

Definition at line 1022 of file phylo_tree_ds.cpp.

References CRef< C, Locker >::GetNCObject(), m_TreeModel, query, and TreeDepthFirst().

Referenced by ExecuteStringQuery().

◆ GenerateTooltipFormat()

string CPhyloTreeDataSource::GenerateTooltipFormat ( )

◆ GetBoundRect()

TModelRect CPhyloTreeDataSource::GetBoundRect ( void  )

◆ GetClosestLen()

float CPhyloTreeDataSource::GetClosestLen ( float  pct) const

Look in vector of sorted distances of nodes from the root and given a pct (0..1), return the distance closest to that value.

Definition at line 229 of file phylo_tree_ds.cpp.

References m_LenDistribution, and min().

Referenced by IPhyloTreeRender::GetEdgeColor().

◆ GetClusterToColorMap()

const TClusterToColorMap& CPhyloTreeDataSource::GetClusterToColorMap ( ) const
inline

Get map that translates cluster-ids to color indices.

Definition at line 368 of file phylo_tree_ds.hpp.

References m_ClusterToColorMap.

Referenced by CPhyloSaveSelectiondlg::SetSelections().

◆ GetColsCount()

size_t CPhyloTreeDataSource::GetColsCount ( ) const
virtual

◆ GetColumnLabel()

string CPhyloTreeDataSource::GetColumnLabel ( size_t  col) const
virtual

◆ GetCurrentSearchNode()

TTreeIdx CPhyloTreeDataSource::GetCurrentSearchNode ( ) const
inline

Definition at line 360 of file phylo_tree_ds.hpp.

References m_SearchCurrentNode.

Referenced by CPhyloTreeWidget::OnUpdateSelChanged().

◆ GetDictionary()

const CBioTreeFeatureDictionary& CPhyloTreeDataSource::GetDictionary ( void  ) const
inline

◆ GetMaxClusterID()

TClusterID CPhyloTreeDataSource::GetMaxClusterID ( )
inline

◆ GetMaxLabelLen()

int CPhyloTreeDataSource::GetMaxLabelLen ( void  )
inline

Definition at line 329 of file phylo_tree_ds.hpp.

References CPhyloTreeCalculator::GetMaxLabelLen(), and m_Calc.

◆ GetMinDistance()

double CPhyloTreeDataSource::GetMinDistance ( void  )
inline

Definition at line 331 of file phylo_tree_ds.hpp.

References CPhyloTreeCalculator::GetMinDistance(), and m_Calc.

◆ GetModel()

CTreeGraphicsModel& CPhyloTreeDataSource::GetModel ( )
inline

◆ GetNormDistance()

double CPhyloTreeDataSource::GetNormDistance ( void  )
inline

◆ GetNumEdges()

unsigned int CPhyloTreeDataSource::GetNumEdges ( void  )
inline

◆ GetNumNodes()

unsigned int CPhyloTreeDataSource::GetNumNodes ( void  )
inline

◆ GetQueryExec()

CMacroQueryExec * CPhyloTreeDataSource::GetQueryExec ( bool  casesensitive,
CStringMatching::EStringMatching  matching 
)
virtual

◆ GetScope()

virtual CRef<objects::CScope> CPhyloTreeDataSource::GetScope ( void  )
inlinevirtual

Return a scope for the data source, if available.

Reimplemented from IQueryDataSource.

Definition at line 344 of file phylo_tree_ds.hpp.

References m_Scope.

◆ GetSelectionSets()

CPhyloSelectionSetMgr& CPhyloTreeDataSource::GetSelectionSets ( )
inline

◆ GetSize()

int CPhyloTreeDataSource::GetSize ( void  )
inline

◆ GetStringQueryIDs()

const vector<CPhyloTree::TID>& CPhyloTreeDataSource::GetStringQueryIDs ( ) const
inline

Get IDs selected by most recent call to FindNodes.

Definition at line 356 of file phylo_tree_ds.hpp.

References m_StringQueryIDs.

◆ GetTree() [1/2]

CPhyloTree* CPhyloTreeDataSource::GetTree ( void  )
inline

Definition at line 310 of file phylo_tree_ds.hpp.

References CRef< C, Locker >::GetPointerOrNull(), and m_TreeModel.

Referenced by IPhyloTreeRender::BufferedRender(), CCalcCircularTree::CCalcCircularTree(), CCalcRadialTree::CCalcRadialTree(), CCalcSlantedTree::CCalcSlantedTree(), CChangePhyloPropertyCmd::CChangePhyloPropertyCmd(), CDrawCircularTreeVbo::CDrawCircularTreeVbo(), Clean(), CPhyloTreeWidget::EditLabel(), CChangePhyloSelectionSetCmd::Execute(), CChangePhyloPropertyCmd::Execute(), IPhyloTreeRender::GetHoverNode(), IPhyloTreeRender::GetHoverNodeIdx(), GetQueryExec(), CwxPhyloSettingsDlg::GetRandomNode(), CPhyTreeView::GetSelection(), CPhyloTreePS::Init(), CPhyloTreeWidget::IterateSelection(), CPhyloSaveSelectiondlg::OnAddCurrentSelBtnClick(), CPhyloTreeWidget::OnAddSelectionSet(), CPhyTreeView::OnBioTreeChanged(), CPhyloTreeWidget::OnClearSelection(), CPhyloTreeWidget::OnCollapseChildren(), CPhyloTreeWidget::OnCollapseToViewport(), CPhyTreeView::OnCreateSelectedSubtree(), CPhyloTreeWidget::OnEditNode(), CPhyloTreeWidget::OnExpandChildren(), CPhyloTreeWidget::OnExportSelection(), CPhyTreeView::OnExportTree(), CPhyloTreeWidget::OnInfoTip(), IPhyloTreeRender::OnLeftDblClick(), IPhyloTreeRender::OnLeftDown(), CPhyloTreeWidget::OnRerootTree(), CPhyloTreeWidget::OnRerootTreeAtEdge(), IPhyloTreeRender::OnRightDown(), CPhyloTreeWidget::OnSearchTip(), CPhyloTreeWidget::OnSelectAll(), CPhyloTreeWidget::OnSetMidpointRoot(), CPhyloTreeWidget::OnShowAll(), CPhyTreeView::OnSomethingEdited(), IPhyloTreeRender::OnTimerLeftUp(), CPhyloTreeWidget::OnUpdateCollapseChildren(), CPhyloTreeWidget::OnUpdateCollapseSelected(), CPhyloTreeWidget::OnUpdateEdit(), CPhyloTreeWidget::OnUpdateEditLabel(), CPhyloTreeWidget::OnUpdateEditNode(), CPhyloTreeWidget::OnUpdateExpandChildren(), CPhyloTreeWidget::OnUpdateRerootTree(), CPhyloTreeWidget::OnUpdateRerootTreeAtEdge(), CPhyloTreeWidget::OnUpdateSelChanged(), CPhyloTreeWidget::OnUpdateSetMidpointRoot(), CPhyloTreeWidget::OnUpdateSubtreeFromSelection(), CPhyloTreeWidget::OnUpdateZoomSel(), CPhyloTreeWidget::OnUpdateZoomToSubtree(), CPhyloTreeWidget::OnZoomTip(), CPhyloTreeWidget::OnZoomToSelection(), CPhyloTreeWidget::OnZoomToSubtree(), CChangePhyloSelectionSetCmd::PerformEdit(), CChangePhyloPropertyCmd::PerformEdit(), CChangePhyloExpandCollapseCmd::PerformEdit(), IPhyloTreeRender::PointToNode(), CPhyloTreeWidget::QueryEnd(), CPhyTreeView::RebuildObjectIndex(), CPhyloTreeWidget::RedrawDataSource(), CPhyloTreePane::RenderPdf(), CPhyloTreeWidget::SendEditEvent(), IPhyloTreeRender::SetActiveTooltipNode(), IPhyloTreeRender::SetScheme(), CPhyloSaveSelectiondlg::SetSelections(), IPhyloTreeRender::TTHH_GetTooltip(), CChangePhyloSelectionSetCmd::Unexecute(), CChangePhyloPropertyCmd::Unexecute(), CPhyloTreePane::Update(), CwxPhyloSettingsDlg::UpdateSample(), CPhyloForce::x_CalculateBoundary(), CPhyloRectCladogram::x_DrawPseudoSplineTree(), CPhyloRectCladogram::x_DrawSplineTree(), CPhyloCircularCladogram::x_DrawTree(), CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), CPhyloSlantedCladogram::x_Layout(), CPhyTreeView::x_OnSetSelection(), CPhyloTreePane::x_Render(), IPhyloTreeRender::x_RenderCircularVbo(), IPhyloTreeRender::x_RenderLineVbo(), IPhyloTreeRender::x_RenderNodeHighlight(), IPhyloTreeRender::x_RenderPseudoSplineVbo(), IPhyloTreeRender::x_RenderSelection(), IPhyloTreeRender::x_RenderSplineVbo(), IPhyloTreeRender::x_RenderTooltipHints(), CPhyloCircularCladogram::x_RenderVbo(), CPhyloRadial::x_RenderVbo(), CPhyloSlantedCladogram::x_RenderVbo(), CPhyloRectCladogram::x_RenderVboPseudoSplines(), CPhyloRectCladogram::x_RenderVboSplines(), IPhyloTreeRender::x_SelectByRect(), and CPhyloSaveSelectiondlg::x_SetClusterIds().

◆ GetTree() [2/2]

const CPhyloTree* CPhyloTreeDataSource::GetTree ( void  ) const
inline

Definition at line 311 of file phylo_tree_ds.hpp.

References CRef< C, Locker >::GetPointerOrNull(), and m_TreeModel.

◆ GetTreeLabel()

CTreeLabel CPhyloTreeDataSource::GetTreeLabel ( ) const
inline

◆ GetVisibleNodes()

unsigned int CPhyloTreeDataSource::GetVisibleNodes ( void  )
inline

◆ GetWidth()

int CPhyloTreeDataSource::GetWidth ( void  )
inline

◆ HasClusters()

bool CPhyloTreeDataSource::HasClusters ( )

◆ HasLenDistribution()

bool CPhyloTreeDataSource::HasLenDistribution ( ) const
inline

Return true if data is available (for trees without distances, may not be)

Definition at line 268 of file phylo_tree_ds.hpp.

References m_LenDistribution.

Referenced by IPhyloTreeRender::GetEdgeColor().

◆ Init()

void CPhyloTreeDataSource::Init ( const objects::CBioTreeContainer &  tree,
objects::CScope &  scope,
bool  expand_all = false 
)

◆ IterateOverSelNodes()

CPhyloTree::TTreeIdx CPhyloTreeDataSource::IterateOverSelNodes ( int  direction,
bool  highlight 
)

◆ MeasureTree() [1/2]

void CPhyloTreeDataSource::MeasureTree ( )

◆ MeasureTree() [2/2]

void CPhyloTreeDataSource::MeasureTree ( TTreeIdx  node)

◆ MoveNode()

void CPhyloTreeDataSource::MoveNode ( bool  up)

◆ NewNode()

TTreeIdx CPhyloTreeDataSource::NewNode ( bool  after = true)

◆ Paste()

void CPhyloTreeDataSource::Paste ( void  )

◆ Relabel()

void CPhyloTreeDataSource::Relabel ( CPhyloTreeScheme scheme,
string  labelFmt 
)

◆ Remove()

void CPhyloTreeDataSource::Remove ( bool  subtree = true)

◆ RemoveSelected()

void CPhyloTreeDataSource::RemoveSelected ( )

◆ ReRoot()

void CPhyloTreeDataSource::ReRoot ( TTreeIdx  root_idx)

◆ ReRootEdge()

void CPhyloTreeDataSource::ReRootEdge ( TTreeIdx  edge_child_node)

◆ ReRootMidpoint()

void CPhyloTreeDataSource::ReRootMidpoint ( )

◆ SetCollapsedLabel()

void CPhyloTreeDataSource::SetCollapsedLabel ( CPhyloTree::TTreeIdx  idx)

◆ SetCollapsedLabels()

void CPhyloTreeDataSource::SetCollapsedLabels ( const vector< CPhyloNodeData::TID > &  node_ids)

◆ SetColorIndices()

void CPhyloTreeDataSource::SetColorIndices ( CPhyloTreeScheme scheme)

◆ SetCurrentSearchNode()

void CPhyloTreeDataSource::SetCurrentSearchNode ( TTreeIdx  node_idx)
inline

Definition at line 361 of file phylo_tree_ds.hpp.

References m_SearchCurrentNode.

◆ SetQueryResults()

void CPhyloTreeDataSource::SetQueryResults ( CMacroQueryExec q)
virtual

Set selection results to be whatever elements are selected in 'q'.

Implements IQueryDataSource.

Definition at line 937 of file phylo_tree_ds.cpp.

References ClearQueryResults(), CPhyloTree::ClearSelection(), CTreeQueryExec::GetTreeSelected(), m_TreeModel, and CPhyloTree::SetSelection().

◆ SetTreeLabel()

void CPhyloTreeDataSource::SetTreeLabel ( const CTreeLabel l)
inline

Label for tree (optional element of biotreecontainer)

Definition at line 314 of file phylo_tree_ds.hpp.

References l(), and m_TreeLabel.

Referenced by CwxTreeLabelEdit::OnOkClick().

◆ Sort()

void CPhyloTreeDataSource::Sort ( bool  ascending)

◆ SortDist()

void CPhyloTreeDataSource::SortDist ( bool  ascending)

◆ SortLabel()

void CPhyloTreeDataSource::SortLabel ( bool  ascending)

◆ SortLabelRange()

void CPhyloTreeDataSource::SortLabelRange ( bool  ascending)

◆ UpdateSelectionSets()

void CPhyloTreeDataSource::UpdateSelectionSets ( CPhyloTreeScheme scheme)

Member Data Documentation

◆ m_Calc

CPhyloTreeCalculator* CPhyloTreeDataSource::m_Calc
protected

◆ m_ClusterToColorMap

TClusterToColorMap CPhyloTreeDataSource::m_ClusterToColorMap
protected

Definition at line 401 of file phylo_tree_ds.hpp.

Referenced by Clusterize(), and GetClusterToColorMap().

◆ m_LenDistribution

std::vector<float> CPhyloTreeDataSource::m_LenDistribution
protected

◆ m_Scope

CRef<objects::CScope> CPhyloTreeDataSource::m_Scope
protected

Definition at line 397 of file phylo_tree_ds.hpp.

Referenced by Clean(), GetScope(), and Init().

◆ m_SearchCurrentNode

TTreeIdx CPhyloTreeDataSource::m_SearchCurrentNode
protected

◆ m_sTreeClipboard

CPhyloTree CPhyloTreeDataSource::m_sTreeClipboard
staticprotected

static (to allow copying between trees)

Definition at line 413 of file phylo_tree_ds.hpp.

Referenced by ClipboardEmpty(), Cut(), and Paste().

◆ m_StringQueryIDs

vector<CPhyloTree::TID> CPhyloTreeDataSource::m_StringQueryIDs
protected

Temporary storage for string query results to get ID's back to caller.

Definition at line 409 of file phylo_tree_ds.hpp.

Referenced by ExecuteStringQuery(), and GetStringQueryIDs().

◆ m_TreeLabel

CTreeLabel CPhyloTreeDataSource::m_TreeLabel
protected

Definition at line 392 of file phylo_tree_ds.hpp.

Referenced by GetTreeLabel(), Init(), and SetTreeLabel().

◆ m_TreeModel

CRef<CPhyloTree> CPhyloTreeDataSource::m_TreeModel
protected

The documentation for this class was generated from the following files:
Modified on Wed Sep 04 15:05:57 2024 by modify_doxy.py rev. 669887