26 while (string_to_scan[i]) {
27 if (string_to_scan[i] == 1) {
28 if (string_to_scan[i+1] ==
'L' || string_to_scan[i+1] ==
'S') {
32 else if (string_to_scan[i+1] ==
'F' || string_to_scan[i+1] ==
'G') {
88 sprintf(namebuffer,
"Species_Manager.%ld.%d",
ED4_counter, count_two);
89 ED4_species_manager *species_manager =
new ED4_species_manager(spec_type, namebuffer, 0, 0, multi_species_manager);
96 species_manager->set_species_pointer(gb_item);
99 sprintf(namebuffer,
"MultiName_Manager.%ld.%d",
ED4_counter, count_two);
101 species_manager->append_member(multi_name_manager);
103 sprintf(namebuffer,
"MultiSeq_Manager.%ld.%d",
ED4_counter, count_two++);
105 species_manager->append_member(multi_sequence_manager);
107 sprintf(namebuffer,
"Name_Manager%ld.%d",
ED4_counter, count_two++);
113 sprintf(namebuffer,
"Species_Name_Term%ld.%d",
ED4_counter, count_two++);
116 species_name_terminal->set_links(
NULp, refterms.
sequence());
117 species_name_terminal->set_species_pointer(
GB_entry(gb_item,
"name"));
122 sprintf(namebuffer,
"Flag_Term%ld.%d",
ED4_counter, count_two++);
157 search_sequence_data_rek(multi_sequence_manager, refterms, gb_ali_child, count_too, max_sequence_terminal_length, isSAI);
161 if (key_string[0] !=
'_') {
162 sprintf(namebuffer,
"Sequence_Manager.%ld.%d",
ED4_counter, count_too++);
170 sequence_info_terminal->set_both_links(refterms.
sequence_info());
171 sequence_info_terminal->set_species_pointer(gb_ali_child);
177 bool is_data =
false;
178 bool is_data2 =
false;
179 bool is_bits =
false;
180 bool is_quality =
false;
182 if (strcmp(key_string,
"data") == 0) is_data =
true;
183 else if (strcmp(key_string,
"data2") == 0) is_data2 =
true;
184 else if (strcmp(key_string,
"bits") == 0) is_bits =
true;
185 else if (strcmp(key_string,
"quality") == 0) is_quality =
true;
187 bool is_aligned = is_data || is_data2 || is_bits || is_quality;
190 bool shall_display_secinfo = is_data;
198 sprintf(namebuffer,
"Sequence_Term%ld.%d",
ED4_counter, count_too++);
205 text_terminal = seq_term;
208 sprintf(namebuffer,
"PureText_Term%ld.%d",
ED4_counter, count_too++);
209 text_terminal =
new ED4_pure_text_terminal(namebuffer, 0,
TERMINAL_HEIGHT, seq_manager);
233 *max_sequence_terminal_length =
std::max(*max_sequence_terminal_length,
long(pixel_length));
264 bool expect_separator =
true;
272 if (expect_separator) {
273 if (str[(*index)+1] ==
'L') {
276 else if (str[(*index)+1] ==
'S') {
280 const char *entry = str+*index+1;
282 const char *sep = strchr(entry, 1);
285 int len = sep-entry+1;
287 char *
message =
GBS_global_string_copy(
"Unknown or misplaced tag-id '%c' (with content '%s'). Error in configuration-data!\nTrying to continue..", tag, content);
289 fprintf(stderr,
"ARB_EDIT4: %s\n", message);
296 (*index) += sep-entry+1;
300 fprintf(stderr,
"Error reading configuration: Unexpected end of data (at '%s')\n", str+*index);
312 if (str[*index] != 1) {
313 name[npos++] = str[*index];
314 expect_separator =
false;
318 if (str[*index] == 1 || str[*index] ==
'\0') {
327 fill_data(multi_species_manager, refterms, name, group_depth, datamode);
330 expect_separator =
true;
333 while (!((str[(*index)] == 1) && (str[(*index)+1] ==
'G' || str[(*index)+1]==
'E' || str[(*index)+1]==
'F')) && (str[*index] !=
'\0'));
346 static int group_depth = 0;
348 while (str[(*index)] !=
'\0' && str[(*index)+1] !=
'E') {
349 if (str[(*index)+1] ==
'L' || str[(*index)+1] ==
'S') {
350 fill_species(parent, refterms, str, index, group_depth, &progress);
354 if (str[(*index)] && (str[(*index)+1] ==
'G' || str[(*index)+1] ==
'F')) {
356 bool is_folded = str[(*index)+1]==
'F';
361 for (*index += 2, gpos = 0; str[*index] != 1; (*index)++) {
362 groupname[gpos++] = str[*index];
364 groupname[gpos] =
'\0';
371 scan_string(multi_species_manager, refterms, str, index, progress);
379 if (str[(*index)] && str[(*index)+1] ==
'E') {
395 for (
int i=0; i<device_manager->
members(); i++) {
411 error = cfg.
save(gb_main, confname,
true);
void set_both_links(ED4_base *ref)
AW_device * get_device() const
void calc_no_of_all(const char *string_to_scan, long *group, long *species)
long GB_read_int(GBDATA *gbd)
char * GB_read_key(GBDATA *gbd)
GBDATA * GB_child(GBDATA *father)
ED4_base * member(ED4_index i) const
BaseFrequencies & table()
void set_species_pointer(GBDATA *gbd)
ED4_returncode search_sequence_data_rek(ED4_multi_sequence_manager *multi_sequence_manager, ED4_reference_terminals &refterms, GBDATA *gb_ali_xxx, int count_too, ED4_index *max_sequence_terminal_length, bool isSAI)
void cat(const char *from)
ED4_group_manager * ED4_build_group_manager_start(ED4_manager *group_parent, GB_CSTR group_name, int group_depth, bool is_folded, ED4_reference_terminals &refterms, ED4_multi_species_manager *&multi_species_manager)
GBDATA * GB_get_grandfather(GBDATA *gbd)
void save_current_config(char *confname)
GBDATA * GBT_find_SAI(GBDATA *gb_main, const char *name)
#define SEQUENCE_INFO_WIDTH
char * get_name_of_species()
long GB_read_count(GBDATA *gbd)
void append_member(ED4_base *new_member)
GB_TYPES GB_read_type(GBDATA *gbd)
void ED4_build_group_manager_end(ED4_multi_species_manager *multi_species_manager)
ED4_index members() const
#define MAX_SHOWN_MISSING_SPECIES
int get_string_size(int gc, long textlen) const
GBDATA * get_gb_main() const
void message(char *errortext)
ED4_window * first_window
const char * get_comment() const
ED4_returncode fill_data(ED4_multi_species_manager *multi_species_manager, ED4_reference_terminals &refterms, char *str, int group_depth, ED4_datamode datamode)
static void error(const char *msg)
void scan_string(ED4_multi_species_manager *parent, ED4_reference_terminals &refterms, const char *str, int *index, arb_progress &progress)
void set_comment(const char *newComment)
GBDATA * GB_searchOrCreate_int(GBDATA *gb_container, const char *fieldpath, long default_value)
GB_ERROR save(GBDATA *gb_main, const char *name, bool warnIfSavingDefault) const
GBS_strstruct * not_found_message
char * GBS_log_action_to(const char *comment, const char *action, bool stamp)
void ED4_exit() __ATTR__NORETURN
ED4_scroll_links scroll_links
ED4_sequence_info_terminal * sequence_info()
ED4_returncode fill_species(ED4_multi_species_manager *multi_species_manager, ED4_reference_terminals &refterms, const char *str, int *index, int group_depth, arb_progress *progress)
void generate_configuration_string(GBS_strstruct &buffer)
int MAXSEQUENCECHARACTERLENGTH
#define GB_GROUP_NAME_MAX
void set_property(ED4_properties prop)
char * ARB_strndup(const char *start, int len)
const char * get_alignment_name() const
ED4_sequence_terminal * sequence()
void aw_message(const char *msg)
long max_seq_terminal_length
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
int is_area_manager() const
GBDATA * GB_nextChild(GBDATA *child)
ED4_device_manager * get_device_manager()
ED4_manager * get_parent(ED4_level lev) const
const ED4_terminal * get_consensus_relevant_terminal() const
GBDATA * GB_entry(GBDATA *father, const char *key)
void aw_message_if(GB_ERROR error)
char * GBS_global_string_copy(const char *templat,...)
void set_definition(int area, char *new_def)