NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbiapp.hpp>
#include <corelib/test_boost.hpp>
#include <serial/objistr.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/general/Object_id.hpp>
#include <objtools/alnmgr/aln_user_options.hpp>
#include <objtools/alnmgr/aln_asn_reader.hpp>
#include <objtools/alnmgr/aln_container.hpp>
#include <objtools/alnmgr/aln_tests.hpp>
#include <objtools/alnmgr/aln_stats.hpp>
#include <objtools/alnmgr/pairwise_aln.hpp>
#include <objtools/alnmgr/aln_serial.hpp>
#include <objtools/alnmgr/sparse_aln.hpp>
#include <objtools/alnmgr/aln_converters.hpp>
#include <objtools/alnmgr/aln_builders.hpp>
#include <objtools/alnmgr/sparse_ci.hpp>
#include <objtools/alnmgr/aln_generators.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <objmgr/object_manager.hpp>
#include <objmgr/scope.hpp>
#include <common/test_assert.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
USING_SCOPE (objects) | |
NCBITEST_INIT_CMDLINE (descrs) | |
bool | DumpExpected (void) |
bool | Verbose (void) |
CScope & | GetScope (void) |
size_t | LoadAligns (CNcbiIstream &in, CAlnContainer &aligns, size_t limit=0) |
CRef< TScopeAlnStats > | InitAlnStats (const CAlnContainer &aligns, unique_ptr< TScopeAlnIdMap > &aln_id_map) |
void | CheckPairwiseAln (CNcbiIstream &in_exp, const CPairwiseAln &pw, size_t aln_idx, int anchor, int row) |
void | CheckSparseAln (CNcbiIstream &in_exp, const CSparseAln &sparse, bool check_sequence) |
BOOST_AUTO_TEST_CASE (s_TestLoadAlign) | |
BOOST_AUTO_TEST_CASE (s_TestPairwiseAln) | |
BOOST_AUTO_TEST_CASE (s_TestPairwiseAlnRanged) | |
BOOST_AUTO_TEST_CASE (s_TestAnchoredAln) | |
BOOST_AUTO_TEST_CASE (s_TestAnchoredAlnBuilt) | |
BOOST_AUTO_TEST_CASE (s_TestSparseAlnCoords) | |
BOOST_AUTO_TEST_CASE (s_TestSparseAlnData) | |
BOOST_AUTO_TEST_CASE (s_TestAlnTypes) | |
Variables | |
USING_NCBI_SCOPE | |
BOOST_AUTO_TEST_CASE | ( | s_TestAlnTypes | ) |
Definition at line 964 of file unit_test_alnmgr.cpp.
References CheckPairwiseAln(), CreateAnchoredAlnFromAln(), DumpExpected(), CAnchoredAln::GetAnchorRow(), CAnchoredAln::GetPairwiseAlns(), InitAlnStats(), int, LoadAligns(), row, and CAlnContainer::size().
BOOST_AUTO_TEST_CASE | ( | s_TestAnchoredAln | ) |
Definition at line 688 of file unit_test_alnmgr.cpp.
References CheckPairwiseAln(), CreateAnchoredAlnFromAln(), DumpExpected(), CAnchoredAln::GetAnchorRow(), CAnchoredAln::GetPairwiseAlns(), InitAlnStats(), int, LoadAligns(), row, and CAlnContainer::size().
BOOST_AUTO_TEST_CASE | ( | s_TestAnchoredAlnBuilt | ) |
Definition at line 726 of file unit_test_alnmgr.cpp.
References BuildAln(), CheckPairwiseAln(), CreateAnchoredAlnVec(), DumpExpected(), CAlnUserOptions::fAllowTranslocation, CAlnUserOptions::fAnchorRowFirst, CAlnUserOptions::fIgnoreInsertions, CAlnUserOptions::fTruncateOverlaps, CAlnUserOptions::fUseAnchorAsAlnSeq, CAnchoredAln::GetAnchorRow(), CAnchoredAln::GetPairwiseAlns(), InitAlnStats(), int, LoadAligns(), CAlnUserOptions::m_MergeFlags, Ref(), row, CAlnUserOptions::SetAnchorId(), and Verbose().
BOOST_AUTO_TEST_CASE | ( | s_TestLoadAlign | ) |
Definition at line 431 of file unit_test_alnmgr.cpp.
References DumpExpected(), variation::Equals(), InitAlnStats(), ITERATE, LoadAligns(), and MSerial_AsnText.
BOOST_AUTO_TEST_CASE | ( | s_TestPairwiseAln | ) |
Definition at line 479 of file unit_test_alnmgr.cpp.
References CheckPairwiseAln(), ConvertSeqAlignToPairwiseAln(), DumpExpected(), CPairwise_CI::eAligned, CAlnUserOptions::eBothDirections, CAlignRangeCollectionList< CAlignRange< TSignedSeqPos > >::fDefaultPolicy, InitAlnStats(), LoadAligns(), and row.
BOOST_AUTO_TEST_CASE | ( | s_TestPairwiseAlnRanged | ) |
Definition at line 556 of file unit_test_alnmgr.cpp.
References CAlignRangeCollectionList< TAlnRange >::begin(), ConvertSeqAlignToPairwiseAln(), DumpExpected(), CPairwise_CI::eAligned, CAlnUserOptions::eBothDirections, CAlignRangeCollectionList< CAlignRange< TSignedSeqPos > >::fDefaultPolicy, flags, CPairwiseAln::GetFirstBaseWidth(), CAlignRangeCollectionList< TAlnRange >::GetFirstFrom(), CPairwiseAln::GetFirstId(), CAlignRangeCollectionList< TAlnRange >::GetFirstTo(), CAlignRangeCollectionList< TAlnRange >::GetFlags(), CPairwiseAln::GetSecondBaseWidth(), CPairwiseAln::GetSecondId(), CAlignRangeCollectionList< TAlnRange >::GetSecondPosByFirstPos(), InitAlnStats(), LoadAligns(), MSerial_AsnText, CAlignRangeCollectionList< TAlnRange >::rbegin(), row, CAlignRangeCollectionList< TAlnRange >::size(), and Verbose().
BOOST_AUTO_TEST_CASE | ( | s_TestSparseAlnCoords | ) |
Definition at line 811 of file unit_test_alnmgr.cpp.
References BuildAln(), CheckSparseAln(), CreateAnchoredAlnVec(), DumpExpected(), CAlnUserOptions::fTruncateOverlaps, GetScope(), InitAlnStats(), LoadAligns(), CAlnUserOptions::m_MergeFlags, MSerial_AsnText, Ref(), CAlnUserOptions::SetAnchorId(), and Verbose().
BOOST_AUTO_TEST_CASE | ( | s_TestSparseAlnData | ) |
Definition at line 882 of file unit_test_alnmgr.cpp.
References BuildAln(), CheckSparseAln(), CreateAnchoredAlnVec(), CreateSeqAlignFromAnchoredAln(), DumpExpected(), CSeq_align_Base::C_Segs::e_Denseg, CSerialObject::Equals(), CAlnUserOptions::fTruncateOverlaps, GetScope(), InitAlnStats(), LoadAligns(), CAlnUserOptions::m_MergeFlags, MSerial_AsnText, Ref(), CAlnUserOptions::SetAnchorId(), and Verbose().
void CheckPairwiseAln | ( | CNcbiIstream & | in_exp, |
const CPairwiseAln & | pw, | ||
size_t | aln_idx, | ||
int | anchor, | ||
int | row | ||
) |
Definition at line 142 of file unit_test_alnmgr.cpp.
References DumpExpected(), flags, CPairwiseAln::GetFirstBaseWidth(), CAlignRangeCollectionList< TAlnRange >::GetFirstFrom(), CAlignRange< Position >::GetFirstFrom(), CPairwiseAln::GetFirstId(), CAlignRangeCollectionList< TAlnRange >::GetFirstTo(), CAlignRangeCollectionList< TAlnRange >::GetFlags(), CAlignRangeCollectionList< TAlnRange >::GetInsertions(), CPairwiseAln::GetSecondBaseWidth(), CPairwiseAln::GetSecondId(), CAlignRangeCollectionList< TAlnRange >::GetSecondPosByFirstPos(), CAlignRange< Position >::IsDirect(), ITERATE, len, MSerial_AsnText, row, and Verbose().
Referenced by BOOST_AUTO_TEST_CASE().
void CheckSparseAln | ( | CNcbiIstream & | in_exp, |
const CSparseAln & | sparse, | ||
bool | check_sequence | ||
) |
Definition at line 253 of file unit_test_alnmgr.cpp.
References CSparseAln::AlnRangeToNativeSeqRange(), DumpExpected(), IAlnSegmentIterator::eAllSegments, COpenRange< Position >::Empty(), CSparseAln::GetAlnRange(), IAlnSegment::GetAlnRange(), CSparseAln::GetAlnSeqString(), CSparseAln::GetAnchor(), CSparseAln::GetBaseWidth(), CSparseAln::GetDim(), CRange_Base::GetFrom(), CSparseAln::GetNumRows(), IAlnSegment::GetRange(), CSparseAln::GetSeqAlnStart(), CSparseAln::GetSeqAlnStop(), CSparseAln::GetSeqId(), CSparseAln::GetSeqRange(), CSparseAln::GetSeqString(), CRange_Base::GetTo(), IAlnSegment::GetType(), COpenRange< TSeqPos >::GetWhole(), COpenRange< TSignedSeqPos >::GetWhole(), MSerial_AsnText, row, and Verbose().
Referenced by BOOST_AUTO_TEST_CASE().
bool DumpExpected | ( | void | ) |
Definition at line 74 of file unit_test_alnmgr.cpp.
References CNcbiApplicationAPI::GetArgs(), and CNcbiApplication::Instance().
Referenced by BOOST_AUTO_TEST_CASE(), CheckPairwiseAln(), and CheckSparseAln().
CScope& GetScope | ( | void | ) |
Definition at line 86 of file unit_test_alnmgr.cpp.
References CScope::AddDefaults(), CObjectManager::GetInstance(), CGBDataLoader::RegisterInObjectManager(), and CRef< C, Locker >::Reset().
Referenced by BOOST_AUTO_TEST_CASE(), and InitAlnStats().
CRef<TScopeAlnStats> InitAlnStats | ( | const CAlnContainer & | aligns, |
unique_ptr< TScopeAlnIdMap > & | aln_id_map | ||
) |
Definition at line 128 of file unit_test_alnmgr.cpp.
References GetScope(), ITERATE, and CAlnContainer::size().
Referenced by BOOST_AUTO_TEST_CASE().
size_t LoadAligns | ( | CNcbiIstream & | in, |
CAlnContainer & | aligns, | ||
size_t | limit = 0 |
||
) |
Definition at line 104 of file unit_test_alnmgr.cpp.
References in(), CAlnContainer::insert(), MSerial_AsnText, and CSeq_align::Validate().
Referenced by BOOST_AUTO_TEST_CASE().
NCBITEST_INIT_CMDLINE | ( | descrs | ) |
Definition at line 67 of file unit_test_alnmgr.cpp.
USING_SCOPE | ( | objects | ) |
bool Verbose | ( | void | ) |
Definition at line 80 of file unit_test_alnmgr.cpp.
References CNcbiApplicationAPI::GetArgs(), and CNcbiApplication::Instance().
Referenced by BOOST_AUTO_TEST_CASE(), CheckPairwiseAln(), and CheckSparseAln().
USING_NCBI_SCOPE |
Definition at line 62 of file unit_test_alnmgr.cpp.