NCBI C++ ToolKit
phylo_tree_reader.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: phylo_tree_reader.cpp 46270 2021-03-01 15:26:09Z grichenk $
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: Vladimir Tereshkov
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
38 
39 
46 #include <objects/biotree/Node.hpp>
47 
48 
51 
53 {
54  m_Phylip =
55  "(((AARNA01:0.42141,PARMTCY2A:0.42859):0.01269,(((A11516:0.35378,A00224:0.40813):0.03876,G00415:0.44313):0.00819, \
56  (((A05242:0.37704,G00417:0.42851):0.02126,G00425:0.46138):0.00757,G01327:0.47940):0.00264):0.00301):0.00114, \
57  ((((A09942:0.45435,E13931:0.44688):0.01066,((((A11520:0.34307,G00995:0.41369):0.02900,A05245:0.44051):0.00650,AB018544:0.43895):0.00326, \
58  ((A01530:0.36232,G00409:0.40512):0.03619,G00413:0.44599):0.00492):0.00252):0.00456,G00427:0.45501):0.00319, \
59  (((A11518:0.33086,AF063588:0.42524):0.02579,A00660:0.44207):0.01143, \
60  ((((A11522:0.30733,HSNCOL4:0.35933):0.04586,G00419:0.43999):0.00819,G00423:0.44750):0.00630, \
61  ((A12565:0.39548,E12148:0.42644):0.01696,G00847:0.45553):0.00696):0.00154):0.00323):0.00097,G00411:0.46818);";
62 }
63 
64 
66 {
67  m_Phylip = str;
68 }
69 
71 {
72 }
73 
75 {
76  CNcbiIstrstream stream(m_Phylip);
77 
78  unique_ptr<TPhyTreeNode> tree(ReadNewickTree(stream));
80 
81  return btc.GetObject();
82 }
83 
84 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Things for representing and manipulating bio trees.
CConstRef –.
Definition: ncbiobj.hpp:1266
virtual const CBioTreeContainer & GetTree(void)
CRef< objects::CBioTreeContainer > MakeBioTreeContainer(const TPhyTreeNode *tree)
Conversion from TPhyTreeNode to CBioTreeContainer.
static const char * str(char *buf, int n)
Definition: stats.c:84
TObjectType & GetObject(void) const
Get object.
Definition: ncbiobj.hpp:1697
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
TPhyTreeNode * ReadNewickTree(CNcbiIstream &is)
Newick format input.
USING_SCOPE(objects)
Modified on Tue Jul 23 17:56:52 2024 by modify_doxy.py rev. 669887