45 : m_ma(), m_cd(0), m_family(0), m_seqTree(0), m_taxTree(0), m_taxClient(0),
46 m_useMembership(
true), m_taxLevel(BySuperkingdom), m_treeOptions(), m_triedTreeMaking(
false),
47 m_loadOnly(loadExistingTreeOnly)
49 vector<CDFamily*> families;
51 if(families.size() != 1 )
53 for (
int i = 0 ;
i <families.size();
i++)
57 m_ma.setAlignment(*families[0]);
58 m_family = families[0];
62 : m_ma(), m_cd(cd), m_family(0), m_seqTree(0), m_taxTree(0), m_taxClient(0),
63 m_useMembership(
true), m_taxLevel(BySuperkingdom), m_treeOptions(), m_triedTreeMaking(
false),
69 : m_ma(), m_cd(0), m_family(&cdfam), m_seqTree(0), m_taxTree(0), m_taxClient(0),
70 m_useMembership(
true), m_taxLevel(BySuperkingdom), m_treeOptions(
option), m_triedTreeMaking(
false),
140 <<
" because it does not have a consistent block alognment.");
202 nodeParent.
isLeaf =
false;
203 nodeParent.
x = cursor->x;
204 nodeParent.
y = cursor->y;
206 while (sib != cursor.
end())
209 nodeChild.
x = sib->x;
210 nodeChild.
y = sib->y;
212 nodeTurn.
x = nodeParent.
x;
213 nodeTurn.
y= nodeChild.
y;
217 nodeChild.
name = sib->name;
224 e1.first = nodeParent;
225 e1.second = nodeTurn;
227 e2.second = nodeChild;
279 string rankName =
"superkingdom";
317 bool validated =
false;
342 tmpTree = &tmpTreeObj;
CCdCore * GetScopedLeafCD(int row) const
CCdCore * getFirstCD() const
string GetAccession(int &Version) const
CCdCore * getRootCD() const
static int createFamilies(vector< CCdCore * > &cds, vector< CDFamily * > &families)
void subfamily(CDFamilyIterator cit, CDFamily *&subfam, bool childrenOnly=false)
static bool DistMethodUsesScoringMatrix(EDistMethod method)
string GetDistMethodName()
bool isBlockAligned() const
bool setAlignment(const CDFamily &family)
CConstRef< CSeq_id > seqId
void annotateTreeByTaxonomy(TaxonomyLevel tax)
void annotateLeafNode(const SeqItem &nodeData, SeqTreeNode &node)
bool loadExistingTree(CCdCore *cd, TreeOptions *treeOptions, SeqTree *seqTree)
SeqTreeAPI(vector< CCdCore * > &cds, bool loadExistingTreeOnly=true)
bool loadAndValidateExistingTree()
void getEdgesFromSubTree(const SeqTree::iterator &cursor, vector< SeqTreeEdge > &edges)
TreeOptions m_treeOptions
string layoutSeqTree(int maxX, int maxY, vector< SeqTreeEdge > &edges)
int getAllEdges(vector< SeqTreeEdge > &edges)
void annotateTreeByMembership()
static bool convertToSeqTree(CSequence_tree &asnSeqTree, SeqTree &seqTree, SeqLocToSeqItemMap &liMap)
static bool convertToTreeOption(const CRef< CAlgorithm_type > &alg, TreeOptions &treeOption)
static bool resolveRowId(const AlignmentCollection &ac, SeqLocToSeqItemMap &liMap)
static bool refillAsnMembership(const AlignmentCollection &ac, SeqLocToSeqItemMap &liMap)
void calculateNodePositions(SeqTree &treeData, int maxX, int maxY)
bool isSequenceCompositionSame(AlignmentCollection &aligns)
void fixRowName(AlignmentCollection &aligns, SeqNameMode mode)
virtual string GetSuperKingdom(TTaxId taxid)
virtual TTaxId GetTaxIDForSeqId(CConstRef< CSeq_id > sid)
TaxTreeIterator getParentAtRank(int row, string rankName)
static SeqTree * makeTree(AlignmentCollection *alignData, const TreeOptions &treeOptions)
sibling_iterator end() const
unsigned int number_of_children() const
sibling_iterator begin() const
pre_order_iterator begin() const
string GetScoringMatrixName(EScoreMatrixType type)
pair< SeqTreeNode, SeqTreeNode > SeqTreeEdge
string GetTreeAlgorithmName(ETreeMethod algorithm)
SStrictId_Tax::TId TTaxId
Taxon id type.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
const TAlgorithm & GetAlgorithm(void) const
Get the Algorithm member data.
void SetSeqtree(TSeqtree &value)
Assign a value to Seqtree data member.
bool IsSetSeqtree(void) const
Check if a value has been assigned to Seqtree data member.
const TSeqtree & GetSeqtree(void) const
Get the Seqtree member data.
@ eTree_scope_immediateChildrenOnly
ETreeMethod clusteringMethod
CAlgorithm_type::ETree_scope scope