NCBI C++ ToolKit
taxonomy_tree.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: taxonomy_tree.hpp 33815 2007-05-04 17:18:18Z kazimird $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Authors: Paul Thiessen
27 *
28 * File Description:
29 * taxonomy tree stuff
30 *
31 * ===========================================================================
32 */
33 
34 #ifndef CN3D_TAXONOMY_TREE__HPP
35 #define CN3D_TAXONOMY_TREE__HPP
36 
37 #include <corelib/ncbistd.hpp>
38 
41 
42 #include <list>
43 #include <map>
44 
45 class wxFrame;
46 
47 
48 BEGIN_SCOPE(Cn3D)
49 
51 class Sequence;
52 class MoleculeIdentifier;
53 class TaxonomyWindow;
54 
56 {
57 public:
58  TaxonomyTree(void);
59  ~TaxonomyTree(void);
60 
61  void ShowTreeForAlignment(wxFrame *parent,
62  const BlockMultipleAlignment *alignment, bool abbreviated);
63 
64 private:
65  // cached taxid's by identifier
66  typedef std::map < const MoleculeIdentifier * , int > TaxonomyIDMap;
68 
69  // cached taxonomy info by taxid
70  typedef std::map < int , ncbi::CRef < ncbi::objects::CTaxon2_data > > TaxonomyInfoMap;
72 
73  // cached taxid parents (child->parent)
74  typedef std::map < int , int > TaxonomyParentMap;
76 
77  // taxonomy server class
78  ncbi::objects::CTaxon1 taxonomyServer;
79 
80  // init server connection if not already established
81  bool Init(void);
82 
83  // tool windows
84  typedef std::list < TaxonomyWindow ** > TaxonomyWindowList;
86 
87  // get integer taxid for a sequence
88  int GetTaxIDForSequence(const Sequence *seq);
89 
90  // get info for taxid
91  const ncbi::objects::CTaxon2_data * GetTaxInfoForTaxID(int taxid);
92 
93  // get parent for taxid
94  int GetParentTaxID(int taxid);
95 };
96 
97 END_SCOPE(Cn3D)
98 
99 #endif // CN3D_TAXONOMY_TREE__HPP
User-defined methods of the data storage class.
int GetTaxIDForSequence(const Sequence *seq)
bool Init(void)
int GetParentTaxID(int taxid)
ncbi::objects::CTaxon1 taxonomyServer
std::list< TaxonomyWindow ** > TaxonomyWindowList
std::map< const MoleculeIdentifier *, int > TaxonomyIDMap
std::map< int, int > TaxonomyParentMap
std::map< int, ncbi::CRef< ncbi::objects::CTaxon2_data > > TaxonomyInfoMap
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)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
Modified on Tue Apr 30 06:40:15 2024 by modify_doxy.py rev. 669887