NCBI C++ ToolKit
|
Unit test module for creation of PSSMs from multiple alignments of conserved domains. More...
#include <ncbi_pch.hpp>
#include <corelib/test_boost.hpp>
#include <serial/serial.hpp>
#include <serial/objistr.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/Bioseq.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 <algo/blast/api/pssm_engine.hpp>
#include <algo/blast/api/pssm_input.hpp>
#include <algo/blast/api/cdd_pssm_input.hpp>
#include <algo/blast/api/rps_aux.hpp>
#include <blast_objmgr_priv.hpp>
#include <blast_psi_priv.h>
#include "psiblast_aux_priv.hpp"
#include "blast_test_util.hpp"
#include "pssm_test_util.hpp"
#include "test_objmgr.hpp"
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | CPssmCddInputTest |
Class for testing methods of CCddInputData class. More... | |
class | CPssmInputWithNoCDs |
Simple PSSM computation strategy with one CD. More... | |
class | CPssmInputWithSingleCD |
Simple PSSM computation strategy with one CD. More... | |
class | CPssmInputWithTwoCDs |
Simple PSSM computation strategy with two CDs. More... | |
class | CPssmInputWithGapsInQuery |
PSSM computation strategy with gaps in query. More... | |
class | CPssmInputWithNegativeFreqs |
PSSM computation strategy with domains with negative residue frequencies. More... | |
class | CPssmInputWithUnnormalizedFreqs |
PSSM computation strategy with domains with frequencies that do not sum to 1. More... | |
class | CPssmInputWithZeroObservations |
PSSM computation strategy with domains with zero observations. More... | |
Macros | |
#define | BLAST_SECONDARY_SOURCE 1 |
Functions | |
static void | s_TestCreatePssmFromFreqs (const PSICdMsa *cd_msa, CBlastScoreBlk &sbp, const PSIBlastOptions *opts, AutoPtr< _PSISequenceWeights > &seq_weights) |
BOOST_AUTO_TEST_CASE (TestCreatePssmFromSingleCd) | |
BOOST_AUTO_TEST_CASE (TestCreatePssmFromMultipleCds) | |
BOOST_AUTO_TEST_CASE (TestCreatePssmFromNoCds) | |
BOOST_AUTO_TEST_CASE (TestRejectGapsInQuery) | |
BOOST_AUTO_TEST_CASE (TestRejectDomainsWithNegativeFreqs) | |
BOOST_AUTO_TEST_CASE (TestRejectDomainsWithUnnormalizedFreqs) | |
BOOST_AUTO_TEST_CASE (TestRejectDomainsWithZeroObservations) | |
BOOST_AUTO_TEST_CASE (TestRejectNullInput) | |
BOOST_AUTO_TEST_CASE (TestConvertSeqalignToCdMsa) | |
BOOST_AUTO_TEST_CASE (TestDuplicateCdHits) | |
BOOST_AUTO_TEST_CASE (TestFullPssmEngineRunWithDiagnosticsRequest) | |
BOOST_AUTO_TEST_CASE (TestInternalGapsInSubject) | |
BOOST_AUTO_TEST_CASE (TestNoDomainHits) | |
Variables | |
static const string | kQueryId = "gi|129295" |
Query id used for tests. More... | |
static const string | kSubjectId = "gnl|CDD|29117" |
Domain subject id used for tests (present in test CDD) More... | |
Unit test module for creation of PSSMs from multiple alignments of conserved domains.
Definition in file pssmcreate_cdd_unit_test.cpp.
#define BLAST_SECONDARY_SOURCE 1 |
Definition at line 36 of file pssmcreate_cdd_unit_test.cpp.
BOOST_AUTO_TEST_CASE | ( | TestConvertSeqalignToCdMsa | ) |
Definition at line 507 of file pssmcreate_cdd_unit_test.cpp.
References abs, PSICdMsaCell::data, SBlastSequence::data, data, PSICdMsa::dimensions, eBlastEncodingProtein, CSeqDB::eProtein, eSerial_AsnText, CBlastRPSInfo::fDeltaBlast, AutoPtr< X, Del >::get(), CSeq_align_set_Base::Get(), CPssmCddInputTest::GetAlphabetSize(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CPssmCddInputTest::GetMsaSize(), CDense_seg_Base::GetNumseg(), CPssmCddInputTest::GetProfilesDataScale(), CDense_seg::GetSeq_id(), GetSequence(), CDense_seg_Base::GetStarts(), CPssmCddInputTest::GetSubjectMsaIndex(), i, in(), CTestObjMgr::Instance(), int, PSICdMsaCell::is_aligned, ITERATE, kAlphabetSize, kScale, SBlastSequence::length, PSICdMsa::msa, BlastRPSProfileHeader::num_profiles, PSIMsaDimensions::num_seqs, CObjectIStream::Open(), PSIBlastOptionsNew(), PSICdMsa::query, PSIMsaDimensions::query_length, BlastRPSProfileHeader::start_offsets, subject, and val.
BOOST_AUTO_TEST_CASE | ( | TestCreatePssmFromMultipleCds | ) |
Definition at line 328 of file pssmcreate_cdd_unit_test.cpp.
References _PSIComputeFrequenciesFromCDs(), _PSISequenceWeightsNew(), BlastScoreBlk::alphabet_size, PSICdMsaCell::data, PSICdMsa::dimensions, CBlastScoreBlk::Get(), AutoPtr< X, Del >::get(), CPssmInputWithNoCDs::GetData(), CPssmInputWithNoCDs::GetOptions(), CPssmInputWithNoCDs::GetQuery(), CPssmInputWithNoCDs::GetQueryLength(), i, InitializeBlastScoreBlk(), int, PSICdMsaCellData::iobsr, PSICdMsaCell::is_aligned, PSICdMsa::msa, PSIMsaDimensions::query_length, CBlastScoreBlk::Reset(), s_TestCreatePssmFromFreqs(), and CPssmCreateTestFixture::x_GuardProteinQuery().
BOOST_AUTO_TEST_CASE | ( | TestCreatePssmFromNoCds | ) |
Definition at line 376 of file pssmcreate_cdd_unit_test.cpp.
References _PSIComputeFrequenciesFromCDs(), _PSISequenceWeightsNew(), PSICdMsa::dimensions, CBlastScoreBlk::Get(), AutoPtr< X, Del >::get(), CPssmInputWithNoCDs::GetData(), CPssmInputWithNoCDs::GetOptions(), CPssmInputWithNoCDs::GetQuery(), CPssmInputWithNoCDs::GetQueryLength(), InitializeBlastScoreBlk(), CBlastScoreBlk::Reset(), s_TestCreatePssmFromFreqs(), and CPssmCreateTestFixture::x_GuardProteinQuery().
BOOST_AUTO_TEST_CASE | ( | TestCreatePssmFromSingleCd | ) |
Definition at line 282 of file pssmcreate_cdd_unit_test.cpp.
References _PSIComputeFrequenciesFromCDs(), _PSISequenceWeightsNew(), BlastScoreBlk::alphabet_size, PSICdMsaCell::data, PSICdMsa::dimensions, CBlastScoreBlk::Get(), AutoPtr< X, Del >::get(), CPssmInputWithNoCDs::GetData(), CPssmInputWithNoCDs::GetOptions(), CPssmInputWithNoCDs::GetQuery(), CPssmInputWithNoCDs::GetQueryLength(), i, InitializeBlastScoreBlk(), int, PSICdMsaCellData::iobsr, PSICdMsaCell::is_aligned, PSICdMsa::msa, PSIMsaDimensions::query_length, CBlastScoreBlk::Reset(), s_TestCreatePssmFromFreqs(), PSICdMsaCellData::wfreqs, and CPssmCreateTestFixture::x_GuardProteinQuery().
BOOST_AUTO_TEST_CASE | ( | TestDuplicateCdHits | ) |
BOOST_AUTO_TEST_CASE | ( | TestFullPssmEngineRunWithDiagnosticsRequest | ) |
Definition at line 771 of file pssmcreate_cdd_unit_test.cpp.
References BLASTAA_SIZE, SBlastSequence::data, data, eBlastEncodingProtein, eSerial_AsnText, PSIDiagnosticsRequest::frequency_ratios, AutoPtr< X, Del >::get(), CSeq_descr_Base::Get(), CBioseq_Base::GetDescr(), CPssm_Base::GetFinalData(), CPssmIntermediateData_Base::GetFreqRatios(), CPssm_Base::GetIntermediateData(), CBioseq::GetLength(), CPssmIntermediateData_Base::GetNumIndeptObsr(), CPssmWithParameters_Base::GetPssm(), CPssmFinalData_Base::GetScores(), GetSequence(), CPssmIntermediateData_Base::GetWeightedResFreqsPerPos(), in(), PSIDiagnosticsRequest::independent_observations, PSIDiagnosticsRequest::information_content, CTestObjMgr::Instance(), CBioseq_Base::IsSetDescr(), ITERATE, kTitle, SBlastSequence::length, CObjectIStream::Open(), PSIBlastOptionsNew(), and PSIDiagnosticsRequest::weighted_residue_frequencies.
BOOST_AUTO_TEST_CASE | ( | TestInternalGapsInSubject | ) |
Definition at line 870 of file pssmcreate_cdd_unit_test.cpp.
References AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, SBlastSequence::data, eBlastEncodingProtein, CSeq_align::eScore_EValue, AutoPtr< X, Del >::get(), CPssm_Base::GetNumColumns(), CPssm_Base::GetNumRows(), CPssmWithParameters_Base::GetPssm(), TestUtil::GetResidue(), CScorematPssmConverter::GetScores(), GetSequence(), i, CTestObjMgr::Instance(), int, NStr::IntToString(), SBlastSequence::length, NCBISM_Blosum62, NCBISM_GetScore(), PSIBlastOptionsNew(), CPssmEngine::Run(), CSeq_align_set_Base::Set(), CDense_seg_Base::SetDim(), CSeq_align_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CSeq_align::SetNamedScore(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), and CDense_seg::Validate().
BOOST_AUTO_TEST_CASE | ( | TestNoDomainHits | ) |
Definition at line 988 of file pssmcreate_cdd_unit_test.cpp.
References AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, SBlastSequence::data, eBlastEncodingProtein, AutoPtr< X, Del >::get(), CPssm_Base::GetNumColumns(), CPssm_Base::GetNumRows(), CPssmWithParameters_Base::GetPssm(), TestUtil::GetResidue(), CScorematPssmConverter::GetScores(), GetSequence(), i, CTestObjMgr::Instance(), int, NStr::IntToString(), SBlastSequence::length, NCBISM_Blosum62, NCBISM_GetScore(), PSIBlastOptionsNew(), and CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | TestRejectDomainsWithNegativeFreqs | ) |
Definition at line 416 of file pssmcreate_cdd_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | TestRejectDomainsWithUnnormalizedFreqs | ) |
Definition at line 424 of file pssmcreate_cdd_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | TestRejectDomainsWithZeroObservations | ) |
Definition at line 432 of file pssmcreate_cdd_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | TestRejectGapsInQuery | ) |
Definition at line 407 of file pssmcreate_cdd_unit_test.cpp.
References CPssmEngine::Run().
BOOST_AUTO_TEST_CASE | ( | TestRejectNullInput | ) |
Definition at line 441 of file pssmcreate_cdd_unit_test.cpp.
References _PSIComputeFreqRatiosFromCDs(), _PSIComputeFrequenciesFromCDs(), _PSIInternalPssmDataNew(), _PSISequenceWeightsNew(), BlastScoreBlk::alphabet_size, PSICdMsa::dimensions, CBlastScoreBlk::Get(), AutoPtr< X, Del >::get(), CPssmInputWithNoCDs::GetData(), CPssmInputWithNoCDs::GetOptions(), CPssmInputWithNoCDs::GetQuery(), CPssmInputWithNoCDs::GetQueryLength(), InitializeBlastScoreBlk(), NULL, PSIMsaDimensions::query_length, CBlastScoreBlk::Reset(), and CPssmCreateTestFixture::x_GuardProteinQuery().
|
static |
Definition at line 1295 of file pssmcreate_cdd_unit_test.cpp.
References _PSIComputeFreqRatiosFromCDs(), _PSIConvertFreqRatiosToPSSM(), _PSIInternalPssmDataNew(), BlastScoreBlk::alphabet_size, AMINOACID_TO_NCBISTDAA, BLAST_SCORE_MIN, PSICdMsa::dimensions, CBlastScoreBlk::Get(), AutoPtr< X, Del >::get(), i, int, PSIMsaDimensions::num_seqs, PSIBlastOptions::pseudo_count, PSICdMsa::query, and PSIMsaDimensions::query_length.
Referenced by BOOST_AUTO_TEST_CASE().
Query id used for tests.
Definition at line 81 of file pssmcreate_cdd_unit_test.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and CPssmCddInputTest::CreatePssmInput().
Domain subject id used for tests (present in test CDD)
Definition at line 84 of file pssmcreate_cdd_unit_test.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), CPssmCddInputTest::x_CreateDuplicateNonOverlappingHit(), and CPssmCddInputTest::x_CreateDuplicateOverlappingHit().