ARB
|
#include "NT_local_proto.h"
#include <arbdbt.h>
#include <arb_progress.h>
#include <arb_defs.h>
#include <arb_strbuf.h>
#include <pos_range.h>
#include <aw_root.hxx>
#include <aw_window.hxx>
#include <limits>
#include <vector>
#include <insdel.h>
#include "NT_local.h"
#include <arb_strarray.h>
#include <aw_awar.hxx>
#include <aw_awar_defs.hxx>
#include <aw_msg.hxx>
Go to the source code of this file.
Macros | |
#define | AWAR_SPLIT_ALI_BASE "split_ali/" |
#define | AWAR_SPLIT_ALI_BTMP "tmp/" AWAR_SPLIT_ALI_BASE |
#define | AWAR_SPLIT_ALI_TARGET AWAR_SPLIT_ALI_BTMP "target" |
#define | AWAR_SPLIT_ALI_POSITIONS AWAR_SPLIT_ALI_BASE "pos" |
#define | AWAR_SPLIT_ALI_MARKED AWAR_SPLIT_ALI_BASE "marked" |
#define | AWAR_SPLIT_ALI_OVERWRITE AWAR_SPLIT_ALI_BASE "overwrite" |
Typedefs | |
typedef vector< ExplicitRange > | RangeVec |
Functions | |
static GB_ERROR | calculate_and_check_ranges (int ali_source_len, const int *splitBefore, RangeVec &ranges) |
CONSTEXPR_INLINE int | digits (int parts) |
const char * | target_ali_name (const char *ali_target_prefix, int p, int digits) |
char * | build_split_id (const RangeVec &ranges) |
static GB_ERROR | split_data_into_parts (GBDATA *gb_data, const RangeVec &ranges, const char *ali_target_prefix) |
static GB_ERROR | copy_field_into_partial_alignments (GBDATA *gb_data, const int parts, const char *ali_target_prefix) |
static GB_ERROR | split_alignment (GBDATA *gb_main, const char *ali_source, const char *ali_target_prefix, const int *splitBefore, bool markedOnly, bool overwriteAlignments) |
static void | create_splitAlignment_awars (AW_root *root, AW_default properties, GBDATA *gb_main) |
static void | split_ali_cb (AW_window *aww) |
static void | use_editor_range_cb (AW_window *aww) |
AW_window * | NT_create_splitAlignment_window (AW_root *awr) |
Variables | |
static const int | END__ = numeric_limits<int>::max() |
#define AWAR_SPLIT_ALI_BASE "split_ali/" |
Definition at line 456 of file NT_split_ali.cxx.
#define AWAR_SPLIT_ALI_BTMP "tmp/" AWAR_SPLIT_ALI_BASE |
Definition at line 457 of file NT_split_ali.cxx.
#define AWAR_SPLIT_ALI_TARGET AWAR_SPLIT_ALI_BTMP "target" |
Definition at line 459 of file NT_split_ali.cxx.
Referenced by create_splitAlignment_awars(), NT_create_splitAlignment_window(), and split_ali_cb().
#define AWAR_SPLIT_ALI_POSITIONS AWAR_SPLIT_ALI_BASE "pos" |
Definition at line 460 of file NT_split_ali.cxx.
Referenced by create_splitAlignment_awars(), NT_create_splitAlignment_window(), split_ali_cb(), and use_editor_range_cb().
#define AWAR_SPLIT_ALI_MARKED AWAR_SPLIT_ALI_BASE "marked" |
Definition at line 461 of file NT_split_ali.cxx.
Referenced by create_splitAlignment_awars(), NT_create_splitAlignment_window(), and split_ali_cb().
#define AWAR_SPLIT_ALI_OVERWRITE AWAR_SPLIT_ALI_BASE "overwrite" |
Definition at line 462 of file NT_split_ali.cxx.
Referenced by create_splitAlignment_awars(), NT_create_splitAlignment_window(), and split_ali_cb().
typedef vector<ExplicitRange> RangeVec |
Definition at line 28 of file NT_split_ali.cxx.
|
static |
Definition at line 32 of file NT_split_ali.cxx.
References PosRange::after(), error(), GBS_global_string(), info2bio(), intersection(), PosRange::is_empty(), NULp, PosRange::prior(), and PosRange::start().
Referenced by split_alignment().
CONSTEXPR_INLINE int digits | ( | int | parts | ) |
Definition at line 56 of file NT_split_ali.cxx.
Referenced by copy_field_into_partial_alignments(), AWT_configuration_selection::fill(), float_shift_factor(), gbl_round(), get_short(), DBwriter::renumberDuplicateGenes(), split_alignment(), and split_data_into_parts().
Definition at line 60 of file NT_split_ali.cxx.
References GBS_global_string_copy().
Referenced by copy_field_into_partial_alignments(), split_alignment(), and split_data_into_parts().
Definition at line 66 of file NT_split_ali.cxx.
References GBS_strstruct::get_copy(), GBS_strstruct::put(), and GBS_strstruct::putlong().
Referenced by split_alignment().
|
static |
Definition at line 75 of file NT_split_ali.cxx.
References digits(), error(), GB_await_error(), GB_get_grandfather(), GB_read_as_string(), GB_read_key_pntr(), GB_read_security_write(), GB_read_type(), GB_write_autoconv_string(), GBT_create_sequence_data(), NULp, seq, target_ali_name(), type, and UNCOVERED.
Referenced by split_alignment().
|
static |
Definition at line 108 of file NT_split_ali.cxx.
References digits(), error(), GB_get_grandfather(), GB_read_char_pntr(), GB_read_key_pntr(), GB_read_security_write(), GB_read_type(), GB_STRING, GB_write_string(), GBS_global_string_copy(), GBT_create_sequence_data(), NULp, target_ali_name(), and type.
Referenced by split_alignment().
|
static |
splits one alignment into multiple alignments.
ali_source | name of source alignment |
ali_target_prefix | prefix of target alignment. will be extended by '_1', '_2', ... |
splitBefore | list of positions [0..N-1] where 2nd, 3rd, ... part shall begin. Terminate with 'END__'. |
markedOnly | true->operate only on marked species, false->operate on all species |
overwriteAlignments | true->delete+recreate existing alignments, false->bail-out with error |
Definition at line 133 of file NT_split_ali.cxx.
References ARB_is_alignment_relative_data(), arb_progress::auto_subtitles(), build_split_id(), calculate_and_check_ranges(), GB_transaction::close(), copy_field_into_partial_alignments(), digits(), PosRange::end(), error(), GB_await_error(), GB_child(), GB_clear_error(), GB_entry(), GB_nextChild(), GBS_global_string(), GBS_global_string_copy(), GBT_add_alignment_changekeys(), GBT_create_new_alignment(), GBT_delete_alignment(), GBT_find_sequence(), GBT_first_marked_species(), GBT_first_SAI(), GBT_first_species(), GBT_get_alignment(), GBT_get_alignment_len(), GBT_next_marked_species(), GBT_next_SAI(), GBT_next_species(), arb_progress::inc_and_check_user_abort(), info2bio(), NULp, plural(), split_data_into_parts(), PosRange::start(), ta, target_ali_name(), and UNCOVERED.
Referenced by split_ali_cb().
|
static |
Definition at line 464 of file NT_split_ali.cxx.
References AW_root::awar_int(), AWAR_RANGE, AWAR_SPLIT_ALI_MARKED, AWAR_SPLIT_ALI_OVERWRITE, AWAR_SPLIT_ALI_POSITIONS, AWAR_SPLIT_ALI_TARGET, AW_root::awar_string(), GB_clear_error(), GBS_global_string(), and GBT_get_default_alignment().
Referenced by NT_create_splitAlignment_window().
|
static |
Definition at line 482 of file NT_split_ali.cxx.
References aw_message_if(), AW_root::awar(), AWAR_SPLIT_ALI_MARKED, AWAR_SPLIT_ALI_OVERWRITE, AWAR_SPLIT_ALI_POSITIONS, AWAR_SPLIT_ALI_TARGET, bio2info(), END__, error(), GB_await_error(), NT_global::gb_main, GBS_global_string(), GBT_get_default_alignment(), GBT_splitNdestroy_string(), AW_window::get_root(), GLOBAL, NULp, AW_awar::read_int(), AW_awar::read_string(), CharPtrArray::size(), split_alignment(), and SPLIT_DROPEMPTY.
Referenced by NT_create_splitAlignment_window().
|
static |
Definition at line 524 of file NT_split_ali.cxx.
References aw_message_if(), AW_root::awar(), AWAR_RANGE, AWAR_SPLIT_ALI_POSITIONS, error(), GBS_global_string(), AW_window::get_root(), NULp, AW_awar::read_char_pntr(), and AW_awar::write_string().
Referenced by NT_create_splitAlignment_window().
Definition at line 549 of file NT_split_ali.cxx.
References AW_POPDOWN(), AW_ROOT_DEFAULT, AWAR_RANGE, AWAR_SPLIT_ALI_MARKED, AWAR_SPLIT_ALI_OVERWRITE, AWAR_SPLIT_ALI_POSITIONS, AWAR_SPLIT_ALI_TARGET, create_splitAlignment_awars(), NT_global::gb_main, GLOBAL, makeHelpCallback(), NULp, split_ali_cb(), and use_editor_range_cb().
Referenced by popup_new_main_window().
Definition at line 30 of file NT_split_ali.cxx.
Referenced by split_ali_cb().