ARB
Functions
ad_t_prot.h File Reference
#include <attributes.h>
Include dependency graph for ad_t_prot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GBDATAGBT_get_changekey (GBDATA *gb_main, const char *key, const char *change_key_path)
 
GB_TYPES GBT_get_type_of_changekey (GBDATA *gb_main, const char *field_name, const char *change_key_path)
 
GBDATAGBT_searchOrCreate_itemfield_according_to_changekey (GBDATA *gb_item, const char *field_name, const char *change_key_path)
 
GB_ERROR GBT_add_new_changekey_to_keypath (GBDATA *gb_main, const char *name, GB_TYPES type, const char *keypath)
 
GB_ERROR GBT_add_new_species_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_gene_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_experiment_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_changekey (GBDATA *gb_main, const char *name, int type) __ATTR__DEPRECATED_TODO("obsolete. use GBT_add_new_species_changekey() instead")
 
GB_ERROR GBT_add_alignment_changekeys (GBDATA *gb_main, const char *ali)
 
GB_ERROR GBT_write_int_converted (GBDATA *gb_int_writable, const char *data, size_t *rounded)
 
GB_ERROR GBT_write_float_converted (GBDATA *gb_float_writable, const char *data)
 
GB_ERROR GBT_convert_changekey (GBDATA *gb_main, const char *name, GB_TYPES target_type)
 
charGBT_reverseNucSequence (const char *s, int len)
 
charGBT_complementNucSequence (const char *s, int len, char T_or_U)
 
NOT4PERL GB_ERROR GBT_determine_T_or_U (GB_alignment_type alignment_type, char *T_or_U, const char *supposed_target)
 
NOT4PERL void GBT_reverseComplementNucSequence (char *seq, long length, char T_or_U)
 
GBDATAGBT_get_presets (GBDATA *gb_main)
 
int GBT_count_alignments (GBDATA *gb_main)
 
GB_ERROR GBT_check_data (GBDATA *Main, const char *alignment_name)
 
void GBT_get_alignment_names (ConstStrArray &names, GBDATA *gbd)
 
GB_ERROR GBT_check_alignment_name (const char *alignment_name)
 
GBDATAGBT_create_alignment (GBDATA *gb_main, const char *name, long len, long aligned, long security, const char *type, const char *why_created)
 
GB_ERROR GBT_copy_alignment (GBDATA *gbMain, const char *source, const char *dest)
 
GB_ERROR GBT_rename_alignment (GBDATA *gbMain, const char *source, const char *dest)
 
GB_ERROR GBT_delete_alignment (GBDATA *gbMain, const char *source)
 
NOT4PERL GBDATAGBT_add_data (GBDATA *species, const char *ali_name, const char *key, GB_TYPES type) __ATTR__DEPRECATED_TODO("better use GBT_create_sequence_data()")
 
NOT4PERL GBDATAGBT_create_sequence_data (GBDATA *species, const char *ali_name, const char *key, GB_TYPES type, int security_write)
 
GBDATAGBT_gen_accession_number (GBDATA *gb_species, const char *ali_name)
 
int GBT_is_partial (GBDATA *gb_species, int default_value, bool define_if_undef)
 
GBDATAGBT_find_sequence (GBDATA *gb_species, const char *aliname)
 
charGBT_get_default_alignment (GBDATA *gb_main)
 
charGBT_get_startup_alignment (GBDATA *gb_main)
 
GB_ERROR GBT_set_default_alignment (GBDATA *gb_main, const char *alignment_name)
 
GB_ERROR GBT_set_startup_alignment (GBDATA *gb_main, const char *alignment_name)
 
GBDATAGBT_get_alignment (GBDATA *gb_main, const char *aliname)
 
long GBT_get_alignment_len (GBDATA *gb_main, const char *aliname)
 
GB_ERROR GBT_set_alignment_len (GBDATA *gb_main, const char *aliname, long new_len)
 
charGBT_get_alignment_type_string (GBDATA *gb_main, const char *aliname)
 
GB_alignment_type GBT_get_alignment_type (GBDATA *gb_main, const char *aliname)
 
bool GBT_is_alignment_protein (GBDATA *gb_main, const char *alignment_name)
 
NOT4PERL charGBT_read_gene_sequence_and_length (GBDATA *gb_gene, bool use_revComplement, char partSeparator, size_t *gene_length)
 
charGBT_read_gene_sequence (GBDATA *gb_gene, bool use_revComplement, char partSeparator)
 
GBDATAGBT_find_or_create_item_rel_item_data (GBDATA *gb_item_data, const char *itemname, const char *id_field, const char *id, bool markCreated)
 
GBDATAGBT_find_or_create_species_rel_species_data (GBDATA *gb_species_data, const char *name, bool markCreated)
 
GBDATAGBT_find_or_create_species (GBDATA *gb_main, const char *name, bool markCreated)
 
GBDATAGBT_find_or_create_SAI (GBDATA *gb_main, const char *name)
 
GBDATAGBT_find_item_rel_item_data (GBDATA *gb_item_data, const char *id_field, const char *id_value)
 
GBDATAGBT_expect_item_rel_item_data (GBDATA *gb_item_data, const char *id_field, const char *id_value)
 
GBDATAGBT_get_species_data (GBDATA *gb_main)
 
GBDATAGBT_first_marked_species_rel_species_data (GBDATA *gb_species_data)
 
GBDATAGBT_first_marked_species (GBDATA *gb_main)
 
GBDATAGBT_next_marked_species (GBDATA *gb_species)
 
GBDATAGBT_first_species_rel_species_data (GBDATA *gb_species_data)
 
GBDATAGBT_first_species (GBDATA *gb_main)
 
GBDATAGBT_next_species (GBDATA *gb_species)
 
GBDATAGBT_find_species_rel_species_data (GBDATA *gb_species_data, const char *name)
 
GBDATAGBT_expect_species_rel_species_data (GBDATA *gb_species_data, const char *name)
 
GBDATAGBT_find_species (GBDATA *gb_main, const char *name)
 
GBDATAGBT_expect_species (GBDATA *gb_main, const char *name)
 
GBDATAGBT_get_SAI_data (GBDATA *gb_main)
 
GBDATAGBT_first_SAI_rel_SAI_data (GBDATA *gb_sai_data)
 
GBDATAGBT_first_SAI (GBDATA *gb_main)
 
GBDATAGBT_next_SAI (GBDATA *gb_sai)
 
GBDATAGBT_find_SAI_rel_SAI_data (GBDATA *gb_sai_data, const char *name)
 
GBDATAGBT_expect_SAI_rel_SAI_data (GBDATA *gb_sai_data, const char *name)
 
GBDATAGBT_find_SAI (GBDATA *gb_main, const char *name)
 
GBDATAGBT_expect_SAI (GBDATA *gb_main, const char *name)
 
long GBT_get_species_count (GBDATA *gb_main)
 
long GBT_get_SAI_count (GBDATA *gb_main)
 
charGBT_create_unique_species_name (GBDATA *gb_main, const char *default_name)
 
long GBT_mark_all (GBDATA *gb_main, int flag)
 
long GBT_mark_all_that (GBDATA *gb_main, int flag, bool(*condition)(GBDATA *, void *), void *cd)
 
long GBT_count_marked_species (GBDATA *gb_main)
 
charGBT_store_marked_species (GBDATA *gb_main, bool unmark_all)
 
NOT4PERL GB_ERROR GBT_with_stored_species (GBDATA *gb_main, const char *stored, species_callback doit, int *clientdata)
 
GB_ERROR GBT_restore_marked_species (GBDATA *gb_main, const char *stored_marked)
 
GB_CSTR GBT_get_name_or_description (GBDATA *gb_item)
 
const charGBT_get_name (GBDATA *gb_item)
 
NOT4PERL GB_CSTR GBT_read_name (GBDATA *gb_item) __ATTR__DEPRECATED_TODO("please use GBT_get_name or GBT_get_name_or_description()")
 
GBDATA ** GBT_gen_species_array (GBDATA *gb_main, long *speciesCountPtr)
 
GB_ERROR GBT_begin_rename_session (GBDATA *gb_main, int all_flag)
 
GB_ERROR GBT_rename_species (const char *oldname, const char *newname, bool ignore_protection)
 
GB_ERROR GBT_abort_rename_session (void)
 
GB_ERROR GBT_commit_rename_session (void) __ATTR__USERESULT
 
GB_ERROR GBT_compress_sequence_tree2 (GBDATA *gbd, const char *tree_name, const char *ali_name) __ATTR__USERESULT
 
void GBT_compression_test (struct Unfixed_cb_parameter *, GBDATA *gb_main)
 
GBDATAGBT_create (GBDATA *father, const char *key, long delete_level)
 
GBDATAGBT_find_or_create (GBDATA *father, const char *key, long delete_level)
 
charGBT_get_default_helix (GBDATA *)
 
charGBT_get_default_helix_nr (GBDATA *)
 
charGBT_get_default_ref (GBDATA *)
 
void GBT_scan_db (StrArray &fieldNames, GBDATA *gbd, const char *datapath)
 
void GBT_install_message_handler (GBDATA *gb_main)
 
void GBT_message (GBDATA *gb_main, const char *msg)
 
charGBT_read_string (GBDATA *gb_container, const char *fieldpath)
 
charGBT_read_as_string (GBDATA *gb_container, const char *fieldpath)
 
const charGBT_read_char_pntr (GBDATA *gb_container, const char *fieldpath)
 
NOT4PERL longGBT_read_int (GBDATA *gb_container, const char *fieldpath)
 
NOT4PERL float * GBT_read_float (GBDATA *gb_container, const char *fieldpath)
 
charGBT_readOrCreate_string (GBDATA *gb_container, const char *fieldpath, const char *default_value)
 
const charGBT_readOrCreate_char_pntr (GBDATA *gb_container, const char *fieldpath, const char *default_value)
 
NOT4PERL longGBT_readOrCreate_int (GBDATA *gb_container, const char *fieldpath, long default_value)
 
NOT4PERL float * GBT_readOrCreate_float (GBDATA *gb_container, const char *fieldpath, float default_value)
 
GB_ERROR GBT_write_string (GBDATA *gb_container, const char *fieldpath, const char *content)
 
GB_ERROR GBT_write_int (GBDATA *gb_container, const char *fieldpath, long content)
 
GB_ERROR GBT_write_byte (GBDATA *gb_container, const char *fieldpath, unsigned char content)
 
GB_ERROR GBT_write_float (GBDATA *gb_container, const char *fieldpath, float content)
 
GBDATAGBT_open (const char *path, const char *opent)
 
GB_ERROR GB_set_macro_error (GBDATA *gb_main, const char *curr_error)
 
GB_ERROR GB_get_macro_error (GBDATA *gb_main)
 
GB_ERROR GB_clear_macro_error (GBDATA *gb_main)
 
NOT4PERL GB_ERROR GBT_remote_action_with_timeout (GBDATA *gb_main, const char *application, const char *action_name, const class ARB_timeout *timeout, bool verbose)
 
GB_ERROR GBT_remote_action (GBDATA *gb_main, const char *application, const char *action_name)
 
GB_ERROR GBT_remote_awar (GBDATA *gb_main, const char *application, const char *awar_name, const char *value)
 
GB_ERROR GBT_remote_read_awar (GBDATA *gb_main, const char *application, const char *awar_name)
 
const charGBT_relativeMacroname (const char *macro_name)
 
GB_ERROR GBT_macro_execute (const char *macro_name, bool loop_marked, bool run_async)
 
GBDATAGBT_get_tree_data (GBDATA *gb_main)
 
TreeNodeGBT_remove_leafs (TreeNode *tree, GBT_TreeRemoveType mode, const GB_HASH *species_hash, int *removed, int *groups_removed)
 
GB_ERROR GBT_write_group_name (GBDATA *gb_group_name, const char *new_group_name, bool pedantic)
 
GB_ERROR GBT_write_name_to_groupData (GBDATA *gb_group, bool createNameEntry, const char *new_group_name, bool pedantic)
 
GB_ERROR GBT_write_tree (GBDATA *gb_main, const char *tree_name, TreeNode *tree)
 
GB_ERROR GBT_overwrite_tree (GBDATA *gb_tree, TreeNode *tree)
 
GB_ERROR GBT_write_tree_remark (GBDATA *gb_main, const char *tree_name, const char *remark)
 
GB_ERROR GBT_log_to_tree_remark (GBDATA *gb_tree, const char *log_entry, bool stamp)
 
GB_ERROR GBT_log_to_named_trees_remark (GBDATA *gb_main, const char *tree_name, const char *log_entry, bool stamp)
 
GB_ERROR GBT_write_tree_with_remark (GBDATA *gb_main, const char *tree_name, TreeNode *tree, const char *remark)
 
TreeNodeGBT_read_tree_and_size (GBDATA *gb_main, const char *tree_name, TreeRoot *troot, int *tree_size)
 
TreeNodeGBT_read_tree (GBDATA *gb_main, const char *tree_name, TreeRoot *troot)
 
size_t GBT_count_leafs (const TreeNode *tree)
 
GB_ERROR GBT_is_invalid (const TreeNode *tree)
 
GB_ERROR GBT_link_tree (TreeNode *tree, GBDATA *gb_main, bool show_status, int *zombies, int *duplicates)
 
void GBT_unlink_tree (TreeNode *tree)
 
GBDATAGBT_find_tree (GBDATA *gb_main, const char *tree_name)
 
GBDATAGBT_tree_infrontof (GBDATA *gb_tree)
 
GBDATAGBT_tree_behind (GBDATA *gb_tree)
 
GBDATAGBT_find_top_tree (GBDATA *gb_main)
 
GBDATAGBT_find_bottom_tree (GBDATA *gb_main)
 
const charGBT_existing_tree (GBDATA *gb_main, const char *tree_name)
 
GBDATAGBT_find_next_tree (GBDATA *gb_tree)
 
const charGBT_get_tree_name (GBDATA *gb_tree)
 
GB_ERROR GBT_check_tree_name (const char *tree_name)
 
const charGBT_name_of_largest_tree (GBDATA *gb_main)
 
const charGBT_name_of_bottom_tree (GBDATA *gb_main)
 
const charGBT_tree_info_string (GBDATA *gb_main, const char *tree_name, int maxTreeNameLen)
 
long GBT_size_of_tree (GBDATA *gb_main, const char *tree_name)
 
void GBT_get_tree_names (ConstStrArray &names, GBDATA *gb_main, bool sorted)
 
NOT4PERL GB_ERROR GBT_move_tree (GBDATA *gb_moved_tree, GBT_ORDER_MODE mode, GBDATA *gb_target_tree)
 
GB_ERROR GBT_copy_tree (GBDATA *gb_main, const char *source_name, const char *dest_name)
 
GB_ERROR GBT_rename_tree (GBDATA *gb_main, const char *source_name, const char *dest_name)
 
GB_CSTRGBT_get_names_of_species_in_tree (const TreeNode *tree, size_t *count)
 
charGBT_tree_2_newick (const TreeNode *tree, NewickFormat format, bool compact)
 

Function Documentation

GBDATA* GBT_get_changekey ( GBDATA gb_main,
const char key,
const char change_key_path 
)
GB_TYPES GBT_get_type_of_changekey ( GBDATA gb_main,
const char field_name,
const char change_key_path 
)
GBDATA* GBT_searchOrCreate_itemfield_according_to_changekey ( GBDATA gb_item,
const char field_name,
const char change_key_path 
)

search or create an item entry. If the entry exists, the result is identical to GB_search(gb_item, field_name, GB_FIND). If the entry does not exist, an entry with the type stored in the changekey-table will be created.

Returns
created itemfield or NULp in case of error (which is exported in that case)

Definition at line 61 of file adChangeKey.cxx.

References gb_assert, GB_clear_error(), GB_export_errorf(), GB_FIND, GB_get_root(), GB_have_error(), GB_NONE, GB_search(), GBT_get_type_of_changekey(), and type.

Referenced by calc_and_update_alignment_errors_cb(), mark_action(), mergeSimilarSpecies(), set_field_of_queried_cb(), and st_ml_add_quality_string_to_species().

GB_ERROR GBT_add_new_changekey_to_keypath ( GBDATA gb_main,
const char name,
GB_TYPES  type,
const char keypath 
)

Add a new or check an existing changekey for items using 'keypath'

Parameters
gb_maindatabase
namename of changekey. may be hierarchical (e.g. 'ali_16s/data')
typefield type of the key (yields error on mismatch!)
keypathlocation in database where changekeys are stored.
Returns
error

Definition at line 86 of file adChangeKey.cxx.

References ARB_strdup(), CHANGEKEY, CHANGEKEY_NAME, CHANGEKEY_TYPE, error(), gb_assert, GB_await_error(), GB_CREATE_CONTAINER, GB_create_container(), GB_DB, GB_first_non_key_char(), GB_search(), GBS_global_string(), GBT_get_changekey(), GBT_read_int(), GBT_write_int(), GBT_write_string(), and NULp.

Referenced by awt_string_handler::awar_changed(), field_create_cb(), GBT_add_new_experiment_changekey(), GBT_add_new_gene_changekey(), GBT_add_new_species_changekey(), prepare_and_get_selected_itemfield(), and SpeciesFlag::prepare_itemfield().

GB_ERROR GBT_add_new_species_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_gene_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_experiment_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_changekey ( GBDATA gb_main,
const char name,
int  type 
)

Definition at line 145 of file adChangeKey.cxx.

References GBT_add_new_species_changekey().

GB_ERROR GBT_add_alignment_changekeys ( GBDATA gb_main,
const char ali 
)
GB_ERROR GBT_write_int_converted ( GBDATA gb_int_writable,
const char data,
size_t rounded 
)

Definition at line 224 of file adChangeKey.cxx.

References write_int_converted().

Referenced by GBT_convert_changekey().

GB_ERROR GBT_write_float_converted ( GBDATA gb_float_writable,
const char data 
)

Definition at line 228 of file adChangeKey.cxx.

References write_float_converted().

Referenced by GBT_convert_changekey().

GB_ERROR GBT_convert_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  target_type 
)
char* GBT_reverseNucSequence ( const char s,
int  len 
)

Definition at line 66 of file adRevCompl.cxx.

Referenced by revcomp_op::operate(), and SearchTree::SearchTree().

char* GBT_complementNucSequence ( const char s,
int  len,
char  T_or_U 
)
NOT4PERL GB_ERROR GBT_determine_T_or_U ( GB_alignment_type  alignment_type,
char T_or_U,
const char supposed_target 
)
NOT4PERL void GBT_reverseComplementNucSequence ( char seq,
long  length,
char  T_or_U 
)
GBDATA* GBT_get_presets ( GBDATA gb_main)
int GBT_count_alignments ( GBDATA gb_main)

Definition at line 34 of file adali.cxx.

References GB_entry(), GB_nextEntry(), and GBT_get_presets().

Referenced by NT_format_all_alignments().

GB_ERROR GBT_check_data ( GBDATA Main,
const char alignment_name 
)
void GBT_get_alignment_names ( ConstStrArray names,
GBDATA gbd 
)
GB_ERROR GBT_check_alignment_name ( const char alignment_name)
GBDATA* GBT_create_alignment ( GBDATA gb_main,
const char name,
long  len,
long  aligned,
long  security,
const char type,
const char why_created 
)
GB_ERROR GBT_copy_alignment ( GBDATA gbMain,
const char source,
const char dest 
)

Definition at line 584 of file adali.cxx.

References COPY, and copy_move_del_alignment().

Referenced by copy_rename_handler().

GB_ERROR GBT_rename_alignment ( GBDATA gbMain,
const char source,
const char dest 
)

Definition at line 587 of file adali.cxx.

References copy_move_del_alignment(), and MOVE.

Referenced by copy_rename_handler(), and MG_equal_alignments().

GB_ERROR GBT_delete_alignment ( GBDATA gbMain,
const char source 
)

Definition at line 590 of file adali.cxx.

References copy_move_del_alignment(), DELETE, and NULp.

Referenced by delete_ali_cb(), and split_alignment().

NOT4PERL GBDATA* GBT_add_data ( GBDATA species,
const char ali_name,
const char key,
GB_TYPES  type 
)
NOT4PERL GBDATA* GBT_create_sequence_data ( GBDATA species,
const char ali_name,
const char key,
GB_TYPES  type,
int  security_write 
)
GBDATA* GBT_gen_accession_number ( GBDATA gb_species,
const char ali_name 
)
int GBT_is_partial ( GBDATA gb_species,
int  default_value,
bool  define_if_undef 
)
GBDATA* GBT_find_sequence ( GBDATA gb_species,
const char aliname 
)
char* GBT_get_default_alignment ( GBDATA gb_main)
Returns
default alignment returns
  • the alignment that was selected in ARB alignment admin, when GBT_get_startup_alignment was called first OR
  • the alignment currently selected in ARB alignment admin OR
  • NULp if NO (valid) alignment selected. An error is exported in that case!

Definition at line 747 of file adali.cxx.

References get_default_alignment().

Referenced by AP_calc_pos_var_pars(), AP_create_consensus_var(), ARB_main(), AWTC_pars_names(), AWTC_recreate_name(), calculateEndPosition(), CON_calc_max_freq_cb(), create_splitAlignment_awars(), DI_create_matrix_variables(), edit_SAI_description(), export_seq_data(), export_sequence_data::export_sequence_data(), FastAligner_start(), Structure3D::FindTypeOfRNA(), FINAL_TYPE< SEQTYPE >::finish(), gbl_ali_name(), gbl_read_seq_sai_or_species(), gbl_sequence(), gbl_sequence_type(), GBT_set_startup_alignment(), gde_filter_weights(), getArbFilter(), BI_helix::init(), BI_ecoli_ref::init(), main(), Structure3D::MapCurrentSpeciesToEcoliTemplate(), mark_gene_species_using_current_alignment(), mark_nontree_cb(), mark_tree_cb(), modify_target_string(), NA_Alignment::NA_Alignment(), NT_count_different_chars(), NT_create_sai_from_pfold(), NT_createConcatenationAwars(), NT_import_sequences(), NT_mark_all_cb(), ALI_ARBDB::open(), pars_create_all_awars(), pd_export_pt_server(), pd_get_the_names(), PH_create_filter_variables(), predef_prg(), primer_design_event_go(), primer_design_event_init(), probe_design_event(), pt_init_main_struct(), PT_prepare_data(), resolve_IUPAC_target_string(), SEC_db_interface::SEC_db_interface(), show_count(), split_ali_cb(), sq_calc_seq_quality_cb(), SQ_evaluate(), SQ_mark_species(), SQ_pass1(), SQ_pass1_no_tree(), SQ_pass2(), SQ_pass2_no_tree(), StaticData::track_ali(), track_ali_change_cb(), and translateSAItoColors().

char* GBT_get_startup_alignment ( GBDATA gb_main)

same interface as GBT_get_default_alignment. When this was called once w/o error, calls to GBT_get_default_alignment always return the alignment which was default then.

Definition at line 757 of file adali.cxx.

References get_default_alignment().

Referenced by GBT_set_startup_alignment(), ED4_root::init_alignment(), and propertyName().

GB_ERROR GBT_set_default_alignment ( GBDATA gb_main,
const char alignment_name 
)

Definition at line 765 of file adali.cxx.

References GB_DEFAULT_ALIGNMENT, and GBT_write_string().

Referenced by ARB_main(), and GBT_set_startup_alignment().

GB_ERROR GBT_set_startup_alignment ( GBDATA gb_main,
const char alignment_name 
)
GBDATA* GBT_get_alignment ( GBDATA gb_main,
const char aliname 
)
long GBT_get_alignment_len ( GBDATA gb_main,
const char aliname 
)
GB_ERROR GBT_set_alignment_len ( GBDATA gb_main,
const char aliname,
long  new_len 
)
char* GBT_get_alignment_type_string ( GBDATA gb_main,
const char aliname 
)
Returns
type-string of alignment 'aliname' or NULp if alignment not found (error exported in that case)

Definition at line 863 of file adali.cxx.

References gb_assert, GB_export_errorf(), GB_have_error(), GBT_get_alignment(), GBT_read_string(), NULp, and result.

Referenced by gbl_sequence_type(), GBT_get_alignment_type(), MG_copy_and_check_alignments(), MG_equal_alignments(), NT_createConcatenationAwars(), NT_import_sequences(), and propertyName().

GB_alignment_type GBT_get_alignment_type ( GBDATA gb_main,
const char aliname 
)
bool GBT_is_alignment_protein ( GBDATA gb_main,
const char alignment_name 
)
NOT4PERL char* GBT_read_gene_sequence_and_length ( GBDATA gb_gene,
bool  use_revComplement,
char  partSeparator,
size_t gene_length 
)
char* GBT_read_gene_sequence ( GBDATA gb_gene,
bool  use_revComplement,
char  partSeparator 
)
GBDATA* GBT_find_or_create_item_rel_item_data ( GBDATA gb_item_data,
const char itemname,
const char id_field,
const char id,
bool  markCreated 
)

Search for an existing or create a new, named item.

Parameters
gb_item_dataitem container
itemnamedescription of itemtype (for error messages)
id_fielditem-field containing ID (e.g. "name")
idthe ID itself (compare is case-insensitive)
markCreatedtrue -> mark item if it was created
Returns
found/created item or NULp if an error occurs (which is exported in that case)

Definition at line 18 of file aditem.cxx.

References error(), GB_await_error(), GB_create_container(), GB_end_transaction(), GB_export_errorf(), GB_push_transaction(), GB_write_flag(), GBT_find_item_rel_item_data(), GBT_write_string(), and NULp.

Referenced by EXP_find_or_create_experiment_rel_exp_data(), GBT_find_or_create_colorset(), GBT_find_or_create_SAI(), and GBT_find_or_create_species_rel_species_data().

GBDATA* GBT_find_or_create_species_rel_species_data ( GBDATA gb_species_data,
const char name,
bool  markCreated 
)
GBDATA* GBT_find_or_create_species ( GBDATA gb_main,
const char name,
bool  markCreated 
)
GBDATA* GBT_find_or_create_SAI ( GBDATA gb_main,
const char name 
)
GBDATA* GBT_find_item_rel_item_data ( GBDATA gb_item_data,
const char id_field,
const char id_value 
)

search for items starting at item container

Parameters
'gb_item_data'is a container containing items
'id_field'is a field containing a unique identifier for each item (e.g. 'name' for species)
'id_value'expected value of 'id_field'
Returns
a pointer to an item with 'id_field' containing 'id_value' or NULp (in this case an error MAY be exported)

Note: If you expect the item to exist, use GBT_expect_item_rel_item_data()

Definition at line 74 of file aditem.cxx.

References GB_find_string(), GB_get_father(), GB_IGNORE_CASE, NULp, and SEARCH_GRANDCHILD.

Referenced by EXP_find_experiment_rel_exp_data(), GBT_create_unique_item_identifier(), GBT_expect_item_rel_item_data(), GBT_find_colorset(), GBT_find_or_create_item_rel_item_data(), GBT_find_SAI(), GBT_find_SAI_rel_SAI_data(), GBT_find_species(), GBT_find_species_rel_species_data(), and GEN_find_gene_rel_gene_data().

GBDATA* GBT_expect_item_rel_item_data ( GBDATA gb_item_data,
const char id_field,
const char id_value 
)
GBDATA* GBT_get_species_data ( GBDATA gb_main)

Definition at line 105 of file aditem.cxx.

References GBT_find_or_create().

Referenced by addSpeciesToConcatenateList(), AP_tree_root::AP_tree_root(), ARB_main(), calc_and_update_alignment_errors_cb(), compress_sequence_tree(), concatenateFieldsCreateNewSpecies(), copy_move_del_alignment(), copy_SAI_to_species_cb(), create_new_species(), DI_create_matrix_variables(), experiment_field_selection_list_rescan(), export_to_DB(), gbl_findacc(), gbl_findspec(), GBT_begin_rename_session(), GBT_check_alignment(), GBT_check_data(), GBT_count_marked_species(), GBT_create_unique_species_name(), GBT_expect_species(), GBT_find_or_create_species(), GBT_find_species(), GBT_first_marked_species(), GBT_first_species(), GBT_gen_species_array(), GBT_mark_all(), gene_extract_handler(), gene_field_selection_list_rescan(), get_first_species_data(), ALI_ARBDB::get_sequence(), ALI_ARBDB::get_sequence_string(), ArbImporter::import_data(), launch_MapViewer_cb(), DI_MATRIX::load(), mark_action(), MERGE_sequences_simple(), mg_check_field_cb(), mg_get_first_species_data1(), mg_get_first_species_data2(), MG_merge_tagged_field_cb(), mg_transfer_listed_species(), mg_transfer_selected_species(), GroupSearch::perform_search(), popup_new_main_window(), probe_match_event(), PT_init_input_data(), PT_prepare_data(), ALI_ARBDB::put_sequence(), ALI_ARBDB::put_sequence_string(), ArbImporter::read_data(), ReadArbdb(), resort_data_base(), Aligner::run(), QUERY::search_duplicated_field_content(), species_create_handler(), species_field_selection_list_rescan(), transfer_field_of_listed_cb(), and ScopedTransporter::transferAllIn().

GBDATA* GBT_first_marked_species_rel_species_data ( GBDATA gb_species_data)

Definition at line 109 of file aditem.cxx.

References GB_first_marked().

Referenced by get_first_species(), DI_MATRIX::load(), probe_match_event(), and ReadArbdb().

GBDATA* GBT_first_marked_species ( GBDATA gb_main)
GBDATA* GBT_next_marked_species ( GBDATA gb_species)
GBDATA* GBT_first_species_rel_species_data ( GBDATA gb_species_data)
GBDATA* GBT_first_species ( GBDATA gb_main)
GBDATA* GBT_next_species ( GBDATA gb_species)
GBDATA* GBT_find_species_rel_species_data ( GBDATA gb_species_data,
const char name 
)
GBDATA* GBT_expect_species_rel_species_data ( GBDATA gb_species_data,
const char name 
)

Definition at line 136 of file aditem.cxx.

References GBT_expect_item_rel_item_data().

GBDATA* GBT_find_species ( GBDATA gb_main,
const char name 
)

Definition at line 139 of file aditem.cxx.

References GBT_find_item_rel_item_data(), and GBT_get_species_data().

Referenced by alignToNextRelative(), awt_create_select_filter_window_aw_cb(), awt_create_select_filter_window_gb_cb(), awt_openDefaultURL_on_selected_species(), awtc_nn_search(), AWTC_recreate_name(), build_reverse_complement(), calculateEndPosition(), create_primer_design_window(), EXP_item_type_species_selector::current(), FINAL_TYPE< SEQTYPE >::current(), GEN_item_type_species_selector::current(), di_mark_by_distance(), do_sth_with_species(), ed_submit_info_event(), EXP_get_first_experiment_data(), expect_species_selected(), EDB_root_bact::fill_data(), find_species_by_id(), gbl_read_seq_sai_or_species(), GBT_with_stored_species(), GEN_find_organism(), GEN_get_current_organism(), GEN_get_local_gene_data(), GEN_root::GEN_root(), GEN_species_name_changed_cb(), MO_Liste::get_all_species(), get_selected_imported_species(), get_selected_species(), insert_new_species_terminal(), Structure3D::MapCurrentSpeciesToEcoliTemplate(), MG_create_remap(), mg_get_selected_species1(), mg_get_selected_species2(), MG_map_species(), MG_update_example(), move_species_to_extended(), nt_add(), NT_create_sai_from_pfold(), nt_extract_configuration(), primer_design_event_go(), primer_design_event_init(), probe_design_event(), PV_WriteTranslatedSequenceToDB(), rerun_importTest_cb(), SpeciesSelector::select_first(), selectValidNameFromList(), st_ml_add_quality_string_to_species(), transfer_field_of_selected_cb(), TranslateGeneToAminoAcidSequence(), translateSAItoColors(), and update_exportTest_result_cb().

GBDATA* GBT_expect_species ( GBDATA gb_main,
const char name 
)

Definition at line 146 of file aditem.cxx.

References GBT_expect_item_rel_item_data(), and GBT_get_species_data().

Referenced by GetDisplayInfo().

GBDATA* GBT_get_SAI_data ( GBDATA gb_main)
GBDATA* GBT_first_SAI_rel_SAI_data ( GBDATA gb_sai_data)

Definition at line 159 of file aditem.cxx.

References GB_entry().

Referenced by GBT_check_alignment(), get_first_SAI(), and nt_build_sai_string().

GBDATA* GBT_first_SAI ( GBDATA gb_main)
GBDATA* GBT_next_SAI ( GBDATA gb_sai)
GBDATA* GBT_find_SAI_rel_SAI_data ( GBDATA gb_sai_data,
const char name 
)
GBDATA* GBT_expect_SAI_rel_SAI_data ( GBDATA gb_sai_data,
const char name 
)

Definition at line 174 of file aditem.cxx.

References GBT_expect_item_rel_item_data().

Referenced by saiHasDataInAli().

GBDATA* GBT_find_SAI ( GBDATA gb_main,
const char name 
)
GBDATA* GBT_expect_SAI ( GBDATA gb_main,
const char name 
)
long GBT_get_species_count ( GBDATA gb_main)
long GBT_get_SAI_count ( GBDATA gb_main)

Definition at line 211 of file aditem.cxx.

References GBT_get_item_count().

Referenced by CheckedConsistencies::CheckedConsistencies(), and GBT_create_SAI_hash().

char* GBT_create_unique_species_name ( GBDATA gb_main,
const char default_name 
)

Definition at line 287 of file aditem.cxx.

References GBT_create_unique_item_identifier(), and GBT_get_species_data().

Referenced by GBT_check_alignment(), and write_entry().

long GBT_mark_all ( GBDATA gb_main,
int  flag 
)
long GBT_mark_all_that ( GBDATA gb_main,
int  flag,
bool(*)(GBDATA *, void *)  condition,
void *  cd 
)
long GBT_count_marked_species ( GBDATA gb_main)
char* GBT_store_marked_species ( GBDATA gb_main,
bool  unmark_all 
)

stores the currently marked species in a string

Parameters
gb_maindatabase
unmark_allif true -> unmark species
Returns
';'-separated list of species names

Note: a faster (but less robust) way to temporarily store species marks, is to use the flag GB_USERFLAG_WASMARKED together with GB_write_user_flag

Definition at line 377 of file aditem.cxx.

References GBS_strstruct::cat(), GBS_strstruct::cut_tail(), GB_write_flag(), GBT_first_marked_species(), GBT_get_name(), GBT_next_marked_species(), GBS_strstruct::put(), and GBS_strstruct::release_memfriendly().

Referenced by EXP_get_first_experiment_data(), and GEN_get_first_gene_data().

NOT4PERL GB_ERROR GBT_with_stored_species ( GBDATA gb_main,
const char stored,
species_callback  doit,
int clientdata 
)

call a function with each species of a list

Parameters
gb_maindatabase
stored';'-separated list of species names
doitfunction to call with each species in 'stored'
clientdatais passed to 'doit'
Returns
error if sth goes wrong (or if 'doit' reports error)

Definition at line 404 of file aditem.cxx.

References error(), gb_assert, GBT_find_species(), MAX_NAME_LEN, and NULp.

Referenced by EXP_get_first_experiment_data(), GBT_restore_marked_species(), and GEN_get_first_gene_data().

GB_ERROR GBT_restore_marked_species ( GBDATA gb_main,
const char stored_marked 
)

restores marked species.

Parameters
gb_maindatabase
stored_markedcontains a ';'-separated list of species names to mark (as returned by GBT_store_marked_species)
Returns
error if sth goes wrong

Definition at line 446 of file aditem.cxx.

References GBT_mark_all(), GBT_with_stored_species(), NULp, and restore_mark().

Referenced by exp_restore_old_species_marks(), and gen_restore_old_species_marks().

GB_CSTR GBT_get_name_or_description ( GBDATA gb_item)

returns the value of the "name" field of any database item or "<unnamed_item>" or similar.

See also
GBT_get_name

Definition at line 459 of file aditem.cxx.

References GB_read_key_pntr(), GBS_global_string(), GBT_read_char_pntr(), and result.

Referenced by adaptCopiedAlignment(), aed_start_naligning(), ALI_realign_marked(), alignToNextRelative(), appendNameAndUsedBasePositions(), are_not_in_tree(), auto_select_pseudo_species(), awt_add_sequences_to_list(), awtc_mark_hits(), AP_sequence::bind_to_species(), concatenateAlignments(), QUERY::copy_selection_list_2_query_box(), AP_sequence::do_lazy_load(), dot_sequence_by_consensus(), ED4_get_marked_from_menu(), ED4_pfold_select_SAI_and_update_option_menu(), EXP_get_experiment_id(), expect_entry(), FastAligner_delete_temp_entries(), SAI_selection::fill(), MO_Liste::fill_marked_bakts(), filter_columnstat_SAIs(), find_SAI_candidates(), find_species_candidates(), gbl_findgene(), GBT_convert_changekey(), GBT_read_name(), gbt_rename_alignment_of_item(), gde_filter_weights(), gen_extract_gene_2_pseudoSpecies(), gen_get_gene_id(), GEN_global_gene_identifier(), GEN_organism_not_found(), gene_requires(), get_SAI_description(), export_sequence_data::get_seq_data(), launch_MapViewer_cb(), ListDisplayRow::ListDisplayRow(), PHDATA::load(), mergeSimilarSpecies(), mg_check_field_cb(), MG_export_fields(), MP_mark_probes_in_tree(), nt_add_partial(), NT_fix_gene_data(), perform_query_cb(), PT_prepare_species_sequence(), PV_AddOrfTerminalsToLoadedSpecies(), PV_ManageTerminals(), readCompactedSequence(), reverseComplement(), set_marks_of(), species_requires(), ScopedTransporter::transferAllIn(), translate_getInfo(), FilteredExport::write_fasta(), and writeStringToAlignment().

const char* GBT_get_name ( GBDATA gb_item)
NOT4PERL GB_CSTR GBT_read_name ( GBDATA gb_item)

Definition at line 477 of file aditem.cxx.

References GBT_get_name_or_description().

GBDATA** GBT_gen_species_array ( GBDATA gb_main,
long speciesCountPtr 
)
GB_ERROR GBT_begin_rename_session ( GBDATA gb_main,
int  all_flag 
)
GB_ERROR GBT_rename_species ( const char oldname,
const char newname,
bool  ignore_protection 
)
GB_ERROR GBT_abort_rename_session ( void  )
GB_ERROR GBT_commit_rename_session ( void  )
GB_ERROR GBT_compress_sequence_tree2 ( GBDATA gbd,
const char tree_name,
const char ali_name 
)
void GBT_compression_test ( struct Unfixed_cb_parameter *  ,
GBDATA gb_main 
)

Referenced by popup_new_main_window().

GBDATA* GBT_create ( GBDATA father,
const char key,
long  delete_level 
)
GBDATA* GBT_find_or_create ( GBDATA father,
const char key,
long  delete_level 
)
char* GBT_get_default_helix ( GBDATA )

Definition at line 64 of file adtools.cxx.

References ARB_strdup().

Referenced by get_helix_string(), BI_helix::init(), and NT_del_mark_move_REF().

char* GBT_get_default_helix_nr ( GBDATA )

Definition at line 65 of file adtools.cxx.

References ARB_strdup().

Referenced by BI_helix::init().

char* GBT_get_default_ref ( GBDATA )

Definition at line 66 of file adtools.cxx.

References ARB_strdup().

Referenced by BI_ecoli_ref::init(), and PT_init_input_data().

void GBT_scan_db ( StrArray &  fieldNames,
GBDATA gbd,
const char datapath 
)

scan CONTAINER for existing sub-keys

recurses completely downwards the DB tree

Parameters
fieldNamesgets filled with result strings
  • each string is the path to a node beyond (any child container of) gbd
  • every string exists only once
  • the first character of a string is the type of the entry
  • the strings are sorted alphabetically
gbdnode where search starts
datapathif not NULp -> only keys with prefix datapath are scanned and the prefix is removed from the resulting key_names.

Note: this function is incredibly slow when called from clients

Warning: avoid to add new callers for this function: the interface is really weird

Definition at line 162 of file adtools.cxx.

References GBS_hash_do_const_loop(), gbs_scan_db_compare(), gbs_scan_db_insert(), gbt_scan_db_start(), GB_DbScanner::hash_table, and NULp.

Referenced by experiment_field_selection_list_rescan(), gene_field_selection_list_rescan(), and species_field_selection_list_rescan().

void GBT_install_message_handler ( GBDATA gb_main)
void GBT_message ( GBDATA gb_main,
const char msg 
)

When called in client(or server) this causes the DB server to show the message. Message is shown via GB_warning (which uses aw_message in GUIs)

Note: The message is not shown before the transaction ends. If the transaction is aborted, the message is never shown!

see also : GB_warning()

Definition at line 238 of file adtools.cxx.

References error(), find_or_create_error_container(), gb_assert, GB_await_error(), GB_create(), GB_end_transaction(), GB_push_transaction(), GB_STRING, GB_write_string(), and NULp.

Referenced by ARB_main(), CON_insertSequences(), GBT_commit_rename_session(), GBT_install_message_handler(), gbt_read_tree_rek(), DI_MATRIX::load(), main(), mark_as_macro_executor(), nt_add(), nt_add_partial(), GroupSearch::perform_search(), read_tree_and_size_internal(), GBT_config::saveAsOver(), set_marks_of(), show_message(), transform_gbd_to_leaf(), and TREE_load_to_db().

char* GBT_read_string ( GBDATA gb_container,
const char fieldpath 
)

Read value from database field (of type GB_STRING)

Parameters
gb_containerwhere to start search for field
fieldpathrelative path from gb_container
Returns
NULp in case of error (use GB_await_error()) or when field does not exist. otherwise returns a heap copy.

other functions return a pointer to a temporary variable (invalidated by next call)

Definition at line 267 of file adtools.cxx.

References GB_FIND, GB_pop_transaction(), GB_push_transaction(), GB_read_string(), GB_search(), NULp, and result.

Referenced by ARB_main(), collectKeysRegisteredInDatabase(), concatenateFieldsCreateNewSpecies(), DI_ENTRY::DI_ENTRY(), ED4_get_and_jump_to_current(), ED4_jump_to_current_species(), ED4_selected_SAI_changed_cb(), ED4_selected_species_changed_cb(), edit_SAI_description(), ALI_selection::fill(), GBT_check_alignment(), GBT_config::GBT_config(), GBT_get_alignment_type_string(), GBT_load_colorset(), get_default_alignment(), getArbFilter(), PHDATA::load(), MG_merge_tagged_field_cb(), nt_build_conf_marked(), NT_suggestValidNames(), pars_generate_aliview(), and relink_pseudo_species_to_organisms().

char* GBT_read_as_string ( GBDATA gb_container,
const char fieldpath 
)

like GBT_read_string()

but

  • field may be of any type (result gets converted to reasonable char*)

Definition at line 290 of file adtools.cxx.

References GB_FIND, GB_pop_transaction(), GB_push_transaction(), GB_read_as_string(), GB_search(), NULp, and result.

Referenced by compare_hits(), QUERY::DbQuery_update_list(), and gbl_readdb().

const char* GBT_read_char_pntr ( GBDATA gb_container,
const char fieldpath 
)

like GBT_read_string()

but

  • result is not a heap-copy and may be invalidated by further DB access (especially by overwriting that fields)

Note: Under no circumstances you may modify the result!

Definition at line 307 of file adtools.cxx.

References GB_FIND, GB_pop_transaction(), GB_push_transaction(), GB_read_char_pntr(), GB_search(), NULp, and result.

Referenced by compare_hits(), delete_unused_changekeys(), export_format_multiple(), GBT_get_configuration_names(), GBT_get_name_or_description(), GBT_log_to_tree_remark(), gen_extract_gene_2_pseudoSpecies(), get_SAI_group(), get_SAI_groups(), set_field_of_queried_cb(), set_SAI_group(), and XML_recursive().

NOT4PERL long* GBT_read_int ( GBDATA gb_container,
const char fieldpath 
)
NOT4PERL float* GBT_read_float ( GBDATA gb_container,
const char fieldpath 
)

similar to GBT_read_string()

but

  • for fields of type GB_FLOAT
  • result gets invalidated by next call

Definition at line 349 of file adtools.cxx.

References GB_FIND, GB_pop_transaction(), GB_push_transaction(), GB_read_float(), GB_search(), NULp, and result.

Referenced by compare_hits().

char* GBT_readOrCreate_string ( GBDATA gb_container,
const char fieldpath,
const char default_value 
)

like GBT_read_string(),

but if field does not exist, it will be created and initialized with 'default_value'

Definition at line 371 of file adtools.cxx.

References GB_pop_transaction(), GB_push_transaction(), GB_read_string(), GB_searchOrCreate_string(), NULp, and result.

Referenced by check_for_remote_command(), MG_merge_tagged_field_cb(), and nt_add().

const char* GBT_readOrCreate_char_pntr ( GBDATA gb_container,
const char fieldpath,
const char default_value 
)

like GBT_read_char_pntr(),

but if field does not exist, it will be created and initialized with 'default_value'

Definition at line 386 of file adtools.cxx.

References GB_pop_transaction(), GB_push_transaction(), GB_read_char_pntr(), GB_searchOrCreate_string(), NULp, and result.

Referenced by awt_create_select_filter_window_gb_cb(), and ArbImporter::read_data().

NOT4PERL long* GBT_readOrCreate_int ( GBDATA gb_container,
const char fieldpath,
long  default_value 
)

like GBT_read_int(),

but if field does not exist, it will be created and initialized with 'default_value'

Definition at line 402 of file adtools.cxx.

References GB_pop_transaction(), GB_push_transaction(), GB_read_int(), GB_searchOrCreate_int(), NULp, and result.

Referenced by check_for_remote_command(), gb_load_single_key_data(), get_DB_state(), NodeTextBuilder::init(), AWT_graphic_tree::show_ruler(), and tree_vars_callback().

NOT4PERL float* GBT_readOrCreate_float ( GBDATA gb_container,
const char fieldpath,
float  default_value 
)

like GBT_read_float(),

but if field does not exist, it will be created and initialized with 'default_value'

Definition at line 422 of file adtools.cxx.

References gb_assert, GB_pop_transaction(), GB_push_transaction(), GB_read_float(), GB_searchOrCreate_float(), NULp, and result.

Referenced by AWT_graphic_tree::show_ruler().

GB_ERROR GBT_write_string ( GBDATA gb_container,
const char fieldpath,
const char content 
)

Write content to database field of type GB_STRING

if field exists, it will be overwritten. if field does not exist, it will be created.

The field should be unique, i.e. it should not exist twice or more in it's parent container

Returns
GB_ERROR on failure

Definition at line 451 of file adtools.cxx.

References error(), gb_assert, GB_await_error(), GB_end_transaction(), GB_nextEntry(), GB_push_transaction(), GB_search(), GB_STRING, and GB_write_string().

Referenced by alignToNextRelative(), ARB_main(), check_for_remote_command(), checkAndMergeFields(), CON_export(), concatenateFieldsCreateNewSpecies(), config_comment_changed_cb(), copy_move_del_alignment(), copy_SAI_cb(), copy_SAI_to_species_cb(), create_data_entry(), create_new_species(), create_split_gene(), edit_SAI_description(), experiment_copy_handler(), extended_rename_handler(), findOrCreate_configuration(), GBT_add_new_changekey_to_keypath(), GBT_check_alignment(), GBT_check_data(), GBT_find_or_create_item_rel_item_data(), GBT_gen_accession_number(), GBT_get_configuration_names(), GBT_remote_awar(), GBT_remote_read_awar(), GBT_save_colorset(), GBT_set_default_alignment(), gbt_write_tree(), GEN_create_nonexisting_gene_rel_gene_data(), GEN_find_or_create_gene_rel_gene_data(), gene_copy_handler(), InsertDatainGDE(), MERGE_sequences_simple(), mg_check_field_cb(), MG_export_fields(), MG_merge_tagged_field_cb(), NT_create_sai_from_pfold(), NT_importValidNames(), NT_suggestValidNames(), remove_redundant_translation(), rename_SAI_cb(), AP_pos_var::save_aliEntry_to_SAI(), GBT_config::saveAsOver(), selectValidNameFromList(), set_addid(), set_SAI_group(), species_copy_cb(), trace_termChange_in_global_awar(), transfer_field_of_listed_cb(), translate_getInfo(), translate_saveInfo(), write_tree_remark(), and writeHistory().

GB_ERROR GBT_write_int ( GBDATA gb_container,
const char fieldpath,
long  content 
)
GB_ERROR GBT_write_byte ( GBDATA gb_container,
const char fieldpath,
unsigned char  content 
)
GB_ERROR GBT_write_float ( GBDATA gb_container,
const char fieldpath,
float  content 
)

like GBT_write_string(),

but for fields of type GB_FLOAT

Definition at line 502 of file adtools.cxx.

References error(), gb_assert, GB_await_error(), GB_end_transaction(), GB_FLOAT, GB_nextEntry(), GB_push_transaction(), GB_search(), and GB_write_float().

Referenced by tree_write_float().

GBDATA* GBT_open ( const char path,
const char opent 
)

Open a database (as GB_open does) Additionally:

  • disable saving in the PT_SERVER directory,
  • create an index for species and extended names (server only!),
Parameters
pathfilename of the DB
opentsee GB_login()
Returns
database handle (or NULp in which case an error is exported)
See also
GB_open()

Definition at line 524 of file adtools.cxx.

References error(), gb_assert, GB_close(), GB_create_index(), GB_disable_path(), GB_export_error(), GB_FIND, GB_have_error(), GB_IGNORE_CASE, GB_number_of_subentries(), GB_open(), GB_path_in_ARBLIB(), GB_search(), GBT_get_SAI_data(), GBT_SAI_INDEX_SIZE, GBT_SPECIES_INDEX_SIZE, hash_size(), max, NULp, and ta.

Referenced by ARB_main(), load_and_startup_main_window(), main(), and SelectedDatabase::open_db_for_merge().

GB_ERROR GB_set_macro_error ( GBDATA gb_main,
const char curr_error 
)
GB_ERROR GB_get_macro_error ( GBDATA gb_main)
GB_ERROR GB_clear_macro_error ( GBDATA gb_main)
NOT4PERL GB_ERROR GBT_remote_action_with_timeout ( GBDATA gb_main,
const char application,
const char action_name,
const class ARB_timeout timeout,
bool  verbose 
)
GB_ERROR GBT_remote_action ( GBDATA gb_main,
const char application,
const char action_name 
)

Definition at line 809 of file adtools.cxx.

References GBT_remote_action_with_timeout(), mark_as_macro_executor(), and NULp.

GB_ERROR GBT_remote_awar ( GBDATA gb_main,
const char application,
const char awar_name,
const char value 
)
GB_ERROR GBT_remote_read_awar ( GBDATA gb_main,
const char application,
const char awar_name 
)
const char* GBT_relativeMacroname ( const char macro_name)

make macro_name relative if it is located in or below ARBMACROHOME or ARBMACRO. Inverse function of fullMacroname()

Returns
pointer into macro_name (relative part) or macro_name itself (if macro is located somewhere else)

Definition at line 907 of file adtools.cxx.

References GB_getenvARBMACRO(), GB_getenvARBMACROHOME(), macro_name, relative_inside(), and result.

Referenced by RecordingMacro::write_action().

GB_ERROR GBT_macro_execute ( const char macro_name,
bool  loop_marked,
bool  run_async 
)

simply execute a macro

In doubt: do not use this function, instead use ../SL/MACROS/macros.hxx

Parameters
macro_namecontains the macro filename (either with full path or relative to directories pointed to by ARBMACRO or ARBMACROHOME)
loop_markedif true -> call macro once for each marked species
run_asyncif true -> run perl asynchronously (will not detect perl failure in that case!)

Definition at line 919 of file adtools.cxx.

References error(), fullMacroname(), GB_await_error(), GB_path_in_ARBHOME(), GBK_singlequote(), GBK_system(), GBS_global_string_copy(), and NULp.

Referenced by MacroRecorder::execute().

GBDATA* GBT_get_tree_data ( GBDATA gb_main)
TreeNode* GBT_remove_leafs ( TreeNode tree,
GBT_TreeRemoveType  mode,
const GB_HASH species_hash,
int removed,
int groups_removed 
)

Remove leafs from given 'tree'.

Parameters
treetree from which species will be removed
modedefines what to remove
species_hashhash translation from leaf-name to species-dbnode (not needed if tree is linked; see GBT_link_tree)
removedwill be incremented for each removed leaf (if !NULp)
groups_removedwill be incremented for each removed group (if !NULp)
Returns
new root node

if 'species_hash' is not provided and tree is not linked, the function will silently act strange:

  • GBT_REMOVE_MARKED and GBT_REMOVE_UNMARKED will remove any leaf
  • GBT_REMOVE_ZOMBIES and GBT_KEEP_MARKED will remove all leafs

Definition at line 34 of file adtree.cxx.

References destroy(), TreeNode::fixDeletedSon(), TreeNode::forget_origin(), TreeNode::forget_relatives(), gb_assert, TreeNode::gb_node, GB_read_flag(), GBS_read_hash(), GBT_REMOVE_MARKED, GBT_REMOVE_UNMARKED, GBT_REMOVE_ZOMBIES, TreeNode::get_tree_root(), TreeNode::is_leaf(), TreeNode::is_root_node(), TreeNode::leftson, TreeNode::name, NULp, TreeNode::rightson, and tree.

Referenced by NT_alltree_remove_leafs(), and sq_calc_seq_quality_cb().

GB_ERROR GBT_write_group_name ( GBDATA gb_group_name,
const char new_group_name,
bool  pedantic 
)
GB_ERROR GBT_write_name_to_groupData ( GBDATA gb_group,
bool  createNameEntry,
const char new_group_name,
bool  pedantic 
)
GB_ERROR GBT_write_tree ( GBDATA gb_main,
const char tree_name,
TreeNode tree 
)
GB_ERROR GBT_overwrite_tree ( GBDATA gb_tree,
TreeNode tree 
)

Definition at line 526 of file adtree.cxx.

References GB_get_root(), gbt_write_tree(), and NULp.

Referenced by adjustTreeRoot(), NTREE_move_tree_info(), and ARB_seqtree_root::saveToDB().

GB_ERROR GBT_write_tree_remark ( GBDATA gb_main,
const char tree_name,
const char remark 
)

Definition at line 533 of file adtree.cxx.

References GBT_find_tree(), and write_tree_remark().

Referenced by di_calculate_tree_cb(), GBT_write_tree_with_remark(), and main().

GB_ERROR GBT_log_to_tree_remark ( GBDATA gb_tree,
const char log_entry,
bool  stamp 
)

append 'log_entry' to tree comment

Parameters
gb_treethe tree
log_entrytext to append
stamptrue -> prefix date before 'log_entry'
Returns
error in case of failure

Definition at line 537 of file adtree.cxx.

References error(), GB_await_error(), GB_have_error(), GBS_log_action_to(), GBT_read_char_pntr(), NULp, and write_tree_remark().

Referenced by adjustTreeRoot(), GBT_log_to_named_trees_remark(), and NTREE_move_tree_info().

GB_ERROR GBT_log_to_named_trees_remark ( GBDATA gb_main,
const char tree_name,
const char log_entry,
bool  stamp 
)

append 'log_entry' to tree comment

Parameters
gb_maindatabase
tree_namename of tree
log_entrytext to append
stamptrue -> prefix date before 'log_entry'
Returns
error in case of failure

Definition at line 556 of file adtree.cxx.

References GBS_global_string(), GBT_find_tree(), and GBT_log_to_tree_remark().

Referenced by di_calculate_tree_cb(), and main().

GB_ERROR GBT_write_tree_with_remark ( GBDATA gb_main,
const char tree_name,
TreeNode tree,
const char remark 
)
TreeNode* GBT_read_tree_and_size ( GBDATA gb_main,
const char tree_name,
TreeRoot troot,
int tree_size 
)

Loads a tree from DB into any user defined structure.

Parameters
gb_mainDB root node
tree_nameis the name of the tree in the db
trootconstructs the tree-node instances
tree_sizeif specified -> will be set to "size of tree" (aka number of leafs minus 1)
Returns
  • NULp if any error occurs (which is exported then)
  • root of loaded tree (dynamic type depends on 'nodeFactory')

Definition at line 770 of file adtree.cxx.

References TreeNode::announce_tree_constructed(), TreeRoot::delete_by_node(), error(), gb_assert, GB_entry(), GB_export_errorf(), GB_FIND, GB_read_int(), GB_search(), GBT_check_tree_name(), GBT_find_tree(), TreeNode::is_normal_group(), NULp, read_tree_and_size_internal(), and tree.

Referenced by GBT_read_tree(), and MatrixOrder::MatrixOrder().

TreeNode* GBT_read_tree ( GBDATA gb_main,
const char tree_name,
TreeRoot troot 
)
size_t GBT_count_leafs ( const TreeNode tree)
GB_ERROR GBT_is_invalid ( const TreeNode tree)
GB_ERROR GBT_link_tree ( TreeNode tree,
GBDATA gb_main,
bool  show_status,
int zombies,
int duplicates 
)

Link a given tree to the database. That means that for all tips the member 'gb_node' is set to the database container holding the species data.

Parameters
treewhich will be linked to DB
gb_mainDB root node
show_statusshow a progress indicator?
zombiesif specified -> set to number of zombies (aka non-existing species) in tree
duplicatesif specified -> set to number of duplicated species in tree
Returns
error on failure
See also
GBT_unlink_tree()

Definition at line 953 of file adtree.cxx.

References error(), GBS_free_hash(), GBT_create_species_hash(), and GBT_link_tree_using_species_hash().

Referenced by ST_ML::calc_st_ml(), compress_sequence_tree(), GBT_compress_sequence_tree2(), get_cached_taxonomy(), ARB_seqtree_root::linkToDB(), PVP_calculate(), AP_tree::relink(), sq_calc_seq_quality_cb(), TREE_write_Newick(), and TREE_write_XML().

void GBT_unlink_tree ( TreeNode tree)

Definition at line 986 of file adtree.cxx.

References TreeNode::unlink_from_DB().

Referenced by ARB_seqtree_root::unlinkFromDB().

GBDATA* GBT_find_tree ( GBDATA gb_main,
const char tree_name 
)
GBDATA* GBT_tree_infrontof ( GBDATA gb_tree)
GBDATA* GBT_tree_behind ( GBDATA gb_tree)
GBDATA* GBT_find_top_tree ( GBDATA gb_main)
GBDATA* GBT_find_bottom_tree ( GBDATA gb_main)
const char* GBT_existing_tree ( GBDATA gb_main,
const char tree_name 
)

Definition at line 1056 of file adtree.cxx.

References GBT_find_tree(), GBT_get_tree_name(), and get_first_tree().

Referenced by popup_new_main_window().

GBDATA* GBT_find_next_tree ( GBDATA gb_tree)
const char* GBT_get_tree_name ( GBDATA gb_tree)
GB_ERROR GBT_check_tree_name ( const char tree_name)
const char* GBT_name_of_largest_tree ( GBDATA gb_main)
const char* GBT_name_of_bottom_tree ( GBDATA gb_main)

Definition at line 1107 of file adtree.cxx.

References GBT_find_bottom_tree(), and GBT_get_tree_name().

Referenced by NT_select_bottom_tree().

const char* GBT_tree_info_string ( GBDATA gb_main,
const char tree_name,
int  maxTreeNameLen 
)
long GBT_size_of_tree ( GBDATA gb_main,
const char tree_name 
)

Definition at line 1162 of file adtree.cxx.

References GB_entry(), GB_read_int(), and GBT_find_tree().

Referenced by pars_check_size().

void GBT_get_tree_names ( ConstStrArray names,
GBDATA gb_main,
bool  sorted 
)
NOT4PERL GB_ERROR GBT_move_tree ( GBDATA gb_moved_tree,
GBT_ORDER_MODE  mode,
GBDATA gb_target_tree 
)
GB_ERROR GBT_copy_tree ( GBDATA gb_main,
const char source_name,
const char dest_name 
)
GB_ERROR GBT_rename_tree ( GBDATA gb_main,
const char source_name,
const char dest_name 
)
GB_CSTR* GBT_get_names_of_species_in_tree ( const TreeNode tree,
size_t count 
)
char* GBT_tree_2_newick ( const TreeNode tree,
NewickFormat  format,
bool  compact 
)