78 vector<EBlastProgramType> retval;
103 ASSERT((*i)->GetSegs().IsDisc());
105 ITERATE(CSeq_align::C_Segs::TDisc::Tdata, hsp_itr,
106 (*i)->GetSegs().GetDisc().Get()) {
107 retval->
Set().push_back((*hsp_itr));
129 formatter.SetAlignOption(align_opt);
130 formatter.DisplaySeqalign(
out);
136 bool show_markers,
TSeqPos chars_per_line)
140 for (
TSeqPos line = 0; line < nlines + 1; line++) {
143 for (
TSeqPos i = (chars_per_line*line);
144 i < chars_per_line*(line+1) && (
i <
len);
i++) {
153 for (
TSeqPos i = (chars_per_line*line);
154 i < chars_per_line*(line+1) && (
i <
len);
i++) {
155 if (
i == 0 || ((
i%10) == 0)) {
159 TSeqPos marker_length = ss.str().size();
160 i += (marker_length-1);
170 bool show_markers,
TSeqPos chars_per_line)
174 for (
TSeqPos line = 0; line < nlines + 1; line++) {
177 for (
TSeqPos i = (chars_per_line*line);
187 for (
TSeqPos i = (chars_per_line*line);
189 if (
i == 0 || ((
i%10) == 0)) {
193 TSeqPos marker_length = ss.str().size();
194 i += (marker_length-1);
206 std::stringstream ss;
207 ss <<
"TestUtil::GetResidue(): Invalid residue " << res;
208 throw std::runtime_error(ss.str());
235 string msg(error_str);
248 Uint4 swap_mask = swap_size - 1;
251 _ASSERT((swap_size) && (0 == (swap_mask & swap_size)));
254 _ASSERT((byte_length & swap_mask) == 0);
265 Uint4 keep_mask = ~ swap_mask;
269 for(
Uint4 logical = 0; logical < byte_length; logical++) {
271 (logical & keep_mask) | (swap_mask - (logical & swap_mask));
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
Definitions which are dependant on the NCBI C++ Object Manager.
BlastQueryInfo * BlastQueryInfoNew(EBlastProgramType program, int num_queries)
Allocate memory for query information structure.
char * BlastSeqSrcGetInitError(const BlastSeqSrc *seq_src)
Function to retrieve NULL terminated string containing the description of an initialization error or ...
Defines BLAST error codes (user errors included)
size_type size() const noexcept
return size of the vector
std::ofstream out("events_result.xml")
main entry point for tests
#define BLASTAA_SIZE
Size of aminoacid alphabet.
const char NCBISTDAA_TO_AMINOACID[]
Translates between ncbieaa and ncbistdaa.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
uint8_t Uint1
1-byte (8-bit) unsigned integer
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.
unsigned int
A callback function used to compare two keys in a database.
static const char * GetResidue(TokenStatBlkPtr stoken)
void PrintFormattedSeqAlign(ostream &out, const CSeq_align_set *sas, CScope &scope)
objects::CSeq_id * GenerateRandomSeqid_Gi()
vector< EBlastProgramType > GetAllBlastProgramTypes()
BlastQueryInfo * CreateProtQueryInfo(unsigned int query_size)
Creates and initializes a BlastQueryInfo structure for a single protein sequence.
CRef< CSeq_align_set > FlattenSeqAlignSet(const CSeq_align_set &sset)
void CheckForBlastSeqSrcErrors(const BlastSeqSrc *seqsrc)
Uint4 EndianIndependentBufferHash(const char *buffer, Uint4 byte_length, Uint4 swap_size, Uint4 hash_seed)
Endianness independent hash function.
void PrintSequence(const CSeqVector svector, ostream &out, bool show_markers, TSeqPos chars_per_line)
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
Int4 query_length
Length of this query, strand or frame.
The query related information.
BlastContextInfo * contexts
Information per context.
Uint4 max_length
Length of the longest among the concatenated queries.
Complete type definition of Blast Sequence Source ADT.
Utility stuff for more convenient using of Boost.Test library.