NCBI C++ ToolKit
|
Search Toolkit Book for CBlastDatabaseArgs
Argument class to collect database/subject arguments. More...
#include <algo/blast/blastinput/blast_args.hpp>
Public Types | |
typedef CSearchDatabase::EMoleculeType | EMoleculeType |
alias for the database molecule type More... | |
Public Types inherited from CObject | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CBlastDatabaseArgs (bool request_mol_type=false, bool is_rpsblast=false, bool is_igblast=false, bool is_mapper=false, bool is_kblast=false) | |
Constructor. More... | |
virtual void | SetArgumentDescriptions (CArgDescriptions &arg_desc) |
Interface method,. More... | |
virtual void | ExtractAlgorithmOptions (const CArgs &args, CBlastOptions &opts) |
Interface method,. More... | |
void | SetDatabaseMaskingSupport (bool val) |
Turns on/off database masking support. More... | |
bool | IsProtein () const |
Is the database/subject protein? More... | |
string | GetDatabaseName () const |
Get the BLAST database name. More... | |
CRef< CSearchDatabase > | GetSearchDatabase () const |
Retrieve the search database information. More... | |
void | SetSearchDatabase (CRef< CSearchDatabase > search_db) |
Set the search database information. More... | |
void | SetSubjects (CRef< IQueryFactory > subjects, CRef< CScope > scope, bool is_protein) |
Sets the subject sequences. More... | |
CRef< IQueryFactory > | GetSubjects (objects::CScope *scope=NULL) |
Retrieve subject sequences, if provided. More... | |
void | SetIPGFilteringSupport (bool val) |
Public Member Functions inherited from IBlastCmdLineArgs | |
virtual | ~IBlastCmdLineArgs () |
Our virtual destructor. More... | |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Static Public Member Functions | |
static bool | HasBeenSet (const CArgs &args) |
Auxiliary function to determine if the database/subject sequence has been set. More... | |
Static Public Member Functions inherited from CObject | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
Static Public Member Functions inherited from CDebugDumpable | |
static void | EnableDebugDump (bool on) |
Static Public Attributes | |
static const int | kSubjectsDataLoaderPriority = 10 |
The default priority for subjects, should be used for subjects/databases. More... | |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Attributes | |
CRef< CSearchDatabase > | m_SearchDb |
Description of the BLAST database. More... | |
bool | m_RequestMoleculeType |
Determines whether the database's molecule type should be requested in the command line, true in case of PSI-BLAST. More... | |
bool | m_IsRpsBlast |
true if the search is RPS-BLAST More... | |
bool | m_IsIgBlast |
true if the search is Ig-BLAST More... | |
bool | m_IsProtein |
Is the database/subject(s) protein? More... | |
bool | m_IsMapper |
true for short read mapper More... | |
bool | m_IsKBlast |
true for Kblastp More... | |
CRef< IQueryFactory > | m_Subjects |
The subject sequences. More... | |
CRef< objects::CScope > | m_Scope |
CScope object in which all subject sequences read are kept. More... | |
bool | m_SupportsDatabaseMasking |
true if it's supported More... | |
bool | m_SupportIPGFiltering |
true if IPG filtering is supported More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Argument class to collect database/subject arguments.
Definition at line 881 of file blast_args.hpp.
alias for the database molecule type
Definition at line 889 of file blast_args.hpp.
CBlastDatabaseArgs::CBlastDatabaseArgs | ( | bool | request_mol_type = false , |
bool | is_rpsblast = false , |
||
bool | is_igblast = false , |
||
bool | is_mapper = false , |
||
bool | is_kblast = false |
||
) |
Constructor.
request_mol_type | If true, the command line arguments will include a mandatory option to disambiguate whether a protein or a nucleotide database is searched |
is_rpsblast | is it RPS-BLAST? |
is_igblast | is it IG-BLAST? |
is_deltablast | is it DELTA-BLAST? |
Definition at line 2160 of file blast_args.cpp.
|
virtual |
Interface method,.
Reimplemented from IBlastCmdLineArgs.
Definition at line 2461 of file blast_args.cpp.
References Blast_SubjectIsNucleotide(), bool, CSearchDatabase::eBlastDbIsNucleotide, CSearchDatabase::eBlastDbIsProtein, CCompressStream::eGZipFile, eHardSubjMasking, NStr::EndsWith(), NStr::eNocase, CSeqDBFileGiList::ePigList, CSeqDBFileGiList::eSiList, eSoftSubjMasking, CArgs::Exist(), CBlastOptions::GetEffectiveSearchSpace(), CBlastOptions::GetProgramType(), IsProtein(), kArgDb, kArgDbHardMask, kArgDbSize, kArgDbSoftMask, kArgEntrezQuery, kArgGiList, kArgIpgList, kArgNegativeGiList, kArgNegativeIpgList, kArgNegativeSeqidList, kArgNegativeTaxIdList, kArgNegativeTaxIdListFile, kArgNoTaxIdExpansion, kArgParseDeflines, kArgSeqIdList, kArgSubject, kArgSubjectLocation, kArgTaxIdList, kArgTaxIdListFile, kArgUseLCaseMasking, kDfltArgParseDeflines, kDfltArgUseLCaseMasking, m_IsIgBlast, m_IsMapper, m_IsProtein, m_Scope, m_SearchDb, m_Subjects, NCBI_THROW, NULL, ParseSequenceRange(), ReadSequencesToBlast(), CRef< C, Locker >::Reset(), s_GetTaxIDList(), SeqDB_ResolveDbPath(), CBlastOptions::SetDbLength(), CSearchDatabase::SetEntrezQueryLimitation(), CSearchDatabase::SetFilteringAlgorithm(), CSearchDatabase::SetGiList(), CSearchDatabase::SetNegativeGiList(), string, and NStr::TruncateSpaces().
Referenced by CBlastAppArgs::SetOptions(), and CBlastAppArgs::SetOptionsForSavedStrategy().
|
inline |
Get the BLAST database name.
Definition at line 924 of file blast_args.hpp.
References CRef< C, Locker >::Empty(), CSearchDatabase::GetDatabaseName(), kEmptyStr, and m_SearchDb.
Referenced by CRPSBlastNode::Main(), CRPSTBlastnNode::Main(), CIgBlastnApp::CIgWorker::Main(), CIgBlastnApp::CIgFormatter::Main(), CMagicBlastThread::Main(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CTblastnApp::Run(), CIgBlastnApp::Run(), CIgBlastpApp::Run(), CBlastKmerApplication::Run(), CVDBBlastnApp::x_GetFullVDBPaths(), CVDBTblastnApp::x_GetFullVDBPaths(), CRPSBlastApp::x_RunMTBySplitDB(), and CRPSTBlastnApp::x_RunMTBySplitDB().
|
inline |
Retrieve the search database information.
Definition at line 929 of file blast_args.hpp.
References m_SearchDb.
Referenced by LogCmdOptions(), CBlastKmerThread::Main(), CIgBlastnApp::CIgWorker::Main(), CMagicBlastThread::Main(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CTblastnApp::Run(), and CIgBlastpApp::Run().
|
inline |
Retrieve subject sequences, if provided.
scope | scope to which to sequence read will be added (if non-NULL) [in] |
Definition at line 951 of file blast_args.hpp.
References _ASSERT, kSubjectsDataLoaderPriority, m_Scope, m_Subjects, and CRef< C, Locker >::NotEmpty().
Referenced by CIgBlastnApp::CIgWorker::Main(), CIgBlastnApp::CIgFormatter::Main(), CMagicBlastThread::Main(), CIgBlastnApp::Run(), and CIgBlastpApp::Run().
Auxiliary function to determine if the database/subject sequence has been set.
Definition at line 2176 of file blast_args.cpp.
References CArgs::Exist(), kArgDb, and kArgSubject.
Referenced by RecoverSearchStrategy(), CBlastAppArgs::SetOptions(), and CBlastAppArgs::SetOptionsForSavedStrategy().
|
inline |
Is the database/subject protein?
Definition at line 919 of file blast_args.hpp.
References m_IsProtein.
Referenced by ExtractAlgorithmOptions().
|
virtual |
Interface method,.
Implements IBlastCmdLineArgs.
Reimplemented in CBlastVDatabaseArgs.
Definition at line 2186 of file blast_args.cpp.
References CArgDescriptions::AddFlag(), CArgDescriptions::AddKey(), CArgDescriptions::AddOptionalKey(), CArgDescriptions::eExcludes, CArgDescriptions::eInputFile, CArgDescriptions::eInt8, CArgDescriptions::eRequires, CArgDescriptions::eString, i, ITERATE, kArgDb, kArgDbHardMask, kArgDbSize, kArgDbSoftMask, kArgDbType, kArgEntrezQuery, kArgGiList, kArgIpgList, kArgNegativeGiList, kArgNegativeIpgList, kArgNegativeSeqidList, kArgNegativeTaxIdList, kArgNegativeTaxIdListFile, kArgNoTaxIdExpansion, kArgRemote, kArgSeqIdList, kArgSubject, kArgSubjectLocation, kArgTaxIdList, kArgTaxIdListFile, kArgWindowMaskerTaxId, m_IsIgBlast, m_IsKBlast, m_IsMapper, m_IsRpsBlast, m_RequestMoleculeType, m_SupportIPGFiltering, m_SupportsDatabaseMasking, CArgDescriptions::SetConstraint(), CArgDescriptions::SetCurrentGroup(), and CArgDescriptions::SetDependency().
|
inline |
Turns on/off database masking support.
Definition at line 914 of file blast_args.hpp.
References m_SupportsDatabaseMasking, and val.
Referenced by CBlastnVdbAppArgs::CBlastnVdbAppArgs(), and CMagicBlastAppArgs::CMagicBlastAppArgs().
|
inline |
Definition at line 961 of file blast_args.hpp.
References m_SupportIPGFiltering, and val.
|
inline |
Set the search database information.
use case: recovering from search strategy
Definition at line 932 of file blast_args.hpp.
References CSearchDatabase::IsProtein(), m_IsProtein, and m_SearchDb.
Referenced by CBlastFormatterApp::PrintFormattedOutput(), and s_ImportDatabase().
|
inline |
Sets the subject sequences.
use case: recovering from search strategy
Definition at line 939 of file blast_args.hpp.
References m_IsProtein, m_Scope, and m_Subjects.
Referenced by CBlastFormatterApp::PrintFormattedOutput(), and s_ImportSubjects().
The default priority for subjects, should be used for subjects/databases.
Definition at line 886 of file blast_args.hpp.
Referenced by CIgBlastArgs::AddIgSequenceScope(), CIgBlastArgs::ExtractAlgorithmOptions(), GetSubjects(), InitializeSubject(), CDLTestThread::Main(), RegisterOMDataLoader(), CDeltaBlastApp::Run(), s_InitializeSubject(), s_MTDataLoaderTest2(), and s_RegisterOMDataLoader().
|
protected |
true if the search is Ig-BLAST
Definition at line 972 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), and SetArgumentDescriptions().
|
protected |
true for Kblastp
Definition at line 976 of file blast_args.hpp.
Referenced by SetArgumentDescriptions().
|
protected |
true for short read mapper
Definition at line 975 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), and SetArgumentDescriptions().
|
protected |
Is the database/subject(s) protein?
Definition at line 974 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), IsProtein(), SetSearchDatabase(), and SetSubjects().
|
protected |
true if the search is RPS-BLAST
Definition at line 971 of file blast_args.hpp.
Referenced by SetArgumentDescriptions().
|
protected |
Determines whether the database's molecule type should be requested in the command line, true in case of PSI-BLAST.
Definition at line 967 of file blast_args.hpp.
Referenced by SetArgumentDescriptions().
|
protected |
CScope object in which all subject sequences read are kept.
Definition at line 978 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), GetSubjects(), and SetSubjects().
|
protected |
Description of the BLAST database.
Definition at line 966 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), GetDatabaseName(), GetSearchDatabase(), and SetSearchDatabase().
|
protected |
The subject sequences.
Definition at line 977 of file blast_args.hpp.
Referenced by ExtractAlgorithmOptions(), GetSubjects(), and SetSubjects().
|
protected |
true if IPG filtering is supported
Definition at line 981 of file blast_args.hpp.
Referenced by SetArgumentDescriptions(), and SetIPGFilteringSupport().
|
protected |
true if it's supported
Definition at line 980 of file blast_args.hpp.
Referenced by SetArgumentDescriptions(), and SetDatabaseMaskingSupport().