A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCSplitQueryTestFixture.html below:

NCBI C++ ToolKit: CSplitQueryTestFixture Class Reference

Search Toolkit Book for CSplitQueryTestFixture

  CSplitQueryTestFixture ()     ~CSplitQueryTestFixture ()   void  x_PrepareBlastQueryStructures (TIntId gis[], EProgram program, BLAST_SequenceBlk **seq_blk, BlastQueryInfo **qinfo, ENa_strand *strand=NULL)   Populate a BLAST_SequenceBlk and BlastQueryInfo structures out of an array of GIs. More...
  void  x_TestCContextTranslator (TGiLengthVector &gi_length, size_t chunk_size, size_t num_chunks, blast::EProgram program, vector< vector< int > > &starting_chunks, vector< vector< int > > &absolute_contexts, vector< vector< size_t > > *context_offsets, ENa_strand strand, vector< ENa_strand > *query_strands=NULL)   bool  x_CmpSequenceData (const Uint1 *global, const Uint1 *chunk, size_t len)   Auxiliary function that compares bytes of sequence data to validate the context offset corrections. More...
  void  QuerySplitter_BlastnSingleQueryMultiChunk (const string &kTestName, ENa_strand strand)   void  QuerySplitter_BlastnMultiQueryMultiChunk (const string &kTestName, ENa_strand strand, vector< ENa_strand > *query_strands=NULL)   void  QuerySplitter_BlastxSingleQueryMultiChunk (const string &kTestName, ENa_strand strand)   void  QuerySplitter_BlastxMultiQueryMultiChunk (const string &kTestName, ENa_strand strand, vector< ENa_strand > *query_strands=NULL)   void  x_ComputeQueryChunkBounds (TChunkRange &chunk_range, size_t chunk_size, size_t concatenated_query_length, size_t overlap)   Incrementally compute the query chunk bounds. More...
  void  x_ReadQueryBoundsPerChunk (const string &kTestName, CConstRef< CSplitQueryBlk > sqb, CQuerySplitter::TSplitQueryVector &split_query_vector)   This function reads values in the split_query.ini file with the format ChunkNQueryM (where N is the chunk number and M is the query number). More...
  void  x_ValidateQuerySeqLocsPerChunk (CRef< CQuerySplitter > splitter, const CQuerySplitter::TSplitQueryVector &split_query_vector)   Compare the query data (start, stop, strand) for each chunk computed by the splitter vs. More...
  void  x_ReadSplitQueryInfoForTest (const string &kTestName, EBlastProgramType program, vector< BlastQueryInfo * > &retval)   Reads data to populate multiple BlastQueryInfo structures. More...
  template<class T > void  x_ReadVectorOfVectorsForTest (const string &kTestName, const char *data_to_read, vector< vector< T > > &retval)   This method reads entries in the config file of the format ChunkNX, here N is the chunk number and X is the value of data_to_read. More...
  template<class T > void  x_ParseConfigLine (const string &input, vector< T > &retval)   Tokenizes a string containing comma-separated values into a vector of values. More...
  void  x_ValidateChunkBounds (size_t kChunkSize, size_t kQuerySize, const CSplitQueryBlk &sqb, EBlastProgramType p)   Auxiliary method to validate the chunk bounds calculated by the CSplitQueryBlk object and the x_ComputeQueryChunkBounds method. More...
  void  x_ValidateQueriesPerChunkAssignment (const CSplitQueryBlk &sqb, const vector< vector< size_t > > &queries_per_chunk)   Validates the query sequences (by index) assigned to all the chunks This compares the data calculated by the sqb parameter to the data read from the config file in queries_per_chunk. More...
  void  x_ValidateQueryContextsPerChunkAssignment (const CSplitQueryBlk &sqb, const vector< vector< int > > &contexts_per_chunk)   Validates the query contexts assigned to all the chunks. More...
  void  x_ValidateContextOffsetsPerChunkAssignment (const CSplitQueryBlk &sqb, const vector< vector< size_t > > &contexts_offsets_per_chunk)   Validates the context offsets assigned to all the chunks. More...
  void  x_ValidateQueryInfoForChunk (const BlastQueryInfo *reference, const BlastQueryInfo *test, size_t chunk_num)   Validate the query info structure generated (test) against the expected one (reference) (N.B. More...
  void  x_ValidateLocalQueryData (CRef< CQuerySplitter > splitter, const CBlastOptions *options, vector< BlastQueryInfo * > split_query_info_structs)   Validate the local query data for all chunks, comparing data produced by the CQuerySplitter object and the BlastQueryInfo structures read from the config file (BLAST_SequenceBlk's are not tested) More...
 

Definition at line 153 of file split_query_unit_test.cpp.

◆ CSplitQueryTestFixture() CSplitQueryTestFixture::CSplitQueryTestFixture ( ) inline ◆ ~CSplitQueryTestFixture() CSplitQueryTestFixture::~CSplitQueryTestFixture ( ) inline ◆ QuerySplitter_BlastnMultiQueryMultiChunk()

Definition at line 422 of file split_query_unit_test.cpp.

References BlastQueryInfoFree(), CBlastOptionsFactory::Create(), eBlastn, CQuerySplitter::GetChunkSize(), IRegistry::GetInt(), CQuerySplitter::GetNumberOfChunks(), CSplitQueryBlk::GetNumChunks(), CBlastOptions::GetProgramType(), ILocalQueryData::GetSumOfSequenceLengths(), NMacroArgs::kTestName, IQueryFactory::MakeLocalQueryData(), NON_CONST_ITERATE, s_ConvertToBlastQueries(), CBlastOptionsHandle::SetOptions(), CBlastOptions::SetStrandOption(), and CQuerySplitter::Split().

◆ QuerySplitter_BlastnSingleQueryMultiChunk() void CSplitQueryTestFixture::QuerySplitter_BlastnSingleQueryMultiChunk ( const stringkTestName, ENa_strand  strand  ) inline

Definition at line 370 of file split_query_unit_test.cpp.

References BlastQueryInfoFree(), CBlastOptionsFactory::Create(), CSeq_id_Base::e_Gi, eBlastn, CQuerySplitter::GetChunkSize(), IRegistry::GetInt(), CQuerySplitter::GetNumberOfChunks(), CSplitQueryBlk::GetNumChunks(), CBlastOptions::GetProgramType(), ILocalQueryData::GetSumOfSequenceLengths(), CTestObjMgr::Instance(), NMacroArgs::kTestName, IQueryFactory::MakeLocalQueryData(), NON_CONST_ITERATE, query, CBlastOptionsHandle::SetOptions(), CBlastOptions::SetStrandOption(), and CQuerySplitter::Split().

◆ QuerySplitter_BlastxMultiQueryMultiChunk()

Definition at line 541 of file split_query_unit_test.cpp.

References BlastQueryInfoFree(), CBlastOptionsFactory::Create(), eBlastx, CQuerySplitter::GetChunkSize(), IRegistry::GetInt(), CQuerySplitter::GetNumberOfChunks(), CSplitQueryBlk::GetNumChunks(), CBlastOptions::GetProgramType(), ILocalQueryData::GetSumOfSequenceLengths(), NMacroArgs::kTestName, IQueryFactory::MakeLocalQueryData(), NON_CONST_ITERATE, s_ConvertToBlastQueries(), CBlastOptionsHandle::SetOptions(), CBlastOptions::SetStrandOption(), and CQuerySplitter::Split().

◆ QuerySplitter_BlastxSingleQueryMultiChunk() void CSplitQueryTestFixture::QuerySplitter_BlastxSingleQueryMultiChunk ( const stringkTestName, ENa_strand  strand  ) inline

Definition at line 487 of file split_query_unit_test.cpp.

References BlastQueryInfoFree(), CBlastOptionsFactory::Create(), CSeq_id_Base::e_Gi, eBlastx, CQuerySplitter::GetChunkSize(), IRegistry::GetInt(), CQuerySplitter::GetNumberOfChunks(), CSplitQueryBlk::GetNumChunks(), CBlastOptions::GetProgramType(), ILocalQueryData::GetSumOfSequenceLengths(), CTestObjMgr::Instance(), NMacroArgs::kTestName, IQueryFactory::MakeLocalQueryData(), NON_CONST_ITERATE, query, CBlastOptionsHandle::SetOptions(), and CQuerySplitter::Split().

◆ x_CmpSequenceData()

Auxiliary function that compares bytes of sequence data to validate the context offset corrections.

Parameters
global global query sequence data [in] chunk sequence data for chunk [in] len length of the data to compare [in]
Returns
true if sequence data is identical, false otherwise

Definition at line 360 of file split_query_unit_test.cpp.

References i, and len.

◆ x_ComputeQueryChunkBounds() void CSplitQueryTestFixture::x_ComputeQueryChunkBounds ( TChunkRangechunk_range, size_t  chunk_size, size_t  concatenated_query_length, size_t  overlap  ) inline ◆ x_ParseConfigLine()

template<class T >

void CSplitQueryTestFixture::x_ParseConfigLine ( const stringinput, vector< T > &  retval  ) inline ◆ x_PrepareBlastQueryStructures()

Populate a BLAST_SequenceBlk and BlastQueryInfo structures out of an array of GIs.

Parameters
gis array of GIs, last element must be -1 indicating the end of the array [in] program program for which the query data will be created [in] seq_blk BLAST_SequenceBlk structure to populate [out] qinfo BlastQueryInfo structure to populate [out] strand strand to use (optional) [in]

Definition at line 192 of file split_query_unit_test.cpp.

References CScope::AddDefaults(), CBlastOptionsFactory::Create(), CBlastOptionsHandle::GetOptions(), CBlastOptions::GetProgramType(), CBlastOptions::GetStrandOption(), GI_FROM, TSearchMessages::HasMessages(), i, CTestObjMgr::Instance(), NULL, prog, SetupQueries(), SetupQueryInfo(), and CSeq_loc::SetWhole().

◆ x_ReadQueryBoundsPerChunk()

This function reads values in the split_query.ini file with the format ChunkNQueryM (where N is the chunk number and M is the query number).

Each of these entries should have 3 comma-separeted elements: the query's starting offset, ending offset, and its strand's enumeration value.

Parameters
kTestName name of the test to read data for [in] sqb CSplitQueryBlk object from which to get query indices for each chunk [in] split_query_vector query vector where the data from config file will be read [out]

Definition at line 648 of file split_query_unit_test.cpp.

References IRegistry::Get(), IRegistry::GetInt(), i, ITERATE, NMacroArgs::kTestName, CSimpleOM::NewScope(), out(), CSeq_loc::SetInt(), CSeq_loc::SetStrand(), and rapidjson::value.

◆ x_ReadSplitQueryInfoForTest()

Reads data to populate multiple BlastQueryInfo structures.

This data is formatted in the config file as BlastQueryInfoN.X[.Y] where N is the chunk number, X is the field of the BlastQueryInfo structure and Y is the field of the BlastContextInfo structure (only applicable if X has the value contextM, where M is the context number)

Parameters
kTestName name of the test to read data for [in] program blast program [in] retval vector of BlastQueryInfo structures, there will be as many elements as there are chunks for this test. Caller is responsible for deallocating the contents of this vector [out]

Definition at line 760 of file split_query_unit_test.cpp.

References BlastQueryInfoNew(), ctx, IRegistry::GetBool(), IRegistry::GetInt(), i, is_valid(), kPrefix, NMacroArgs::kTestName, msg(), and s_CalculateMaxLength().

◆ x_ReadVectorOfVectorsForTest()

template<class T >

void CSplitQueryTestFixture::x_ReadVectorOfVectorsForTest ( const stringkTestName, const char *  data_to_read, vector< vector< T > > &  retval  ) inline

This method reads entries in the config file of the format ChunkNX, here N is the chunk number and X is the value of data_to_read.

Parameters
kTestName name of the test to read data for [in] data_to_read data for a chunk to read [in] retval vector of vectors where the data will be returned. The first vector will contain as many elements are there are chunks, and the contained vectors will contain as many elements as there are items on the config file (comma separated values) [out]

Definition at line 883 of file split_query_unit_test.cpp.

References IRegistry::Get(), IRegistry::GetInt(), i, NMacroArgs::kTestName, and rapidjson::value.

◆ x_TestCContextTranslator() void CSplitQueryTestFixture::x_TestCContextTranslator ( TGiLengthVectorgi_length, size_t  chunk_size, size_t  num_chunks, blast::EProgram  program, vector< vector< int > > &  starting_chunks, vector< vector< int > > &  absolute_contexts, vector< vector< size_t > > *  context_offsets, ENa_strand  strand, vector< ENa_strand > *  query_strands = NULL  ) inline

Definition at line 225 of file split_query_unit_test.cpp.

References chunk_size, BlastQueryInfo::contexts, CBlastOptionsFactory::Create(), EProgramToEBlastProgramType(), NStr::fConvErr_NoThrow, CContextTranslator::GetAbsoluteContext(), CSplitQueryBlk::GetContextOffsets(), CQuerySplitter::GetNumberOfChunks(), CQuerySplitter::GetQueryFactoryForChunk(), ILocalQueryData::GetQueryInfo(), ILocalQueryData::GetSequenceBlk(), CContextTranslator::GetStartingChunk(), i, kInvalidContext, CQuerySplitter::m_SplitBlk, IQueryFactory::MakeLocalQueryData(), min(), BlastContextInfo::query_length, BlastContextInfo::query_offset, s_ConvertToBlastQueries(), BLAST_SequenceBlk::sequence, CBlastOptionsHandle::SetOptions(), CBlastOptions::SetStrandOption(), NStr::SizetToString(), CQuerySplitter::Split(), and SplitQuery_CalculateNumChunks().

◆ x_ValidateChunkBounds() ◆ x_ValidateContextOffsetsPerChunkAssignment() void CSplitQueryTestFixture::x_ValidateContextOffsetsPerChunkAssignment ( const CSplitQueryBlksqb, const vector< vector< size_t > > &  contexts_offsets_per_chunk  ) inline ◆ x_ValidateLocalQueryData() ◆ x_ValidateQueriesPerChunkAssignment() void CSplitQueryTestFixture::x_ValidateQueriesPerChunkAssignment ( const CSplitQueryBlksqb, const vector< vector< size_t > > &  queries_per_chunk  ) inline ◆ x_ValidateQueryContextsPerChunkAssignment() void CSplitQueryTestFixture::x_ValidateQueryContextsPerChunkAssignment ( const CSplitQueryBlksqb, const vector< vector< int > > &  contexts_per_chunk  ) inline ◆ x_ValidateQueryInfoForChunk()

Validate the query info structure generated (test) against the expected one (reference) (N.B.

: this is called from x_ValidateLocalQueryData)

Parameters
reference The "good" BlastQueryInfo structure [in] test the BlastQueryInfo structure to test [in] the chunk number being tested, this is needed for error reporting purposes [in]

Definition at line 1049 of file split_query_unit_test.cpp.

References BlastQueryInfo::contexts, ctx, BlastContextInfo::eff_searchsp, BlastQueryInfo::first_context, BlastContextInfo::frame, BlastContextInfo::is_valid, BlastQueryInfo::last_context, BlastQueryInfo::max_length, BlastQueryInfo::num_queries, BlastQueryInfo::pattern_info, BlastContextInfo::query_index, BlastContextInfo::query_length, BlastContextInfo::query_offset, and test.

◆ x_ValidateQuerySeqLocsPerChunk()

Compare the query data (start, stop, strand) for each chunk computed by the splitter vs.

the data read from the split_query.ini file

Parameters
splitter object which performs query splitting [in] split_query_vector data instantiated from what was read from the split_query.ini file splitter CQuerySplitter object to test [in] split_query_vector data read from config file to test against [in]

Definition at line 708 of file split_query_unit_test.cpp.

References CRange_Base::GetFrom(), CBlastQueryVector::GetQuerySeqLoc(), CSeq_loc::GetStrand(), CRange_Base::GetTo(), COpenRange< Position >::GetToOpen(), CSeq_loc::GetTotalRange(), i, int, CQuerySplitter::m_NumChunks, CQuerySplitter::m_SplitQueriesInChunk, and CBlastQueryVector::Size().

◆ kDefaultIntValue const int CSplitQueryTestFixture::kDefaultIntValue = -1 static ◆ m_Config

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4