NCBI C++ ToolKit
|
Search Toolkit Book for SDataLoaderConfig
Configuration structure for the CBlastScopeSource. More...
#include <algo/blast/blastinput/blast_scope_src.hpp>
Public Types | |
enum | EConfigOpts { eUseBlastDbDataLoader = (0x1 << 0) , eUseGenbankDataLoader = (0x1 << 1) , eUseNoDataLoaders = (0x1 << 2) , eDefault = (eUseBlastDbDataLoader | eUseGenbankDataLoader) } |
Configuration options for the BlastScopeSource. More... | |
Public Member Functions | |
SDataLoaderConfig (bool load_proteins, EConfigOpts options=eDefault) | |
Constructor which relies on the configuration file to set the BLAST database to use. More... | |
SDataLoaderConfig (const string &dbname, bool protein_data, EConfigOpts options=eDefault) | |
Constructor which allows the specification of a BLAST database to use to initialize the BLAST DB data loader, without the option to override this at runtime via the configuration file. More... | |
void | OptimizeForWholeLargeSequenceRetrieval (bool value=true) |
Configures the BLAST database data loader to optimize the retrieval of *entire* large sequences. More... | |
bool | UseDataLoaders () const |
Determine whether either of the data loaders should be used. More... | |
bool | operator== (const SDataLoaderConfig &rhs) const |
Equality operator. More... | |
bool | operator!= (const SDataLoaderConfig &rhs) const |
Inequality operator. More... | |
Public Attributes | |
bool | m_UseBlastDbs |
Use the BLAST database data loaders. More... | |
string | m_BlastDbName |
Name of the BLAST database to use (non-empty if m_UseBlastDbs is true) More... | |
bool | m_IsLoadingProteins |
Is this intended to load protein sequences. More... | |
bool | m_UseGenbank |
Use the Genbank data loader. More... | |
bool | m_UseFixedSizeSlices |
Argument to configure BLAST database data loader. More... | |
Static Public Attributes | |
static const char * | kDefaultProteinBlastDb = "nr" |
Default protein BLAST database to use for the BLAST DB data loaders. More... | |
static const char * | kDefaultNucleotideBlastDb = "nt" |
Default nucleotide BLAST database to use for the BLAST DB data loaders. More... | |
Private Member Functions | |
void | x_Init (EConfigOpts options, const string &dbname, bool load_proteins) |
Initialization method. More... | |
void | x_LoadDataLoadersConfig (const CNcbiRegistry ®istry) |
Load the DATA_LOADERS configuration value from the config file. More... | |
void | x_LoadBlastDbDataLoaderConfig (const CNcbiRegistry ®istry) |
Load the BLAST database configured to search for the blastdb DATA_LOADERS option from the config file. More... | |
Configuration structure for the CBlastScopeSource.
Definition at line 57 of file blast_scope_src.hpp.
Configuration options for the BlastScopeSource.
Definition at line 65 of file blast_scope_src.hpp.
|
inline |
Constructor which relies on the configuration file to set the BLAST database to use.
load_proteins | is this object going to load/read proteins only [in] |
options | configuration options [in] |
Definition at line 81 of file blast_scope_src.hpp.
References kEmptyStr.
|
inline |
Constructor which allows the specification of a BLAST database to use to initialize the BLAST DB data loader, without the option to override this at runtime via the configuration file.
dbname | name of BLAST database [in] |
protein_data | is this object going to load/read proteins only [in] |
options | configuration options [in] |
Definition at line 93 of file blast_scope_src.hpp.
References dbname().
bool SDataLoaderConfig::operator!= | ( | const SDataLoaderConfig & | rhs | ) | const |
Inequality operator.
Definition at line 354 of file blast_scope_src.cpp.
bool SDataLoaderConfig::operator== | ( | const SDataLoaderConfig & | rhs | ) | const |
Equality operator.
Definition at line 333 of file blast_scope_src.cpp.
References m_BlastDbName, m_IsLoadingProteins, m_UseBlastDbs, and m_UseGenbank.
Configures the BLAST database data loader to optimize the retrieval of *entire* large sequences.
value | TRUE to turn on, FALSE to turn off |
Definition at line 106 of file blast_scope_src.hpp.
References rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), InitializeQueryDataLoaderConfiguration(), ReadSequencesToBlast(), CSeedTopApp::Run(), CIgBlastnApp::Run(), CIgBlastpApp::Run(), CRMBlastnApp::Run(), CVecScreenApp::Run(), CVDBBlastnApp::Run(), CVDBTblastnApp::Run(), s_ImportQueries(), CBlastFormatterApp::x_ExtractQueries(), and CBlastFormatterVdbApp::x_ExtractQueries().
|
inline |
Determine whether either of the data loaders should be used.
Definition at line 111 of file blast_scope_src.hpp.
Referenced by CBlastFastaInputSource::x_InitInputReader().
|
private |
Initialization method.
options | configuration options [in] |
dbname | name of BLAST database [in] |
load_proteins | is this object going to load/read proteins only [in] |
Definition at line 55 of file blast_scope_src.cpp.
References dbname(), CNcbiApplicationAPI::GetConfig(), CNcbiApplication::Instance(), and registry.
|
private |
Load the BLAST database configured to search for the blastdb DATA_LOADERS option from the config file.
Definition at line 98 of file blast_scope_src.cpp.
References _ASSERT, IRegistry::Get(), IRegistry::HasEntry(), kDefaultNucleotideBlastDb, kDefaultProteinBlastDb, m_BlastDbName, m_IsLoadingProteins, m_UseBlastDbs, and registry.
|
private |
Load the DATA_LOADERS configuration value from the config file.
Definition at line 76 of file blast_scope_src.cpp.
References _TRACE, NStr::FindNoCase(), IRegistry::Get(), IRegistry::HasEntry(), m_UseBlastDbs, m_UseGenbank, NPOS, and registry.
|
static |
Default nucleotide BLAST database to use for the BLAST DB data loaders.
Definition at line 62 of file blast_scope_src.hpp.
Referenced by x_LoadBlastDbDataLoaderConfig().
|
static |
Default protein BLAST database to use for the BLAST DB data loaders.
Definition at line 60 of file blast_scope_src.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and x_LoadBlastDbDataLoaderConfig().
string SDataLoaderConfig::m_BlastDbName |
Name of the BLAST database to use (non-empty if m_UseBlastDbs is true)
Definition at line 116 of file blast_scope_src.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), CBlastScopeSource::CBlastScopeSource(), InitializeQueryDataLoaderConfiguration(), operator==(), s_RetrieveSequenceLength(), and x_LoadBlastDbDataLoaderConfig().
bool SDataLoaderConfig::m_IsLoadingProteins |
Is this intended to load protein sequences.
Definition at line 119 of file blast_scope_src.hpp.
Referenced by CBlastScopeSource::CBlastScopeSource(), operator==(), and x_LoadBlastDbDataLoaderConfig().
bool SDataLoaderConfig::m_UseBlastDbs |
Use the BLAST database data loaders.
Definition at line 114 of file blast_scope_src.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), InitializeQueryDataLoaderConfiguration(), operator==(), s_RetrieveSequenceLength(), CBlastScopeSource::x_InitBlastDatabaseDataLoader(), x_LoadBlastDbDataLoaderConfig(), and x_LoadDataLoadersConfig().
bool SDataLoaderConfig::m_UseFixedSizeSlices |
Argument to configure BLAST database data loader.
Definition at line 130 of file blast_scope_src.hpp.
Referenced by CBlastScopeSource::x_InitBlastDatabaseDataLoader().
bool SDataLoaderConfig::m_UseGenbank |
Use the Genbank data loader.
Definition at line 122 of file blast_scope_src.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), InitializeQueryDataLoaderConfiguration(), operator==(), s_RetrieveSequenceLength(), CBlastScopeSource::x_InitGenbankDataLoader(), and x_LoadDataLoadersConfig().