59 #define NCBI_BOOST_NO_AUTO_TEST_MAIN
65 using namespace ncbi::align_format;
81 ASSERT((*i)->GetSegs().IsDisc());
83 ITERATE(CSeq_align::C_Segs::TDisc::Tdata, hsp_itr,
84 (*i)->GetSegs().GetDisc().Get()) {
85 retval->
Set().push_back((*hsp_itr));
123 Uint4 swap_mask = swap_size - 1;
126 _ASSERT((swap_size) && (0 == (swap_mask & swap_size)));
129 _ASSERT((byte_length & swap_mask) == 0);
132 swap_test.end_bytes[0] = 0x44;
133 swap_test.end_bytes[1] = 0x33;
134 swap_test.end_bytes[2] = 0x22;
135 swap_test.end_bytes[3] = 0x11;
144 Uint4 keep_mask = ~ swap_mask;
148 for(
Uint4 logical = 0; logical < byte_length; logical++) {
150 (logical & keep_mask) | (swap_mask - (logical & swap_mask));
217 if (e.
GetMsg().find(
"No alias or index file found ") !=
NPOS) {
Data loader implementation that uses the blast databases remotely.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
void SetAlignOption(int option)
Set functions.
void DisplaySeqalign(CNcbiOstream &out)
call this to display seqalign
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
void SetPreopenConnection(bool preopen=true)
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
void x_InitGenbankDataLoader()
void x_InitBlastDatabaseDataLoader(const std::string &dbname, EDbType dbtype, ELocation location)
ncbi::CRef< ncbi::objects::CObjectManager > m_ObjMgr
ncbi::CBlastDbDataLoader::EDbType EDbType
std::string m_GbLoaderName
std::string m_BlastDbLoaderName
void RevokeBlastDbDataLoader()
Removes the BLAST database data loader from the object manager.
ncbi::CRef< ncbi::objects::CScope > NewScope()
Create a new scope with the default set to the BLAST database data loader for the BLAST database spec...
static const char location[]
std::ofstream out("events_result.xml")
main entry point for tests
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
const string & GetMsg(void) const
Get message string.
void Warning(CExceptionArgs_Base &args)
TLoader * GetLoader(void) const
Get pointer to the loader.
void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)
Add data loader by name.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
bool RevokeDataLoader(CDataLoader &loader)
Revoke previously registered data loader.
@ kPriority_NotSet
Deprecated: use kPriority_Default instead.
uint32_t Uint4
4-byte (32-bit) unsigned integer
Uint4 TValue
Type of the generated integer value and/or the seed value.
TValue GetRand(void)
Get the next random number in the interval [0..GetMax()] (inclusive)
Tdata & Set(void)
Assign a value to data member.
list< CRef< CSeq_align > > Tdata
const Tdata & Get(void) const
Get the member data.
@ e_Gi
GenInfo Integrated Database.
char * dbname(DBPROCESS *dbproc)
Get name of current database.
unsigned int
A callback function used to compare two keys in a database.
void PrintFormattedSeqAlign(ostream &out, const CSeq_align_set *sas, CScope &scope)
objects::CSeq_id * GenerateRandomSeqid_Gi()
CRef< CSeq_align_set > FlattenSeqAlignSet(const CSeq_align_set &sset)
Uint4 EndianIndependentBufferHash(const char *buffer, Uint4 byte_length, Uint4 swap_size, Uint4 hash_seed)
Endianness independent hash function.
Magic spell ;-) needed for some weird compilers... very empiric.
#define ASSERT
macro for assert.
Miscellaneous common-use basic types and functionality.
Defines Limits for the types used in NCBI C/C++ toolkit.
static pcre_uint8 * buffer
Utility stuff for more convenient using of Boost.Test library.