34 if (!one || !two)
return NULp;
37 static int result_len = 0;
39 int max_result = (one ? one->length : 6) + (two ? two->length : 6) + 2;
40 if (max_result > result_len) {
47 result_len = max_result;
50 char *pone = one->getPrimerSequence(sequence_);
51 char *ptwo = two->getPrimerSequence(sequence_);
53 sprintf(result,
"%s\n%s", pone, ptwo);
62 const char *
Pair::get_result (
const char *sequence_,
int max_primer_length,
int max_position_length,
int max_length_length) {
64 static int result_len = 0;
67 int max_result = (one ? one->length : 6) + (two ? two->length : 6) + 200;
68 if (max_result>result_len) {
75 result_len = max_result;
80 r += sprintf(r,
"%7.3f ", rating);
83 primer = one->getPrimerSequence(sequence_);
84 r += one->sprint(r, primer,
" ", max_primer_length, max_position_length, max_length_length);
88 r += sprintf(r,
"(error),");
92 primer = two->getPrimerSequence(sequence_);
93 r += two->sprint(r, primer,
"", max_primer_length, max_position_length, max_length_length);
97 r += sprintf(r,
"(error)");
107 void Pair::print (
const char *prefix_,
const char *suffix_,
const char *sequence_) {
108 const char *
result = get_result(sequence_, 0, 0, 0);
109 printf(
"%s[%s]%s", prefix_, result, suffix_);
const char * get_result(const char *sequence_, int max_primer_length, int max_position_length, int max_length_length)
void print(const char *prefix, const char *suffix, const char *sequence_)
TYPE * ARB_alloc(size_t nelem)
const char * get_primers(const char *sequence_)