25 #define AWAR_DOT_BASE "dotmiss/"
26 #define AWAR_DOT_SAI AWAR_DOT_BASE "sainame" // selected SAI
27 #define AWAR_DOT_SAI_CHARS AWAR_DOT_BASE "chars" // handle columns where SAI contains one of these chars
28 #define AWAR_DOT_MARKED AWAR_DOT_BASE "marked" // handle marked only?
46 ED4_sequence_info_terminal *seq_term = base->to_sequence_info_terminal();
48 GBDATA *gb_ali = seq_term->data();
66 for (
size_t p = 0; p<stat.
pos_count; p++) {
70 switch (sequence[pos]) {
108 error =
"No consensus selected";
124 for (
int pass = 1; pass <= 2; pass++) {
126 for (
int pos = 0; consensus[pos]; pos++) {
127 if (isupper(consensus[pos])) {
140 error =
"No consensus column contains upper case characters";
150 if (sai_name && sai_name[0]) {
165 error = ta.
close(error);
171 if (sai_chars[0] == 0) error =
"No SAI characters given -> no column selectable";
177 if (strchr(sai_chars, sai[pos])) {
183 if (!stat.
pos_count) error =
"SAI selects other columns than consensus. Nothing to do.";
201 const char *present =
"";
208 :
"No gaps were changed into dots.";
213 error = ta.
close(error);
236 static AW_window_simple *aws =
NULp;
241 aws =
new AW_window_simple;
243 aws->init(aw_root,
"DOT_MISS_BASES",
"Dot potentially missing bases");
244 aws->load_xfig(
"edit4/missbase.fig");
246 aws->button_length(10);
250 aws->create_button(
"CLOSE",
"CLOSE",
"C");
254 aws->create_button(
"HELP",
"HELP",
"H");
257 aws->label(
"Marked species only");
261 aws->button_length(30);
264 aws->at(
"SAI_chars");
265 aws->label(
"contains one of");
268 aws->button_length(10);
271 aws->label(
"Change definition of");
273 aws->create_button(
"CONS_DEF",
"Consensus",
"C");
277 aws->create_button(
"GO",
"GO",
"G");
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
static AWT_config_mapping_def dotbases_config_mapping[]
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)
const char * GBS_global_string(const char *templat,...)
void AW_POPDOWN(AW_window *window)
GBDATA * GBT_expect_SAI(GBDATA *gb_main, const char *name)
ED4_terminal * owner_of_cursor
void awt_create_SAI_selection_button(GBDATA *gb_main, AW_window *aws, const char *varname, const SaiSelectionlistFilterCallback &fcb)
GBDATA * GB_get_grandfather(GBDATA *gbd)
void ED4_create_dot_missing_bases_awars(AW_root *aw_root, AW_default aw_def)
char * build_consensus_string(PosRange range) const
size_t GB_read_string_count(GBDATA *gbd)
GB_ERROR GB_await_error()
WindowCallback makeHelpCallback(const char *helpfile)
TYPE * ARB_alloc(size_t nelem)
GBDATA * get_gb_main() const
bool in_consensus_terminal() const
static ARB_ERROR dot_sequence_by_consensus(ED4_base *base, dot_insert_stat *statPtr)
static void error(const char *msg)
ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb) FINAL_OVERRIDE
int GB_read_flag(GBDATA *gbd)
char * read_string() const
AW_awar * awar(const char *awar)
GBDATA * GBT_find_sequence(GBDATA *gb_species, const char *aliname)
int is_sequence_info_terminal() const
static void dot_missing_bases(AW_window *aww)
void ED4_popup_dot_missing_bases_window(AW_window *editor_window)
ED4_cursor & current_cursor()
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
GB_ERROR close(GB_ERROR error)
const char * get_alignment_name() const
char * GB_read_string(GBDATA *gbd)
void aw_message(const char *msg)
#define AWAR_DOT_SAI_CHARS
GB_transaction ta(gb_var)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GB_CSTR GBT_get_name_or_description(GBDATA *gb_item)
AW_window * ED4_create_consensus_definition_window(AW_root *root)
ED4_manager * get_parent(ED4_level lev) const
void aw_message_if(GB_ERROR error)