NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <objmgr/object_manager.hpp>
#include <objmgr/scope.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <serial/serial.hpp>
#include <serial/objistr.hpp>
#include <serial/objostr.hpp>
#include <algo/phy_tree/phytree_calc.hpp>
#include <algo/phy_tree/phytree_format/phytree_format.hpp>
#include <corelib/test_boost.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
USING_SCOPE (objects) | |
static CRef< CScope > | s_CreateScope (void) |
static bool | s_IsLeaf (const CNode &node) |
static bool | s_TestTreeContainer (const CBioTreeContainer &tree, int num_leaves) |
BOOST_AUTO_TEST_CASE (TestCreateTreeFromCalcProtein) | |
BOOST_AUTO_TEST_CASE (TestCreateTreeFromCalcNucleotide) | |
BOOST_AUTO_TEST_CASE (TestInitTreeFeatures) | |
BOOST_AUTO_TEST_CASE (TestMultipleQueries) | |
BOOST_AUTO_TEST_CASE (TestInitTreeFeaturesWithBadInput) | |
BOOST_AUTO_TEST_CASE (TestInitLabels) | |
BOOST_AUTO_TEST_CASE (TestIsSingleBlastName) | |
BOOST_AUTO_TEST_CASE (TestSimplifyByBlastName) | |
BOOST_AUTO_TEST_CASE (TestFullyExpand) | |
BOOST_AUTO_TEST_CASE (TestExpandCollapse) | |
BOOST_AUTO_TEST_CASE (TestRerootTree) | |
BOOST_AUTO_TEST_CASE (TestShowSubtree) | |
BOOST_AUTO_TEST_CASE (TestPrintTreeNewick) | |
BOOST_AUTO_TEST_CASE (TestPrintTreeNexus) | |
static bool | s_TestFeatureDict (const CFeatureDictSet &dict) |
static bool | s_TestNode (const CNode &node, bool is_leaf) |
Variables | |
USING_NCBI_SCOPE | |
static const int | kNodeId = 2 |
BOOST_AUTO_TEST_CASE | ( | TestCreateTreeFromCalcNucleotide | ) |
Definition at line 87 of file phytree_format_unit_test.cpp.
References CPhyTreeCalc::CalcBioTree(), CSeq_align_Base::GetDim(), CPhyTreeCalc::GetSeqAlign(), MSerial_AsnText, s_CreateScope(), s_TestTreeContainer(), and CPhyTreeCalc::SetMaxDivergence().
BOOST_AUTO_TEST_CASE | ( | TestCreateTreeFromCalcProtein | ) |
Definition at line 71 of file phytree_format_unit_test.cpp.
References CPhyTreeCalc::CalcBioTree(), CSeq_align_Base::GetDim(), CPhyTreeCalc::GetSeqAlign(), MSerial_AsnText, s_CreateScope(), s_TestTreeContainer(), and CPhyTreeCalc::SetMaxDivergence().
BOOST_AUTO_TEST_CASE | ( | TestExpandCollapse | ) |
Definition at line 469 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eNone, CPhyTreeFormatter::eTreeSimplificationTagId, CNodeSet_Base::Get(), CPhyTreeFormatter::GetFeatureTag(), CBioTreeContainer_Base::GetNodes(), ITERATE, kNodeId, MSerial_AsnText, s_CreateScope(), and s_IsLeaf().
BOOST_AUTO_TEST_CASE | ( | TestFullyExpand | ) |
Definition at line 410 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eFullyExpanded, CPhyTreeFormatter::eTreeSimplificationTagId, CNodeSet_Base::Get(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, s_CreateScope(), and s_IsLeaf().
BOOST_AUTO_TEST_CASE | ( | TestInitLabels | ) |
Definition at line 255 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eSeqTitle, CNodeSet_Base::Get(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, s_CreateScope(), s_IsLeaf(), and s_TestTreeContainer().
BOOST_AUTO_TEST_CASE | ( | TestInitTreeFeatures | ) |
Definition at line 103 of file phytree_format_unit_test.cpp.
References CNodeSet_Base::Get(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, s_CreateScope(), s_IsLeaf(), and s_TestTreeContainer().
BOOST_AUTO_TEST_CASE | ( | TestInitTreeFeaturesWithBadInput | ) |
Definition at line 211 of file phytree_format_unit_test.cpp.
References CNodeSet_Base::Get(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, s_CreateScope(), and s_IsLeaf().
BOOST_AUTO_TEST_CASE | ( | TestIsSingleBlastName | ) |
Definition at line 283 of file phytree_format_unit_test.cpp.
References CNodeSet_Base::Get(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, NULL, s_CreateScope(), and CNodeFeature_Base::SetValue().
BOOST_AUTO_TEST_CASE | ( | TestMultipleQueries | ) |
Definition at line 134 of file phytree_format_unit_test.cpp.
References CPhyTreeCalc::CalcBioTree(), CPhyTreeFormatter::eAccessionNbrId, CPhyTreeFormatter::eNodeInfoId, CNodeSet_Base::Get(), CSeq_align_Base::GetDim(), CBioTreeContainer_Base::GetNodes(), CPhyTreeCalc::GetSeqAlign(), ITERATE, CPhyTreeFormatter::kNodeInfoQuery, MSerial_AsnText, s_CreateScope(), s_IsLeaf(), and s_TestTreeContainer().
BOOST_AUTO_TEST_CASE | ( | TestPrintTreeNewick | ) |
Definition at line 571 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eBlastName, CPhyTreeFormatter::eSeqId, CPhyTreeFormatter::eSeqIdAndBlastName, CPhyTreeFormatter::eSeqTitle, CPhyTreeFormatter::eTaxName, MSerial_AsnText, output, and s_CreateScope().
BOOST_AUTO_TEST_CASE | ( | TestPrintTreeNexus | ) |
Definition at line 623 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eBlastName, CPhyTreeFormatter::eSeqId, CPhyTreeFormatter::eSeqIdAndBlastName, CPhyTreeFormatter::eSeqTitle, CPhyTreeFormatter::eTaxName, MSerial_AsnText, NPOS, output, and s_CreateScope().
BOOST_AUTO_TEST_CASE | ( | TestRerootTree | ) |
Definition at line 519 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eSeqTitle, kNodeId, MSerial_AsnText, and s_CreateScope().
BOOST_AUTO_TEST_CASE | ( | TestShowSubtree | ) |
Definition at line 545 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eSeqTitle, kNodeId, MSerial_AsnText, and s_CreateScope().
BOOST_AUTO_TEST_CASE | ( | TestSimplifyByBlastName | ) |
Definition at line 349 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eByBlastName, CPhyTreeFormatter::eTreeSimplificationTagId, CNodeSet_Base::Get(), CPhyTreeFormatter::GetFeatureTag(), CBioTreeContainer_Base::GetNodes(), ITERATE, MSerial_AsnText, and s_CreateScope().
Definition at line 722 of file phytree_format_unit_test.cpp.
References CScope::AddDefaults(), CObjectManager::GetInstance(), and CGBDataLoader::RegisterInObjectManager().
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 806 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eLabelId, CNodeFeatureSet_Base::Get(), CNode_Base::GetFeatures(), and ITERATE.
Referenced by BOOST_AUTO_TEST_CASE(), and s_TestTreeContainer().
|
static |
Definition at line 732 of file phytree_format_unit_test.cpp.
References CPhyTreeFormatter::eAccessionNbrId, CPhyTreeFormatter::eAlignIndexId, CPhyTreeFormatter::eBlastNameId, CPhyTreeFormatter::eCommonNameID, CPhyTreeFormatter::eDistId, CPhyTreeFormatter::eEdgeColorID, CPhyTreeFormatter::eLabelBgColorId, CPhyTreeFormatter::eLabelColorId, CPhyTreeFormatter::eLabelId, CPhyTreeFormatter::eLabelTagColorId, CPhyTreeFormatter::eLastId, CPhyTreeFormatter::eLeafCountId, CPhyTreeFormatter::eNodeColorId, CPhyTreeFormatter::eNodeInfoId, CPhyTreeFormatter::eNodeSizeID, CPhyTreeFormatter::eOrganismId, CPhyTreeFormatter::eSeqIdId, CPhyTreeFormatter::eTitleId, CPhyTreeFormatter::eTreeSimplificationTagId, CFeatureDictSet_Base::Get(), CPhyTreeFormatter::GetFeatureTag(), and ITERATE.
Referenced by s_TestTreeContainer().
Definition at line 816 of file phytree_format_unit_test.cpp.
References color, CPhyTreeFormatter::eDistId, CPhyTreeFormatter::eLabelBgColorId, CPhyTreeFormatter::eLabelColorId, CPhyTreeFormatter::eLastId, CPhyTreeFormatter::eNodeInfoId, CPhyTreeFormatter::eTreeSimplificationTagId, CNodeFeatureSet_Base::Get(), CNode_Base::GetFeatures(), i, ITERATE, and CPhyTreeFormatter::kNodeInfoQuery.
Referenced by s_TestTreeContainer().
|
static |
Definition at line 863 of file phytree_format_unit_test.cpp.
References ITERATE, s_IsLeaf(), s_TestFeatureDict(), and s_TestNode().
Referenced by BOOST_AUTO_TEST_CASE().
USING_SCOPE | ( | objects | ) |
Definition at line 66 of file phytree_format_unit_test.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
USING_NCBI_SCOPE |
Definition at line 52 of file phytree_format_unit_test.cpp.