distanceToRoot(rhs.distanceToRoot),x(rhs.x), y(rhs.y), rowID(rhs.rowID),
76selections(rhs.selections), selected(rhs.selected),
77collapsed(rhs.collapsed),interesting(rhs.interesting), membership(rhs.membership), seqId(rhs.seqId) {}
85 int_Pos = nameDist.find(
'_');
91 rowID= atoi(nameDist.substr(0, _Pos).c_str());
92tail = nameDist.substr(_Pos + 1);
96 intcolonPos = tail.find(
':');
100 name= tail.substr(0,colonPos);
103 distance= atof(tail.substr(colonPos+1).c_str());
155m_longestName(), m_leafNodes(), m_collapsedNodes()
167os <<
" ID: "<<
si.id <<
" RowID: "<<
si.rowID
168<<
" Distance ="<<
si.distance << std::endl;
173 boolisEqual =
false;
223cursor->distanceToRoot =
parent(cursor)->distanceToRoot + cursor->distance;
225cursor->id = numLeaf;
226 if(cursor->distanceToRoot > maxDist)
227maxDist = cursor->distanceToRoot;
236 if( cursor ==
begin())
237cursor->distanceToRoot = 0;
239cursor->distanceToRoot =
parent(cursor)->distanceToRoot + cursor->distance;
240 if(cursor->collapsed)
242 if(cursor->distanceToRoot > maxDist)
243maxDist = cursor->distanceToRoot;
249 while(sib != cursor.
end())
251 prepare(numLeaf, maxDist,sib);
263colNode->id = numLeaf;
297 if(start->distanceToRoot > dist)
299nodes.push_back(start);
303 while(sib != start.
end())
314it->collapsed =
false;
335 if(treeId > masterRowTreeId)
338positions.push_back(treeId);
389rankList.push_back(node->rowID);
394 while(sib != node.
end())
405 if(sib == node.
end())
409selections.push_back(node->rowID);
413 while(sib != node.
end())
423 if(sib == node.
end())
425selections.push_back(node->rowID);
428 while(sib != node.
end())
439node->selected = select;
442 if(sib == node.
end())
445node->select(cd, select);
447node->select(select);
448 if(node->getAllSelectedInstances() > 0)
449node->selected =
true;
451node->selected =
false;
454 while(sib != node.
end())
469 if(selection.
find(
row) != selection.
end())
482 if(
leaf->id ==
id)
491vector<int> rowsForOne;
492 for(
unsigned int i= 0;
i< gis.size();
i++)
497 for(
unsigned intk = 0; k < rowsForOne.size(); k++)
498rows.
insert(rowsForOne[k]);
508 intnum = rows.size();
509 for(
int i= 0;
i< num;
i++)
515leafNode = mapIt->second;
516leafNode->taxid = taxid;
527mapIt->second->taxid = -1;
535 for(; cursor !=
end(); ++cursor)
537 if((cursor.
number_of_children() == 0) && (cursor->rowID >= 0) && (cursor->rowID < num))
542cursor->name.erase();
552cursor->name = species;
555cursor->name = gi +
"["+ species +
"]";
558cursor->name = gi + loc;
561cursor->name = gi + loc +
"["+ species +
"]";
574 for(; cursor !=
end(); ++cursor)
578cursor->selected =
false;
587 for(; cursor !=
end(); ++cursor)
592vector<RowSource> rss;
594 for(
unsigned int i= 0;
i< rss.size();
i++)
606 for(; cursor !=
end(); ++cursor)
610cursor->selections.clear();
611vector<RowSource> rss;
613 for(
unsigned int i= 0;
i< rss.size();
i++)
624 for(; cursor !=
end(); ++cursor)
628vector<RowSource> rss;
630 for(
unsigned int i= 0;
i< rss.size();
i++)
632 if((cursor->selections).find(rss[
i].cd) == cursor->selections.
end())
650 unsigned intcom1Size = com1.
size();
651 if(com1Size != com2.
size())
653 for(
unsigned int i= 0;
i< com1Size;
i++)
655 if(com1[
i].compare(com2[
i]))
665 for(cursor =
begin(); cursor !=
end(); ++cursor)
671seqComposition[cursor->rowID] = cursor->name;
683 for(
int i= 0;
i< num; ++
i)
693 while(cit != rowColorMap->
end())
699leafNode = mapIt->second;
701leafNode->membership = cit->second;
bool Get_GI_or_PDB_String_FromAlignment(int row, std::string &result) const
bool GetSpeciesForRow(int row, string &species) const
CCdCore * GetScopedLeafCD(int row) const
const RowSourceTable & GetRowSourceTable() const
int GetRowsWithSeqID(const CRef< CSeq_id > &SeqID, vector< int > &rows) const
int GetLowerBound(int row) const
int GetUpperBound(int row) const
string GetAccession(int &Version) const
int findEntries(int row, vector< RowSource > &src, bool scopedOnly=false) const
void select(bool on=true)
bool operator==(const SeqItem &rhs) const
int getAllSelectedInstances()
void setMembershipColor(const RowMembershipColor *rowColorMap)
void getDistantNodes(double dist, vector< SeqTreeIterator > &nodes)
void selectByRowID(const set< int > &receivedSelection, bool select=true, CCdCore *cd=0)
bool isSequenceCompositionSame(AlignmentCollection &aligns)
void addSelectionFields(AlignmentCollection &aligns)
void getSequenceRowid(const iterator &node, vector< int > &selections)
void selectByTax(const vector< int > &rows, long taxid)
void getDiversityRankUnderNode(SeqTreeIterator node, list< int > &rankList)
IteQueue m_collapsedNodes
bool compareSequenceCompositions(IntToStringMap &com1, IntToStringMap &com2)
std::string getLongestName()
void getDiversityRankToRow(int colRow, list< int > &rankList)
void fixRowNumber(AlignmentCollection &aligns)
double getMaxDistanceToRoot()
void getOrdersInTree(vector< int > &positions)
void getSelectedSequenceRowid(const iterator &node, vector< int > &selections)
void clearInternalNodeSelection()
void selectByGI(const AlignmentCollection &aligns, const vector< CRef< CSeq_id > > &gis)
SeqTreeIterator getLeafById(int id)
void fixRowName(AlignmentCollection &aligns, SeqNameMode mode)
void getSequenceComposition(IntToStringMap &seqComposition)
void prepareCollapsedNodes(int &numLeaf)
void updateSeqCounts(const AlignmentCollection &aligns)
void selectNode(const iterator &node, bool select=true, CCdCore *cd=0)
std::string m_longestName
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
sibling_iterator end() const
unsigned int number_of_children() const
sibling_iterator begin() const
sibling_iterator previous_sibling(const iterator_base &) const
sibling_iterator next_sibling(const iterator_base &) const
pre_order_iterator begin() const
pre_order_iterator end() const
Include a standard set of the NCBI C++ Toolkit most basic headers.
ostream & operator<<(ostream &os, const SeqItem &si)
SeqTreeBase::iterator SeqTreeIterator
static const char si[8][64]
static void DLIST_NAME() init(DLIST_LIST_TYPE *list)
#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.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
#define row(bind, expected)
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