A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/taxonomy__tree_8cpp_source.html below:

NCBI C++ ToolKit: src/app/cn3d/taxonomy_tree.cpp Source File

46 #include <wx/msw/winundef.h> 49 #include <wx/treectrl.h> 52 #if defined(__WXGTK__) || defined(__WXMAC__) 53  #include "cn3d42App.xpm" 81  void

OnActivate(wxTreeEvent& event);

99

wxFrame(parent, -1, "Taxonomy Tree", wxPoint(75,75), wxSize(400,400),

100

wxDEFAULT_FRAME_STYLE

101 #if defined(__WXMSW__) 102

| wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT

108  tree

=

new

wxTreeCtrl(

this

, -1, wxPoint(0,0), GetClientSize());

109

SetIcon(wxICON(cn3d));

118 static void ExpandAll

(wxTreeCtrl&

tree

,

const

wxTreeItemId&

id

,

bool

shouldExpand,

int

toLevel)

120  if

(toLevel == 0 || !

tree

.ItemHasChildren(

id

))

return

;

123  bool

isExpanded =

tree

.IsExpanded(

id

);

124  if

(shouldExpand && !isExpanded)

126  else if

(!shouldExpand && isExpanded)

127  tree

.Collapse(

id

);

130

wxTreeItemIdValue cookie = &

tree

;

131  for

(wxTreeItemId child=

tree

.GetFirstChild(

id

, cookie); child.IsOk(); child=

tree

.GetNextChild(

id

, cookie))

137  const

wxTreeItemId& itemID =

event

.GetItem();

138  bool

keyActivated = (

event

.GetPoint().x == 0 &&

event

.GetPoint().y == 0);

139  bool

hasChildren =

tree

->ItemHasChildren(itemID);

141  if

(keyActivated && hasChildren) {

146  else if

(!keyActivated && !hasChildren) {

169  INFOMSG

(

"taxonomy server connection initialized"

);

171  ERRORMSG

(

"Unable to initialize taxonomy server!"

);

182

(**w)->handle =

NULL

;

214

wxString name(s->first->identifier->ToString().c_str());

217

name.Printf(

"%s (x%i)"

,

tmp

.c_str(), s->second);

219  const

wxTreeItemId& child =

tree

->AppendItem(

id

, name);

229

wxString name = childNode->

name

.c_str();

234  if

(childNode->

name

!= name.c_str())

235

name += wxString(

" . . . "

) + childNode->

name

.c_str();

239

wxTreeItemId childId =

tree

->AppendItem(

id

, name);

280  if

(!taxData)

continue

;

286  if

(parent == 0)

break

;

289  AddNode

(&taxTree, seq, taxid, taxData, parent);

296  if

(!taxData)

break

;

300

taxTree[1].name =

"Global Root"

;

301  TRACEMSG

(

"apparent # leaves in tree: "

<< taxTree[1].nDescendentLeaves);

304  INFOMSG

(

"deepest node containing all leaves: "

<< node->

name

);

313

window->Show(

true

);

325  if

(!

Init

())

return

0;

327  string

err =

"no gi or source info"

;

338  if

(taxid == 0 && seq->

bioseqASN

->IsSetDescr()) {

339

CBioseq::TDescr::Tdata::const_iterator d, de = seq->

bioseqASN

->GetDescr().Get().end();

340  for

(d=seq->

bioseqASN

->GetDescr().Get().begin(); d!=de; ++d) {

343

org = &((*d)->GetOrg());

344  else if

((*d)->IsSource())

345

org = &((*d)->GetSource().GetOrg());

358

<<

"; reason: "

<< err);

368

TaxonomyInfoMap::const_iterator

i

=

taxonomyInfo

.find(taxid);

377  WARNINGMSG

(

"Unable to get taxonomy data for taxid "

<< taxid

382  return data

.GetPointer();

392  if

(!

Init

())

return

0;

397  WARNINGMSG

(

"Unable to get parent for taxid "

<< taxid

const Sequence * GetSequenceOfRow(unsigned int row) const

unsigned int NRows(void) const

void HighlightAndShowSequence(const Sequence *sequence)

std::string ToString(void) const

static const TGi GI_NOT_SET

NodeData(const Sequence *s)

const Sequence * sequence

const MoleculeIdentifier * identifier

CConstRef< objects::CBioseq > bioseqASN

map< int, bool > ChildTaxIDMap

map< const Sequence *, int > SequenceMap

ChildTaxIDMap childTaxids

int GetTaxIDForSequence(const Sequence *seq)

int GetParentTaxID(int taxid)

ncbi::objects::CTaxon1 taxonomyServer

TaxonomyWindowList taxonomyWindows

TaxonomyIDMap taxonomyIDs

TaxonomyInfoMap taxonomyInfo

TaxonomyParentMap taxonomyParents

const ncbi::objects::CTaxon2_data * GetTaxInfoForTaxID(int taxid)

void ShowTreeForAlignment(wxFrame *parent, const BlockMultipleAlignment *alignment, bool abbreviated)

void OnActivate(wxTreeEvent &event)

container_type::const_iterator const_iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_SCOPE(ns)

Define a new scope.

const TTaxname & GetTaxname(void) const

Get the Taxname member data.

bool IsSetTaxname(void) const

preferred formal name Check if a value has been assigned to Taxname data member.

bool IsSetOrg(void) const

Org-ref with Org-name and db filled in Check if a value has been assigned to Org data member.

const TOrg & GetOrg(void) const

Get the Org member data.

Messenger * GlobalMessenger(void)

#define row(bind, expected)

static void ExpandAll(wxTreeCtrl &tree, const wxTreeItemId &id, bool shouldExpand, int toLevel)

static void AppendChildrenToTree(wxTreeCtrl *tree, const TaxonomyTreeMap &treeMap, const TaxonomyTreeNode &node, const wxTreeItemId id, bool abbreviated)

static void AddNode(TaxonomyTreeMap *taxTree, const Sequence *seq, int taxid, const CTaxon2_data *taxData, int parent)

map< int, TaxonomyTreeNode > TaxonomyTreeMap


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