NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/test_boost.hpp>
#include <corelib/ncbi_limits.hpp>
#include <serial/serial.hpp>
#include <serial/objistr.hpp>
#include <util/random_gen.hpp>
#include <util/math/matrix.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqalign/Score.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/scoremat/Pssm.hpp>
#include <objects/scoremat/PssmParameters.hpp>
#include <objects/scoremat/PssmWithParameters.hpp>
#include <objects/scoremat/PssmFinalData.hpp>
#include <objects/scoremat/PssmIntermediateData.hpp>
#include <objects/scoremat/FormatRpsDbParameters.hpp>
#include <algo/blast/api/blast_aux.hpp>
#include <algo/blast/api/bl2seq.hpp>
#include <algo/blast/api/pssm_engine.hpp>
#include <algo/blast/api/pssm_input.hpp>
#include <algo/blast/api/psi_pssm_input.hpp>
#include <algo/blast/core/blast_setup.h>
#include <blast_objmgr_priv.hpp>
#include <blast_psi_priv.h>
#include <blast_posit.h>
#include "psiblast_aux_priv.hpp"
#include <algo/blast/api/blast_exception.hpp>
#include "blast_test_util.hpp"
#include "pssm_test_util.hpp"
#include <objmgr/util/sequence.hpp>
#include <util/tables/raw_scoremat.h>
#include <objects/seq/seqport_util.hpp>
#include "test_objmgr.hpp"
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | CPssmInputFlankingGaps |
Mock object for the PSSM input data which returns multiple sequence alignment data which has flanking gaps. More... | |
class | CPssmInputGapsInQuery |
Mock object for the PSSM input data which returns a query sequence with a gap in it. More... | |
class | CPssmInputQueryLength0 |
Mock object for the PSSM input data which returns a query sequence with a gap in it. More... | |
class | CNullPssmInput |
Mock object for the PSSM input data which returns NULLs for all its methods. More... | |
class | CPssmInputUnsupportedMatrix |
class | CPssmInputTestData |
Mock object for the PSSM input data which can be configured to have different combinations of aligned sequences. More... | |
Macros | |
#define | GAP_IN_ALIGNMENT -1 |
Functions | |
BOOST_AUTO_TEST_CASE (testFullPssmEngineRunWithDiagnosticsRequest) | |
BOOST_AUTO_TEST_CASE (testSeqAlignToPsiBlastMultipleSequenceAlignment) | |
BOOST_AUTO_TEST_CASE (testPurgeSequencesWithNull) | |
Unit test the individual stages of the PSSM creation algorithm (core layer): 1. More... | |
BOOST_AUTO_TEST_CASE (testPurgeSelfHit) | |
BOOST_AUTO_TEST_CASE (testPurgeDuplicateHit) | |
BOOST_AUTO_TEST_CASE (testPurgeNearIdenticalHits) | |
BOOST_AUTO_TEST_CASE (testQueryAlignedWithInternalGaps) | |
BOOST_AUTO_TEST_CASE (testMultiSeqAlignmentHasRegionsUnalignedToQuery) | |
BOOST_AUTO_TEST_CASE (testQueryIsOnlyAlignedSequenceInMsa) | |
test the case when only a segment of the query sequence is the only aligned sequence in the multiple sequence alignment. More... | |
BOOST_AUTO_TEST_CASE (testRejectFlankingGaps) | |
BOOST_AUTO_TEST_CASE (testRejectGapInQuery) | |
BOOST_AUTO_TEST_CASE (testRejectQueryLength0) | |
BOOST_AUTO_TEST_CASE (testRejectNullPssmInputData) | |
BOOST_AUTO_TEST_CASE (testRejectNullsReturnedByPssmInput) | |
BOOST_AUTO_TEST_CASE (testRejectUnsupportedMatrix) | |
BOOST_AUTO_TEST_CASE (testPsiAlignmentDataCreation_TooMuchMemory) | |
BOOST_AUTO_TEST_CASE (testPsiLowerCaseMatrix) | |
#define GAP_IN_ALIGNMENT -1 |
BOOST_AUTO_TEST_CASE | ( | testFullPssmEngineRunWithDiagnosticsRequest | ) |
Definition at line 571 of file pssmcreate_unit_test.cpp.
References BLASTAA_SIZE, SBlastSequence::data, data, eBlastEncodingProtein, eSerial_AsnText, PSIDiagnosticsRequest::frequency_ratios, PSIDiagnosticsRequest::gapless_column_weights, AutoPtr< X, Del >::get(), CSeq_descr_Base::Get(), CBioseq_Base::GetDescr(), CPssmIntermediateData_Base::GetFreqRatios(), CPssm_Base::GetIntermediateData(), CBioseq::GetLength(), CPssmWithParameters_Base::GetPssm(), CPssmIntermediateData_Base::GetResFreqsPerPos(), GetSequence(), CPssmIntermediateData_Base::GetWeightedResFreqsPerPos(), in(), PSIDiagnosticsRequest::information_content, CTestObjMgr::Instance(), PSIDiagnosticsRequest::interval_sizes, CBioseq_Base::IsSetDescr(), ITERATE, kTitle, SBlastSequence::length, NcbiEmptyString, PSIDiagnosticsRequest::num_matching_seqs, CObjectIStream::Open(), PSIBlastOptionsNew(), PSIDiagnosticsRequest::residue_frequencies, PSIDiagnosticsRequest::sigma, and PSIDiagnosticsRequest::weighted_residue_frequencies.
BOOST_AUTO_TEST_CASE | ( | testMultiSeqAlignmentHasRegionsUnalignedToQuery | ) |
Definition at line 867 of file pssmcreate_unit_test.cpp.
References _PSIAlignedBlockNew(), _PSIComputeAlignmentBlocks(), _PSIComputeFreqRatios(), _PSIComputeSequenceWeights(), _PSIConvertFreqRatiosToPSSM(), _PSIInternalPssmDataNew(), _PSIMsaNew(), _PSIPackedMsaNew(), _PSIPurgeBiasedSegments(), _PSIScaleMatrix(), _PSISequenceWeightsNew(), BlastScoreBlk::alphabet_size, AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, BLASTAA_SIZE, CPssmInputTestData::eMsaHasUnalignedRegion, AutoPtr< X, Del >::get(), TestUtil::GetResidue(), i, InitializeBlastScoreBlk(), int, NStr::IntToString(), kQueryIndex, NCBISM_Blosum62, NCBISM_GetScore(), PSIBlastOptions::nsg_compatibility_mode, PSIBlastOptions::pseudo_count, PSI_SUCCESS, PSIBlastOptionsNew(), CBlastScoreBlk::Reset(), NStr::SizetToString(), U, CPssmCreateTestFixture::x_ErrorCodeToString(), and CPssmCreateTestFixture::x_GuardProteinQuery().
BOOST_AUTO_TEST_CASE | ( | testPsiAlignmentDataCreation_TooMuchMemory | ) |
Definition at line 1231 of file pssmcreate_unit_test.cpp.
References max(), NULL, and PSIMsaNew().
BOOST_AUTO_TEST_CASE | ( | testPsiLowerCaseMatrix | ) |
Definition at line 1239 of file pssmcreate_unit_test.cpp.
References _PSIMatrixFrequencyRatiosFree(), _PSIMatrixFrequencyRatiosNew(), and NULL.
BOOST_AUTO_TEST_CASE | ( | testPurgeDuplicateHit | ) |
Definition at line 774 of file pssmcreate_unit_test.cpp.
References _PSIPackedMsaNew(), _PSIPurgeBiasedSegments(), CPssmInputTestData::eDuplicateHit, AutoPtr< X, Del >::get(), kQueryIndex, and PSI_SUCCESS.
BOOST_AUTO_TEST_CASE | ( | testPurgeNearIdenticalHits | ) |
Definition at line 787 of file pssmcreate_unit_test.cpp.
References _PSIPackedMsaNew(), _PSIPurgeBiasedSegments(), CPssmInputTestData::eNearIdenticalHits, AutoPtr< X, Del >::get(), kQueryIndex, and PSI_SUCCESS.
BOOST_AUTO_TEST_CASE | ( | testPurgeSelfHit | ) |
Definition at line 762 of file pssmcreate_unit_test.cpp.
References _PSIPackedMsaNew(), _PSIPurgeBiasedSegments(), CPssmInputTestData::eSelfHit, AutoPtr< X, Del >::get(), kQueryIndex, and PSI_SUCCESS.
BOOST_AUTO_TEST_CASE | ( | testPurgeSequencesWithNull | ) |
Unit test the individual stages of the PSSM creation algorithm (core layer): 1.
purged biased sequences
Definition at line 757 of file pssmcreate_unit_test.cpp.
References _PSIPurgeBiasedSegments(), NULL, and PSIERR_BADPARAM.
BOOST_AUTO_TEST_CASE | ( | testQueryAlignedWithInternalGaps | ) |
Definition at line 801 of file pssmcreate_unit_test.cpp.
References AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, CPssmInputTestData::eQueryAlignedWithInternalGaps, CPssm_Base::GetNumColumns(), CPssm_Base::GetNumRows(), CPssmWithParameters_Base::GetPssm(), TestUtil::GetResidue(), CScorematPssmConverter::GetScores(), i, int, NStr::IntToString(), NCBISM_Blosum62, NCBISM_GetScore(), and CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | testQueryIsOnlyAlignedSequenceInMsa | ) |
test the case when only a segment of the query sequence is the only aligned sequence in the multiple sequence alignment.
The scores in the PSSM should be based on the underlying scoring matrix
Definition at line 1066 of file pssmcreate_unit_test.cpp.
References _PSIAlignedBlockNew(), _PSIComputeAlignmentBlocks(), _PSIComputeFreqRatios(), _PSIComputeSequenceWeights(), _PSIConvertFreqRatiosToPSSM(), _PSIInternalPssmDataNew(), _PSIMsaNew(), _PSIPackedMsaNew(), _PSIPurgeBiasedSegments(), _PSIScaleMatrix(), _PSISequenceWeightsNew(), BlastScoreBlk::alphabet_size, AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, BLASTAA_SIZE, CPssmInputTestData::eSelfHit, AutoPtr< X, Del >::get(), TestUtil::GetResidue(), i, InitializeBlastScoreBlk(), int, NStr::IntToString(), kQueryIndex, NCBISM_Blosum62, NCBISM_GetScore(), PSIBlastOptions::nsg_compatibility_mode, PSIBlastOptions::pseudo_count, PSI_SUCCESS, PSIBlastOptionsNew(), CBlastScoreBlk::Reset(), TRUE, CPssmCreateTestFixture::x_ErrorCodeToString(), and CPssmCreateTestFixture::x_GuardProteinQuery().
BOOST_AUTO_TEST_CASE | ( | testRejectFlankingGaps | ) |
Definition at line 1196 of file pssmcreate_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | testRejectGapInQuery | ) |
Definition at line 1202 of file pssmcreate_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | testRejectNullPssmInputData | ) |
Definition at line 1213 of file pssmcreate_unit_test.cpp.
References NULL.
BOOST_AUTO_TEST_CASE | ( | testRejectNullsReturnedByPssmInput | ) |
Definition at line 1218 of file pssmcreate_unit_test.cpp.
BOOST_AUTO_TEST_CASE | ( | testRejectQueryLength0 | ) |
Definition at line 1208 of file pssmcreate_unit_test.cpp.
BOOST_AUTO_TEST_CASE | ( | testRejectUnsupportedMatrix | ) |
Definition at line 1223 of file pssmcreate_unit_test.cpp.
BOOST_AUTO_TEST_CASE | ( | testSeqAlignToPsiBlastMultipleSequenceAlignment | ) |
Definition at line 648 of file pssmcreate_unit_test.cpp.
References AMINOACID_TO_NCBISTDAA, BLAST_EXPECT_VALUE, SBlastSequence::data, eBlastEncodingProtein, eBlastp, FALSE, GAP_IN_ALIGNMENT, Get(), AutoPtr< X, Del >::get(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CPssmCreateTestFixture::GetNumAlignedSequences(), CDense_seg_Base::GetNumseg(), GetSequence(), CDense_seg_Base::GetStarts(), i, PSIBlastOptions::inclusion_ethresh, CTestObjMgr::Instance(), PSIMsaCell::is_aligned, ITERATE, SBlastSequence::length, PSIMsaCell::letter, letter(), PSIBlastOptionsNew(), CBl2Seq::Run(), PSIBlastOptions::use_best_alignment, and CPssmCreateTestFixture::x_GetSubjectSequence().