30 #define AWAR_MAX_FREQ_PREFIX "tmp/CON_MAX_FREQ/"
31 #define AWAR_CONSENSUS_PREFIX "consensus/"
32 #define AWAR_CONSENSUS_PREFIX_TMP "tmp/" AWAR_CONSENSUS_PREFIX
34 #define AWAR_MAX_FREQ_IGNORE_GAPS AWAR_MAX_FREQ_PREFIX "no_gaps"
35 #define AWAR_MAX_FREQ_SAI_NAME AWAR_MAX_FREQ_PREFIX "sai_name"
37 #define AWAR_CONSENSUS_MARKED_ONLY AWAR_CONSENSUS_PREFIX_TMP "marked_only"
38 #define AWAR_CONSENSUS_ALIGNMENT AWAR_CONSENSUS_PREFIX_TMP "alignment"
39 #define AWAR_CONSENSUS_COUNTGAPS AWAR_CONSENSUS_PREFIX "countgaps"
40 #define AWAR_CONSENSUS_GAPBOUND AWAR_CONSENSUS_PREFIX "gapbound"
41 #define AWAR_CONSENSUS_GROUP AWAR_CONSENSUS_PREFIX "group"
42 #define AWAR_CONSENSUS_CONSIDBOUND AWAR_CONSENSUS_PREFIX "considbound"
43 #define AWAR_CONSENSUS_UPPER AWAR_CONSENSUS_PREFIX "upper"
44 #define AWAR_CONSENSUS_LOWER AWAR_CONSENSUS_PREFIX "lower"
45 #define AWAR_CONSENSUS_NAME AWAR_CONSENSUS_PREFIX_TMP "name"
47 #define CONSENSUS_AWAR_SOURCE CAS_NTREE
74 freqs.add(data, length);
81 if (nrofspecies < inserted) {
83 inserted, nrofspecies, onlymarked ?
"marked " :
"", aliname));
101 const char *off =
"off";
102 const char *on =
"on";
110 const char *allvsmarked = onlymarked ?
"marked" :
"all";
111 const char *countgapsstring = BK.
countgaps ? on : off;
112 const char *simplifystring = BK.
group ? on : off;
115 char *
buffer = ARB_alloc<char>(2000);
116 sprintf(buffer,
"CON: [species: %s] [number: %ld] [count gaps: %s] "
117 "[threshold for gaps: %d] [simplify: %s] "
118 "[threshold for group: %d] [upper: %d] [lower: %d]",
119 allvsmarked, nrofspecies, countgapsstring,
132 if (!err && nrofspecies<20) {
158 sprintf(buffer2,
"%s/FREQUENCIES", align);
164 if (err) err =
GBS_global_string(
"Failed to store consensus '%s' (Reason: %s)", savename, err);
183 if (maxalignlen <= 0) {
198 error =
"fault: lower greater than upper";
202 error =
CON_export(gb_main, sainame, aliname, result, onlymarked, nrofspecies, BK);
221 #if defined(ASSERTION_USED)
243 if (upper_changed) awar_lower->
write_int(upper);
292 AW_window_simple *aws =
new AW_window_simple;
293 aws->init(aw_root,
"CALCULATE_CONSENSUS",
"CONSENSUS OF SEQUENCES");
296 aws->auto_space(5, 5);
298 const int SCALEDCOLUMNS = 3;
299 const int SCALERSIZE = 150;
302 aws->button_length(9);
306 aws->create_button(
"CLOSE",
"CLOSE",
"C");
310 aws->create_button(
"HELP",
"HELP",
"H");
313 aws->at(
"which_alignment");
316 aws->at(
"which_species");
318 aws->insert_toggle (
"all",
"a", 0);
319 aws->insert_default_toggle(
"marked",
"m", 1);
320 aws->update_toggle_field();
329 aws->at(
"countgaps");
331 aws->insert_toggle (
"on",
"1", 1);
332 aws->insert_default_toggle(
"off",
"0", 0);
333 aws->update_toggle_field();
340 aws->insert_toggle (
"on",
"1", 1);
341 aws->insert_default_toggle(
"off",
"0", 0);
342 aws->update_toggle_field();
344 aws->at(
"considbound");
347 aws->at(
"showgroups");
349 aws->create_autosize_button(
"SHOW_IUPAC",
"Show IUPAC groups",
"s");
358 aws->at(
"calculate");
360 aws->create_button(
"GO",
"GO",
"G");
382 if (maxalignlen<=0) {
392 const int onlymarked = 1;
396 char *result1 =
new char[maxalignlen+1];
397 char *result2 =
new char[maxalignlen+1];
399 result1[maxalignlen] = 0;
400 result2[maxalignlen] = 0;
402 for (
int pos = 0; pos < maxalignlen; pos++) {
404 int mfi =
int(mf*100.0+0.01);
407 if (mfi<10) mfi = 10;
409 int mfh =
int(mfi/10);
410 int mfl = mfi-10*mfh;
412 result1[pos] =
"?1234567890"[mfh];
413 result2[pos] =
"0123456789"[mfl];
435 const char *
type =
GBS_global_string(
"MFQ: [species: %li] [ignore gaps: %s]", nrofspecies, ignore_gaps ?
"yes" :
"no");
444 error = ta.
close(error);
469 AW_window_simple *aws =
new AW_window_simple;
470 aws->init(aw_root,
"MAX_FREQUENCY",
"MAX FREQUENCY");
471 aws->
load_xfig(
"consensus/max_freq.fig");
475 aws->button_length(6);
479 aws->create_button(
"CLOSE",
"CLOSE",
"C");
482 aws->create_button(
"HELP",
"HELP",
"H");
487 aws->create_button(
"GO",
"GO",
"C");
510 static GBDATA *create_simple_seq_db(
const char *aliname,
const char *alitype,
const char **sequence,
int sequenceCount,
int sequenceLength) {
518 TEST_EXPECT_RESULT__NOERROREXPORTED(
GBT_create_alignment(gb_main, aliname, sequenceLength,
true, 6, alitype,
"by create_simple_seq_db"));
520 for (
int s = 0;
s<sequenceCount; ++
s) {
539 static void read_frequency(
GBDATA *gb_main,
const char *sainame,
const char *aliname,
const char*& data,
const char*& dat2) {
551 void TEST_nucleotide_consensus_and_maxFrequency() {
552 const char *sequence[] = {
553 "-.AAAAAAAAAAcAAAAAAAAATTTTTTTTTTTTTTTTTAAAAAAAAgggggAAAAgAA----m-----yykm-mmmAAAAAAAAAmmmmmmmmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKKKKKKKKWWWWWWWWW",
554 "-.-AAAAAAAAAccAAAAAAAAggTTgTTTTgTTTTTTTcccAAAAAgggggAAAAgAA----k-----kykr-rrrAAAAAAAAmmmmmmmmmT-NNNNNNNNNANNNNNbNNNNNNNNkNNNNNNNNaNNNNNNNNbKKKKKKKKbWWWWWWWW",
555 "-.--AAAAAAAAcccAAAAAAA-ggTggTTTggTTTTTTccccAAAAgggCCtAAAgAC----m-----sykw-wvsAAAAAAAmmmmmmmmmTT--NNNNNNNNCANNNNbbNNNNNNNkkNNNNNNNaaNNNNNNNbbKKKKKKKbbWWWWWWW",
556 "-.---AAAAAAAccccAAAAAA-ggggggTTgggTTTTTcccccAAAggCCC-tAACtC----k----yyyys-smvAAAAAAmmmmmmmmmTTT---NNNNNNNGCANNNbbbNNNNNNkkkNNNNNNaaaNNNNNNbbbKKKKKKbbbWWWWWW",
557 "-.----AAAAAAcccccAAAAA----ggggTggggTTTTGGGcccAAgCCCt-ttACtG----m---nkkkky-yrmAAAAAmmmmmmmmmTTTT----NNNNNNTGCANNbbbbNNNNNkkkkNNNNNaaaaNNNNNbbbbKKKKKbbbbWWWWW",
558 "-.-----AAAAAccccccAAAA----ggggggggggTTgGGGGcccAcCCtt--tttCG----k--nnssssk-kvrAAAAmmmmmmmmmTTTTT-----NNNNN-TGCANbbbbbNNNNkkkkkNNNNaaaaaNNNNbbbbbKKKKbbbbbWWWW",
559 "-.------AAAAcccccccAAA---------ggggggTgGGGGGccccCt----tt-gT----mydddyyyy-vvmsAAAmmmmmmmmmTTTTTT------NNNN-ATGCAbbbbbbNNNkkkkkkNNNaaaaaaNNNbbbbbbKKKbbbbbbWWW",
560 "-.-------AAAccccccccAA---------ggggggggttGGGGccct------t--T-yykkkbbbkkkk-hhrvAAmmmmmmmmmTTTTTTT-------NNN-C-TGCbbbbbbbNNkkkkkkkNNaaaaaaaNNbbbbbbbKKbbbbbbbWW",
561 "-.--------AAcccccccccA----------------gttGGGGGct-------t----ymmmmnnnssss-ddvmAmmmmmmmmmTTTTTTTT--------NN-G--TGbbbbbbbbNkkkkkkkkNaaaaaaaaNbbbbbbbbKbbbbbbbbW",
562 "-.---------Acccccccccc----------------gtAGGGGGG----------------k---------bbmrmmmmmmmmmTTTTTTTTT---------N-T---Tbbbbbbbbbkkkkkkkkkaaaaaaaaabbbbbbbbbbbbbbbbbb",
564 const char *expected_frequency[] = {
566 "0=9876567890098765678986665444576545675336544565434475454320888277654333462439988776654434567899876543222523222333322222444433332987765443333444444333444444",
567 "0=0000000000000000000000000000000000000000000000000000000000000500000055005565050505055050000000000000025050025210098765752075207257025702568013568568013568",
569 "==000000000009876567895757865688765678533654456554536655542=552233223333222439988776654434567892222222222222222333322222444433332987765443333444444333444444",
570 "==000000000000000000000505360637520257000000000502036075025=005530983388555565050505055050000005555555555555555210098765752075207257025702568013568568013568",
572 const char *expected_consensus[] = {
573 "==----..aaaACccMMMMMaa----.....g.kkk.uKb.ssVVmmss...-.ww...=---.---..byk.-.mVAaaaaMMMMmmHH..uuu----............BBbb.....Kkkkkk...aaaa.....BkkkkkkkKB....wwww",
574 "==AAAAAAAAAACccMMMMMaaKgKugKKKuggKKKuuKb.ssVVmmssssBWWWWs..=Y.......BByk...mVAaaaaMMMMmmHH..uuu................BBbb.....Kkkkkk...aaaa.....BkkkkkkkKB....wwww",
575 "==AAAAAAAAAACCCMMMMMAAKGKUGKKKUGGKKKUUKBsSSVVMMSSSSBWWWWSwa=YcaaykkkBBYKaaaMVAAAAAMMMMMMHHuuuUUaaaaaaaaaaaaaaaaBBBBBBBBcKKKKKkkkkAAAaaaaaaBBKKKKKKKBBuuuwWWW",
576 "==AAAAAAAAAACCCMMMMMAAKKKKGKKKUGKKKKKUKBsSSVVMMSSSSBWWWWSwN=YHNNykkkBBYKNNNVVAAAAMMMMMMMHHHuuUUNNNNNNNNNNNNNNNNBBBBBBBBBKKKKKkkkkAAAaaaaaaBBKKKKKKKBBuuwwWWW",
577 "==---aaaaAAACCCMMMMMAA-gkugkkkuggKKKuuKBsSSVVMMSsssb-wwWswa=---a--kkbBykaaaMVAAAAAMMMMMMHHuuuUU---aaaaaaaaaaaaaBBBBBBBBcKKKKKkkkkAAAaaaaaaBBKKKKKKKBBuuuwWWW",
578 "==---aaaaAAACCMMMMMMMA-kkkgkkkugKKKKKuKBNSVVVVMSsssb-wwWswN=---N--nnbBBBnnNVVAAAMMMMMMMHHHHHuUU---nnnnNNNnNnNNNBBBBBBBNNKKKKKkkNNAAAaaaaNNBBBBKKKKKBBBNwwWWW",
579 "==---aaaaAAACMMMMMMMMM-kkkkkkkkKKKKKKKKNNVVVVVVBBbbb-wwWbnN=---N--nnbBBBnnNVVMMMMMMMMMHHHHHHHHH---nnnnNNNnNnNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBBBBBBBBBNNNNNNNNN",
580 "==---aaaaAAACMMMMMMMMM-kkkkkkkkKKKKKKKKNNVVVVVVBBbbb-wwWbnN=---N--nnbBBBnnNVVMMMMMMMMMHHHHHHHHH---nnnnNNNnNnNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBBBBBBBBBNNNNNNNNN",
581 "==AAAAAAAAAACMMMMMMMMMKKKKKKKKKKKKKKKKKNNVVVVVVBBBBBWWWWBNN=YHNNNNNNBBBBNNNVVMMMMMMMMMHHHHHHHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBBBBBBBBBNNNNNNNNN",
583 const size_t seqlen = strlen(sequence[0]);
585 const int consensusCount =
ARRAY_ELEMS(expected_consensus);
589 const char *aliname =
"ali_nuc";
590 GBDATA *gb_main = create_simple_seq_db(aliname,
"rna", sequence, sequenceCount, seqlen);
593 for (
int c = 0; c<consensusCount; ++c) {
610 const char *sainame =
"CONSENSUS";
622 const char *sainame =
"MAXFREQ";
623 for (
int ignore_gaps = 0; ignore_gaps<=1; ++ignore_gaps) {
626 const char *data, *dat2;
627 read_frequency(gb_main, sainame, aliname, data, dat2);
635 void TEST_amino_consensus_and_maxFrequency() {
636 const char *sequence[] = {
637 "-.ppppppppppQQQQQQQQQDDDDDELLLLLwwwwwwwwwwwwwwwwgggggggggggSSSe-PPP-DELp",
638 "-.-pppppppppkQQQQQQQQnDDDDELLLLLVVwwVwwwwVwwwwwwSgggggggggSSSee-QPP-DELa",
639 "-.--ppppppppkkQQQQQQQnnDDDELLLLL-VVwVVwwwVVwwwwwSSgggggggSSSeee-KQP-DEIg",
640 "-.---pppppppkkkQQQQQQnnnDDELLLLL-VVVVVVwwVVVwwwwSSSgggggSSSeee--LQQ-DQIs",
641 "-.----ppppppkkkkQQQQQnnnnDELLLLL----VVVVwVVVVwwweSSSgggSSSeee---WKQ-NQJt",
642 "-.-----pppppkkkkkQQQQnnnnnqiLLLL----VVVVVVVVVVwweeSSSggSSeee-----KQ-NQJq",
643 "-.------ppppkkkkkkQQQnnnnnqiiLLL---------VVVVVVweeeSSSgSeee------LK-NZJn",
644 "-.-------pppkkkkkkkQQnnnnnqiiiLL---------VVVVVVVeeeeSSSeee-------LK-NZJe",
645 "-.--------ppkkkkkkkkQnnnnnqiiiiL----------------eeeeeSSee--------WK-BZJd",
646 "-.---------pkkkkkkkkknnnnnqiiiii----------------eeeeeeSe---------WK-BZJb",
647 "-.ppppppppppQQQQQQQQQDDDDDELLLLLwwwwwwwwwwwwwwwwgggggggggggSSSe-PPP-DELz",
648 "-.-pppppppppkQQQQQQQQnDDDDELLLLLVVwwVwwwwVwwwwwwSgggggggggSSSee-QPP-DELh",
649 "-.--ppppppppkkQQQQQQQnnDDDELLLLL-VVwVVwwwVVwwwwwSSgggggggSSSeee-KQP-DEIk",
650 "-.---pppppppkkkQQQQQQnnnDDELLLLL-VVVVVVwwVVVwwwwSSSgggggSSSeee--LQQ-DQIr",
651 "-.----ppppppkkkkQQQQQnnnnDELLLLL----VVVVwVVVVwwweSSSgggSSSeee---WKQ-NQJl",
652 "-.-----pppppkkkkkQQQQnnnnnqiLLLL----VVVVVVVVVVwweeSSSggSSeee-----KQ-NQJi",
653 "-.------ppppkkkkkkQQQnnnnnqiiLLL---------VVVVVVweeeSSSgSeee------LK-NZJv",
654 "-.-------pppkkkkkkkQQnnnnnqiiiLL---------VVVVVVVeeeeSSSeee-------LK-NZJm",
655 "-.--------ppkkkkkkkkQnnnnnqiiiiL----------------eeeeeSSee--------WK-BZJf",
656 "-.---------pkkkkkkkkknnnnnqiiiii----------------eeeeeeSe---------WK-BZJy",
658 const char *expected_frequency[] = {
660 "0=9876567890987656789987655567898666544457654567654456743334567052404461",
661 "0=0000000000000000000000000000000000000000000000000000000000000000000000",
663 "==0000000000987656789987655567895757865688765678654456743345670=224=4461",
664 "==0000000000000000000000000000000505360637520257000000003720050=000=0000",
666 const char *expected_consensus[] = {
667 "==----..aaaAhhh...dddDDDDDDIIIII----.....i.....f...aaaAa.....--=.X.=DDI.",
668 "==AAAAAAAAAAhhh...dddDDDDDDIIIII.i.fi...fii...ff...aaaAa.....dD=XX.=DDI.",
669 "==AAAAAAAAAAHHhhdddDDDDDDDDIIIIIiIiFIiifFIIiifFFdaaaAAAaaaaadDD=XXh=DDId",
670 "==---aaaaAAAHHhhdddDDDDDDDDIIIII-iifiiiffiiiifffdaaaAAAaaaaadd-=xXh=DDId",
671 "==---aaaaAAAHHhhdddDDDDDDDDIIIII-iifiiiffiiiifffdaaaAAAaaaaadd-=aah=DDId",
672 "==---aaaaAAAHHhhXddDDDDDDDDIIIII-ixfiixffiiiXfffdXaaAAAaaaaxdd-=xXX=DDIX",
673 "==---aaaaAAAHXXXXXXXDDDDDDDIIIII-xxxxxxxxXXXXXXXXXXXXAAXXXxxxx-=xXX=DDIX",
674 "==---aaaaAAAXXXXXXXXXDDDDDDIIIII-xxxxxxxxXXXXXXXXXXXXXAXXXxxxx-=xXX=DDIX",
675 "==---aaaaAAAHHhhdddDDDDDDDDIIIII-iifiiiffiiiifffdaaaAAAaaaaadd-=aah=DDId",
677 const size_t seqlen = strlen(sequence[0]);
679 const int consensusCount =
ARRAY_ELEMS(expected_consensus);
683 const char *aliname =
"ali_ami";
684 GBDATA *gb_main = create_simple_seq_db(aliname,
"ami", sequence, sequenceCount, seqlen);
687 for (
int c = 0; c<consensusCount; ++c) {
704 const char *sainame =
"CONSENSUS";
716 const char *sainame =
"MAXFREQ";
717 for (
int ignore_gaps = 0; ignore_gaps<=1; ++ignore_gaps) {
720 const char *data, *dat2;
721 read_frequency(gb_main, sainame, aliname, data, dat2);
AW_window * AP_create_max_freq_window(AW_root *aw_root)
GBDATA * GB_open(const char *path, const char *opent)
AW_DB_selection * awt_create_SAI_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname, const SaiSelectionlistFilterCallback &fcb)
GBDATA * GBT_first_marked_species(GBDATA *gb_main)
#define AWAR_CONSENSUS_GAPBOUND
GB_ERROR GB_save(GBDATA *gb, const char *path, const char *savetype)
#define AWAR_CONSENSUS_NAME
GB_ERROR GB_append_exportedError(GB_ERROR error)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
void load_xfig(const char *file, bool resize=true)
#define AWAR_CONSENSUS_MARKED_ONLY
static AWT_config_mapping_def consensus_config_mapping[]
#define CONSENSUS_CONFIG_COUNTGAPS
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
char * build_consensus_string(PosRange r, const ConsensusBuildParams &cbp) const
#define AWAR_CONSENSUS_GROUP
char * ARB_strdup(const char *str)
void AWT_insert_config_manager(AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store_cb, const RestoreConfigCallback &load_or_reset_cb, const char *macro_id, const AWT_predefined_config *predef)
double max_frequency_at(int column, bool ignore_gaps) const
AW_awar * set_minmax(float min, float max)
const char * GBS_global_string(const char *templat,...)
long GBT_get_alignment_len(GBDATA *gb_main, const char *aliname)
void AW_POPDOWN(AW_window *window)
void auto_subtitles(const char *prefix)
void cat(const char *from)
#define CONSENSUS_CONFIG_GROUP
#define ARRAY_ELEMS(array)
char buffer[MESSAGE_BUFFERSIZE]
GBDATA * GB_get_father(GBDATA *gbd)
GB_ERROR GB_push_transaction(GBDATA *gbd)
AW_awar * add_callback(const RootCallback &cb)
GB_ERROR GB_delete(GBDATA *&source)
#define CONSENSUS_CONFIG_GAPBOUND
GBDATA * GBT_find_SAI(GBDATA *gb_main, const char *name)
const char * read_char_pntr() const
#define AWAR_CONSENSUS_CONSIDBOUND
NOT4PERL GBDATA * GBT_add_data(GBDATA *species, const char *ali_name, const char *key, GB_TYPES type) __ATTR__DEPRECATED_TODO("better use GBT_create_sequence_data()")
#define CONSENSUS_CONFIG_ID
size_t GB_read_string_count(GBDATA *gbd)
GB_ERROR GB_await_error()
static void setup(const char *gap_chars, GB_alignment_type ali_type_)
WindowCallback makeHelpCallback(const char *helpfile)
#define CONSENSUS_CONFIG_CONSIDBOUND
AW_window * AWT_create_IUPAC_info_window(AW_root *aw_root)
#define AWAR_MAX_FREQ_SAI_NAME
static void CON_calculate_cb(AW_window *aw)
static void error(const char *msg)
void AP_create_consensus_var(AW_root *aw_root, AW_default aw_def)
#define CONSENSUS_CONFIG_UPPER
GBDATA * GBT_find_or_create_species_rel_species_data(GBDATA *gb_species_data, const char *name, bool markCreated)
#define AWAR_CONSENSUS_LOWER
GBDATA * GBT_next_marked_species(GBDATA *gb_species)
GB_alignment_type GBT_get_alignment_type(GBDATA *gb_main, const char *aliname)
static void consensus_upper_lower_changed_cb(AW_root *awr, bool upper_changed)
char * read_string() const
AW_awar * awar(const char *awar)
GB_ERROR GB_pop_transaction(GBDATA *gbd)
GBDATA * GBT_find_sequence(GBDATA *gb_species, const char *aliname)
#define AWAR_CONSENSUS_UPPER
long GBT_count_marked_species(GBDATA *gb_main)
static int CON_insertSequences(GBDATA *gb_main, const char *aliname, long maxalignlen, bool onlymarked, BaseFrequencies &freqs)
AW_DB_selection * awt_create_ALI_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname, const char *ali_type_match)
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
#define IF_ASSERTION_USED(x)
GB_ERROR close(GB_ERROR error)
static void CON_calc_max_freq_cb(AW_window *aw)
GB_ERROR GBT_write_string(GBDATA *gb_container, const char *fieldpath, const char *content)
AW_window * AP_create_con_expert_window(AW_root *aw_root)
GBDATA * GBT_first_species(GBDATA *gb_main)
static GB_ERROR CON_export(GBDATA *gb_main, const char *savename, const char *align, const char *result, bool onlymarked, long nrofspecies, const ConsensusBuildParams &BK)
void GBT_message(GBDATA *gb_main, const char *msg)
#define TEST_EXPECT_NO_ERROR(call)
#define AWAR_CONSENSUS_COUNTGAPS
GBDATA * GBT_create_alignment(GBDATA *gb_main, const char *name, long len, long aligned, long security, const char *type, const char *why_created)
GBDATA * GBT_next_species(GBDATA *gb_species)
char * GBT_get_default_alignment(GBDATA *gb_main)
const char * get_data() const
GBDATA * GBT_find_or_create_SAI(GBDATA *gb_main, const char *name)
long GBT_get_species_count(GBDATA *gb_main)
#define AWAR_MAX_FREQ_IGNORE_GAPS
GB_transaction ta(gb_var)
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
static GB_ERROR CON_calc_max_freq(GBDATA *gb_main, bool ignore_gaps, const char *savename, const char *aliname)
#define AWAR_CONSENSUS_ALIGNMENT
#define CONSENSUS_CONFIG_LOWER
#define TEST_EXPECT_EQUAL(expr, want)
GB_ERROR write_int(long aw_int)
int added_sequences() const
GBDATA * GB_entry(GBDATA *father, const char *key)
static GB_ERROR CON_calculate(GBDATA *gb_main, const ConsensusBuildParams &BK, const char *aliname, bool onlymarked, const char *sainame)
void aw_message_if(GB_ERROR error)
char * GBS_global_string_copy(const char *templat,...)
void GB_close(GBDATA *gbd)
GBDATA * GBT_get_species_data(GBDATA *gb_main)
GB_write_int const char s