NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
CBlastDatabaseArgs Class Reference

Search Toolkit Book for CBlastDatabaseArgs

Argument class to collect database/subject arguments. More...

#include <algo/blast/blastinput/blast_args.hpp>

+ Inheritance diagram for CBlastDatabaseArgs:
+ Collaboration diagram for CBlastDatabaseArgs:

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< Uint8TCounter
 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< CSearchDatabaseGetSearchDatabase () 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< IQueryFactoryGetSubjects (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...
 
CObjectoperator= (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< CSearchDatabasem_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< IQueryFactorym_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...
 

Detailed Description

Argument class to collect database/subject arguments.

Definition at line 881 of file blast_args.hpp.

Member Typedef Documentation

◆ EMoleculeType

alias for the database molecule type

Definition at line 889 of file blast_args.hpp.

Constructor & Destructor Documentation

◆ CBlastDatabaseArgs()

CBlastDatabaseArgs::CBlastDatabaseArgs ( bool  request_mol_type = false,
bool  is_rpsblast = false,
bool  is_igblast = false,
bool  is_mapper = false,
bool  is_kblast = false 
)

Constructor.

Parameters
request_mol_typeIf true, the command line arguments will include a mandatory option to disambiguate whether a protein or a nucleotide database is searched
is_rpsblastis it RPS-BLAST?
is_igblastis it IG-BLAST?
is_deltablastis it DELTA-BLAST?

Definition at line 2160 of file blast_args.cpp.

Member Function Documentation

◆ ExtractAlgorithmOptions()

void CBlastDatabaseArgs::ExtractAlgorithmOptions ( const CArgs args,
CBlastOptions opts 
)
virtual

◆ GetDatabaseName()

string CBlastDatabaseArgs::GetDatabaseName ( ) const
inline

◆ GetSearchDatabase()

CRef<CSearchDatabase> CBlastDatabaseArgs::GetSearchDatabase ( ) const
inline

◆ GetSubjects()

CRef<IQueryFactory> CBlastDatabaseArgs::GetSubjects ( objects::CScope *  scope = NULL)
inline

Retrieve subject sequences, if provided.

Parameters
scopescope to which to sequence read will be added (if non-NULL) [in]
Returns
empty CRef<> if no subjects were provided, otherwise a properly initialized IQueryFactory object

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().

◆ HasBeenSet()

bool CBlastDatabaseArgs::HasBeenSet ( const CArgs args)
static

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().

◆ IsProtein()

bool CBlastDatabaseArgs::IsProtein ( ) const
inline

Is the database/subject protein?

Definition at line 919 of file blast_args.hpp.

References m_IsProtein.

Referenced by ExtractAlgorithmOptions().

◆ SetArgumentDescriptions()

void CBlastDatabaseArgs::SetArgumentDescriptions ( CArgDescriptions arg_desc)
virtual

◆ SetDatabaseMaskingSupport()

void CBlastDatabaseArgs::SetDatabaseMaskingSupport ( bool  val)
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().

◆ SetIPGFilteringSupport()

void CBlastDatabaseArgs::SetIPGFilteringSupport ( bool  val)
inline

Definition at line 961 of file blast_args.hpp.

References m_SupportIPGFiltering, and val.

◆ SetSearchDatabase()

void CBlastDatabaseArgs::SetSearchDatabase ( CRef< CSearchDatabase search_db)
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().

◆ SetSubjects()

void CBlastDatabaseArgs::SetSubjects ( CRef< IQueryFactory subjects,
CRef< CScope scope,
bool  is_protein 
)
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().

Member Data Documentation

◆ kSubjectsDataLoaderPriority

const int CBlastDatabaseArgs::kSubjectsDataLoaderPriority = 10
static

◆ m_IsIgBlast

bool CBlastDatabaseArgs::m_IsIgBlast
protected

true if the search is Ig-BLAST

Definition at line 972 of file blast_args.hpp.

Referenced by ExtractAlgorithmOptions(), and SetArgumentDescriptions().

◆ m_IsKBlast

bool CBlastDatabaseArgs::m_IsKBlast
protected

true for Kblastp

Definition at line 976 of file blast_args.hpp.

Referenced by SetArgumentDescriptions().

◆ m_IsMapper

bool CBlastDatabaseArgs::m_IsMapper
protected

true for short read mapper

Definition at line 975 of file blast_args.hpp.

Referenced by ExtractAlgorithmOptions(), and SetArgumentDescriptions().

◆ m_IsProtein

bool CBlastDatabaseArgs::m_IsProtein
protected

Is the database/subject(s) protein?

Definition at line 974 of file blast_args.hpp.

Referenced by ExtractAlgorithmOptions(), IsProtein(), SetSearchDatabase(), and SetSubjects().

◆ m_IsRpsBlast

bool CBlastDatabaseArgs::m_IsRpsBlast
protected

true if the search is RPS-BLAST

Definition at line 971 of file blast_args.hpp.

Referenced by SetArgumentDescriptions().

◆ m_RequestMoleculeType

bool CBlastDatabaseArgs::m_RequestMoleculeType
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().

◆ m_Scope

CRef<objects::CScope> CBlastDatabaseArgs::m_Scope
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().

◆ m_SearchDb

CRef<CSearchDatabase> CBlastDatabaseArgs::m_SearchDb
protected

Description of the BLAST database.

Definition at line 966 of file blast_args.hpp.

Referenced by ExtractAlgorithmOptions(), GetDatabaseName(), GetSearchDatabase(), and SetSearchDatabase().

◆ m_Subjects

CRef<IQueryFactory> CBlastDatabaseArgs::m_Subjects
protected

The subject sequences.

Definition at line 977 of file blast_args.hpp.

Referenced by ExtractAlgorithmOptions(), GetSubjects(), and SetSubjects().

◆ m_SupportIPGFiltering

bool CBlastDatabaseArgs::m_SupportIPGFiltering
protected

true if IPG filtering is supported

Definition at line 981 of file blast_args.hpp.

Referenced by SetArgumentDescriptions(), and SetIPGFilteringSupport().

◆ m_SupportsDatabaseMasking

bool CBlastDatabaseArgs::m_SupportsDatabaseMasking
protected

true if it's supported

Definition at line 980 of file blast_args.hpp.

Referenced by SetArgumentDescriptions(), and SetDatabaseMaskingSupport().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:38 2024 by modify_doxy.py rev. 669887