eLastId = eEdgeColorID
119 boolmark_query_node =
true,
121 intlinkoutType = 0);
131 constvector<int>& mark_leaves,
141vector<string>& seq_ids,
145 stringmv_build_name =
"");
150 boolsimpleTree =
false);
177 boolmark_query_node =
true);
202 boolIsSingleBlastName(
void);
212 intGetRootNodeID(
void);
249 caseeLabelId:
return "label";
250 caseeDistId :
return "dist";
251 caseeSeqIdId:
return "seq-id";
252 caseeTitleId:
return "seq-title";
253 caseeOrganismId :
return "organism";
254 caseeAccessionNbrId:
return "accession-nbr";
255 caseeBlastNameId :
return "blast-name";
256 caseeAlignIndexId :
return "align-index";
258 caseeNodeColorId :
return "$NODE_COLOR";
259 caseeLabelColorId :
return "$LABEL_COLOR";
260 caseeLabelBgColorId :
return "$LABEL_BG_COLOR";
261 caseeLabelTagColorId:
return "$LABEL_TAG_COLOR";
262 caseeTreeSimplificationTagId :
return "$NODE_COLLAPSED";
263 caseeNodeInfoId :
return "node-info";
264 caseeLeafCountId :
return "leaf-count";
265 caseeCommonNameID :
return "common-name";
266 caseeNodeSizeID :
return "$NODE_SIZE";
267 caseeEdgeColorID :
return "$EDGE_COLOR";
268 default:
return "";
303 const string& tree_name =
"Blast_guide_tree");
311 voidFullyExpand(
void);
317 voidSimplifyTree(ETreeSimplifyMode method);
322 boolExpandCollapseSubtree(
intnode_id);
328 voidRerootTree(
intnew_root_id);
333 boolShowSubtree(
introot_id);
336 voidCollapseToViewPort(
void);
360 boolthrow_if_null =
true);
366 static boolx_IsExpanded(
constCBioTreeDynamic::CBioNode& node);
372 static boolx_IsLeafEx(
constCBioTreeDynamic::CBioNode& node);
377 static voidx_Collapse(CBioTreeDynamic::CBioNode& node);
382 static voidx_Expand(CBioTreeDynamic::CBioNode& node);
390 constCBioTreeDynamic::CBioNode& node,
391vector<string>& labels,
392 boolname_subtrees =
true,
393 boolis_outer_node =
true);
401 voidx_MarkNode(CBioTreeDynamic::CBioNode* node,
const string&
color);
445 constvector<int>& mark_leaves,
448 boolsimpleTree =
false,
450 intlinkoutType = 0);
452 stringx_GetSeqIDString(
CBioseq_Handle& handle,
boolget_gi_first);
459 static voidx_AddFeatureDesc(
int id,
const string& desc,
466 static voidx_AddFeature(
int id,
const string&
value,
467CNodeSet::Tdata::iterator iter);
473 static voidx_AddFeature(
int id,
const string&
value,
CNode* node);
489CBioTreeDynamic::CBioNode*
GetNode(
void) {
returnm_Node;}
498 if((*node).GetId() == m_NodeId) {
533: m_IsSingleBlastName(
true)
536=
tree.GetFeatureDict();
540 "No Blast Name feature CBioTreeFeatureDictionary");
561 if(m_CurrentBlastName.empty()) {
562m_CurrentBlastName = node.GetFeature(
566 if(m_CurrentBlastName != node.GetFeature(
569m_IsSingleBlastName =
false;
594: m_HasQueryNode(
false),
595m_HasSeqFromType(
false),
596m_HasSeqFromVerifiedMat(
false),
597m_HasSeqReferenceDB(
false),
598m_HasSeqKmerBlast(
false),
602=
tree.GetFeatureDict();
606 "No NodeInfo feature in CBioTreeFeatureDictionary");
643 if(node.GetFeature(GetFeatureTag(eNodeInfoId))
646m_HasQueryNode =
true;
652 if(node.GetFeature(GetFeatureTag(eNodeInfoId))
653== kNodeInfoSeqFromType) {
655m_HasSeqFromType =
true;
659 if(node.GetFeature(GetFeatureTag(eNodeInfoId))
660== kNodeInfoSeqFromVerifiedMat) {
662m_HasSeqFromVerifiedMat =
true;
664 if(node.GetFeature(GetFeatureTag(eNodeInfoId))
665== kNodeInfoSeqReferenceDB) {
667m_HasSeqReferenceDB =
true;
669 else if(node.GetFeature(GetFeatureTag(eNodeInfoId))
670== kNodeInfoSeqKmerBlast) {
672m_HasSeqKmerBlast =
true;
693 constpair<CNode*, CSeq_id_Handle>&
b)
695 return a.second.AsString() <
b.second.AsString();
Things for representing and manipulating bio trees.
Computaion of distance-based phylognetic tree.
@ eTaxonomyError
Problem initializing CTax object.
@ eInvalidOptions
Invalid parameter values.
@ eInvalidInput
Invalid constructor arguments.
@ eNodeNotFound
Node with desired id not found.
@ eTraverseProblem
Problem in one of the tree visitor classes.
NCBI_EXCEPTION_DEFAULT(CPhyTreeFormatterException, CException)
Tree visitor, finds BioTreeDynamic node by id.
CBioTreeDynamic::CBioNode * GetNode(void)
Get pointer to found node.
CBioTreeDynamic::CBioNode * m_Node
CBioNodeFinder(TBioTreeNodeId id)
Constructor.
ETreeTraverseCode operator()(CBioTreeDynamic::CBioNode &node, int delta)
Check if node has desired id.
Tree visitor class, expands all nodes and corrects node colors.
Tree visitor for checking whether a subtree contains a query node.
bool HasSeqReferenceDB(void) const
int GetLeafCount(void) const
bool HasSeqFromVerifiedMat(void) const
ETreeTraverseCode operator()(CBioTreeDynamic::CBioNode &node, int delta)
Expamine node: check if query node.
bool HasSeqKmerBlast(void) const
bool HasSeqFromType(void) const
Check if an examined subtree has a sequence from type.
bool HasQueryNode(void) const
Check if an examined subtree has a query node.
bool m_HasSeqFromVerifiedMat
CQueryNodeChecker(CBioTreeDynamic &tree)
Constructor.
bool m_IsSingleBlastName
Is one blast name in the tree.
string m_CurrentBlastName
Last identified blast name.
ETreeTraverseCode operator()(CBioTreeDynamic::CBioNode &node, int delta)
Expamine node.
CSingleBlastNameExaminer(CBioTreeDynamic &tree)
Constructor.
bool IsSingleBlastName(void) const
Check if all sequences in examined tree have the same Blast Name.
Compare pairs (node, sequence id handle) by sequence id.
bool operator()(const pair< CNode *, CSeq_id_Handle > &a, const pair< CNode *, CSeq_id_Handle > &b)
Class for adding tree features, maniplating and printing tree in standard text formats.
ETreeSimplifyMode m_SimplifyMode
Current tree simplification mode.
static string GetFeatureTag(EFeatureID feat)
Get tree feature tag.
CPhyTreeFormatter(CPhyTreeFormatter &tree)
Forbiding copy constructor.
CBioTreeDynamic m_Dyntree
Stores tree data.
TBlastNameColorMap m_BlastNameColorMap
Blast Name to color map.
TBlastNameColorMap & SetBlastNameColorMap(void)
Set Blast Name to color map.
vector< CConstRef< CSeq_id > > GetTreeSeqIDs(void)
Get tree seqIds in the order of nodeIds.
static const char * kNodeInfoSeqFromType
Node feature "node-info" value for sequences from type.
vector< TBlastNameToColor > TBlastNameColorMap
EFeatureID
Feature IDs used in guide tree.
@ eLabelBgColorId
Color for backgroud of node label.
@ eNodeInfoId
Used for denoting query nodes.
@ eTitleId
Sequence title.
@ eTreeSimplificationTagId
Is subtree collapsed.
@ eLabelColorId
Node label color.
@ eNodeColorId
Node color.
@ eOrganismId
Taxonomic organism id (for sequence)
@ eBlastNameId
Sequence Blast Name.
@ eAccessionNbrId
Sequence accession.
@ eDistId
Edge length from parent to this node.
@ eAlignIndexId
Index of sequence in Seq_align.
ELabelType
Information shown as labels in the guide tree.
static const char * kNodeInfoSeqReferenceDB
map< string, int > m_SeqTypeMap
CPhyTreeFormatter & operator=(CPhyTreeFormatter &tree)
Forbiding assignment operator.
ETreeSimplifyMode
Tree simplification modes.
@ eFullyExpanded
Tree fully expanded.
@ eNone
No simplification mode.
const CBioTreeDynamic & GetTree(void) const
Get tree structure.
static const char * kNodeInfoQuery
Node feature "node-info" value for query nodes.
ETreeSimplifyMode GetSimplifyMode(void) const
Get current tree simplification mode.
static const char * kNodeInfoSeqKmerBlast
ETreeFormat
Output formats.
pair< string, string > TBlastNameToColor
Type for BlastName to color map.
static const char * kNodeInfoSeqFromVerifiedMat
string m_MapViewerBuildName
vector< CConstRef< CSeq_id > > m_TreeSeqIDs
~CPhyTreeFormatter()
Destructor.
This file provides tree visitor classes and functions for node groupping and simplification of phylog...
std::ofstream out("events_result.xml")
main entry point for tests
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
ELabelType
For compatibility with legacy code.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
ETreeTraverseCode
Tree traverse code returned by the traverse predicate function.
unsigned int TBioTreeNodeId
Tree node id. Every node has its unique id in the tree.
bool HasFeature(const string &feature_name) const
Check if feature is listed in the dictionary.
@ eTreeTraverseStop
Stop traversal (return form algorithm)
@ eTreeTraverse
Keep traversal.
#define NCBI_XALGOPHYTREE_EXPORT
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
const GenericPointer< typename T::ValueType > T2 value
Defines NCBI C++ exception handling.
Int4 delta(size_t dimension_, const Int4 *score_)
USING_SCOPE(align_format)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4