ARB
|
#include <arb_progress.h>
#include <arb_file.h>
#include <arb_misc.h>
#include <arb_diff.h>
#include "ad_cb.h"
#include "gb_key.h"
#include "TreeNode.h"
#include <climits>
Go to the source code of this file.
Classes | |
struct | CompressionRoot |
class | FINAL_TYPE< SEQTYPE > |
xml element More... | |
struct | Consensus |
struct | Sequence |
struct | MasterSequence |
Macros | |
#define | MAX_SEQUENCE_PER_MASTER 50 |
#define | MAX_NUMBER 0x7fffffff |
Functions | |
static Consensus * | g_b_new_Consensus (long len) |
static void | g_b_delete_Consensus (Consensus *gcon) |
static void | g_b_Consensus_add (Consensus *gcon, unsigned char *seq, long seq_len) |
static char * | g_b_Consensus_get_sequence (Consensus *gcon) |
static int | g_b_count_leafs (CompressionTree *node) |
static void | g_b_put_sequences_in_container (CompressionTree *ctree, Sequence *seqs, MasterSequence **masters, Consensus *gcon) |
static void | g_b_create_master (CompressionTree *node, Sequence *seqs, MasterSequence **masters, int my_master, const char *ali_name, long seq_len, arb_progress &progress) |
static void | subtract_sons_from_tree (CompressionTree *node, int subtract) |
static int | set_masters_with_sons (CompressionTree *node, int wantedSons, long *mcount) |
static int | maxCompressionSteps (CompressionTree *node) |
static int | init_indices_and_count_sons (CompressionTree *node, long *scount, const char *ali_name) |
static void | distribute_masters (CompressionTree *tree, long *mcount, int *max_masters) |
STATIC_ASSERT (MAX_NUMBER<=INT_MAX) | |
int | g_b_read_number2 (const unsigned char *&s) |
void | g_b_put_number2 (int i, unsigned char *&s) |
static char * | gb_compress_seq_by_master (const char *master, size_t master_len, int master_index, GBQUARK q, const char *seq, size_t seq_len, size_t *memsize, int old_flag) |
static char * | gb_compress_sequence_by_master (GBDATA *gbd, const char *master, size_t master_len, int master_index, GBQUARK q, const char *seq, size_t seq_len, size_t *memsize) |
static GB_ERROR | compress_sequence_tree (GBCONTAINER *gb_main, CompressionTree *tree, const char *ali_name) |
GB_ERROR | GBT_compress_sequence_tree2 (GBDATA *gbd, const char *tree_name, const char *ali_name) |
static char * | g_b_uncompress_single_sequence_by_master (const char *s, const char *master, size_t size, size_t *new_size) |
char * | gb_uncompress_by_sequence (GBDATA *gbd, const char *ss, size_t size, GB_ERROR *error, size_t *new_size) |
#define MAX_SEQUENCE_PER_MASTER 50 |
Definition at line 23 of file adseqcompr.cxx.
Referenced by compress_sequence_tree(), distribute_masters(), g_b_Consensus_add(), and set_masters_with_sons().
#define MAX_NUMBER 0x7fffffff |
Definition at line 324 of file adseqcompr.cxx.
Referenced by g_b_put_number2(), and g_b_read_number2().
Definition at line 81 of file adseqcompr.cxx.
References Consensus::con, and Consensus::len.
Referenced by g_b_create_master().
|
static |
Definition at line 94 of file adseqcompr.cxx.
References Consensus::con.
Referenced by g_b_create_master().
Definition at line 100 of file adseqcompr.cxx.
References Consensus::con, gb_assert, GB_RUNLENGTH_SIZE, Consensus::len, li, MAX_SEQUENCE_PER_MASTER, s, seq, and Consensus::used.
Referenced by g_b_put_sequences_in_container().
Definition at line 147 of file adseqcompr.cxx.
References Consensus::con, Consensus::len, max, s, seq, and Consensus::used.
Referenced by g_b_create_master().
|
static |
Definition at line 173 of file adseqcompr.cxx.
References NULp.
Referenced by compress_sequence_tree().
|
static |
Definition at line 179 of file adseqcompr.cxx.
References g_b_Consensus_add(), MasterSequence::gb_mas, GB_read_char_pntr(), GB_read_string_count(), and Sequence::gb_seq.
Referenced by g_b_create_master().
|
static |
Definition at line 198 of file adseqcompr.cxx.
References arb_progress::aborted(), GBDATA::as_entry(), g_b_Consensus_get_sequence(), g_b_delete_Consensus(), g_b_new_Consensus(), g_b_put_sequences_in_container(), Sequence::gb_seq, GB_write_security_write(), GB_write_string(), GBT_find_sequence(), Sequence::master, and MasterSequence::master.
Referenced by compress_sequence_tree().
|
static |
Definition at line 239 of file adseqcompr.cxx.
Referenced by set_masters_with_sons().
Definition at line 246 of file adseqcompr.cxx.
References gb_assert, MAX_SEQUENCE_PER_MASTER, and subtract_sons_from_tree().
Referenced by distribute_masters().
|
static |
Definition at line 271 of file adseqcompr.cxx.
References GBS_global_string_copy().
Referenced by distribute_masters().
|
static |
Definition at line 289 of file adseqcompr.cxx.
References GBT_find_sequence().
Referenced by compress_sequence_tree().
Definition at line 310 of file adseqcompr.cxx.
References gb_assert, MAX_SEQUENCE_PER_MASTER, maxCompressionSteps(), and set_masters_with_sons().
Referenced by compress_sequence_tree().
STATIC_ASSERT | ( | MAX_NUMBER<= | INT_MAX | ) |
Definition at line 327 of file adseqcompr.cxx.
References gb_assert, MAX_NUMBER, and result.
Referenced by gb_uncompress_by_sequence().
Definition at line 359 of file adseqcompr.cxx.
References gb_assert, and MAX_NUMBER.
Referenced by gb_compress_seq_by_master().
|
static |
Definition at line 522 of file adseqcompr.cxx.
References buffer, g_b_put_number2(), gb_compress_equal_bytes_2(), GB_COMPRESSION_SEQUENCE, and GB_give_other_buffer().
Referenced by gb_compress_sequence_by_master().
|
static |
Definition at line 572 of file adseqcompr.cxx.
References gb_compress_data(), gb_compress_seq_by_master(), GB_COMPRESSION_DICTIONARY, GB_COMPRESSION_LAST, GB_COMPRESSION_RUNLENGTH, and GB_COMPRESSION_SORTBYTES.
Referenced by compress_sequence_tree().
|
static |
Definition at line 581 of file adseqcompr.cxx.
References arb_assert, ARB_calloc(), ARB_strdup(), GBDATA::as_container(), GBDATA::as_entry(), distribute_masters(), arb_progress::done(), error(), arb_progress::error_if_aborted(), g_b_count_leafs(), g_b_create_master(), gb_assert, GB_await_error(), GB_clear_error(), gb_compress_sequence_by_master(), gb_create(), GB_CREATE_CONTAINER, gb_create_container(), GB_delete(), GB_entry(), GB_export_error(), GB_FIND, gb_find_or_create_quark(), GB_information(), GB_internal_error(), GB_MAIN(), MasterSequence::gb_mas, gb_Key::gb_master_ali, GB_nextEntry(), GB_read_clock(), GB_read_memuse(), gb_read_nr(), GB_read_string(), GB_read_string_count(), GB_search(), gb_search(), Sequence::gb_seq, gb_species_data, GB_STRING, GB_SYSTEM_FOLDER, GB_warning(), GB_warningf(), gb_write_compressed_pntr(), GB_write_security_delete(), GB_write_string(), GBS_global_string(), GBS_global_string_copy(), GBS_readable_size(), GBT_find_sequence(), GBT_first_species_rel_species_data(), GBT_get_alignment_len(), GBT_get_species_data(), GBT_link_tree(), GBT_next_species(), GBT_write_tree(), arb_progress::inc_and_check_user_abort(), init_indices_and_count_sons(), SmartPtr< T, C >::isSet(), GB_MAIN_TYPE::keys, Sequence::master, MasterSequence::master, MAX_SEQUENCE_PER_MASTER, NULp, seq, and warning().
Referenced by GBT_compress_sequence_tree2().
GB_ERROR GBT_compress_sequence_tree2 | ( | GBDATA * | gbd, |
const char * | tree_name, | ||
const char * | ali_name | ||
) |
Definition at line 889 of file adseqcompr.cxx.
References ASSERT_NO_ERROR, GB_transaction::close(), compress_sequence_tree(), destroy(), DOWNCAST, error(), GB_await_error(), GB_disable_quicksave(), GB_get_requested_undo_type(), GB_internal_error(), gb_main, GB_MAIN(), GB_request_undo_type(), GB_UNDO_KILL, GBT_link_tree(), GBT_name_of_largest_tree(), GBT_read_tree(), GB_MAIN_TYPE::get_transaction_level(), NULp, GB_transaction::ok(), GB_MAIN_TYPE::root_container, and ta.
Referenced by ARB_main(), and NT_database_optimization().
|
static |
Definition at line 959 of file adseqcompr.cxx.
References buffer, gb_assert, GB_give_other_buffer(), and GB_internal_error().
Referenced by gb_uncompress_by_sequence().
char* gb_uncompress_by_sequence | ( | GBDATA * | gbd, |
const char * | ss, | ||
size_t | size, | ||
GB_ERROR * | error, | ||
size_t * | new_size | ||
) |
Definition at line 1016 of file adseqcompr.cxx.
References g_b_read_number2(), g_b_uncompress_single_sequence_by_master(), gb_assert, GB_await_error(), GB_check_out_buffer(), GB_FATHER(), gb_find_by_nr(), gb_get_main_during_cb(), gb_load_single_key_data(), GB_MAIN_TYPE::gb_main(), GB_MAIN(), gb_Key::gb_master_ali, GB_read_char_pntr(), GB_read_string_count(), GB_MAIN_TYPE::keys, NULp, and s.
Referenced by GB_is_dictionary_compressed(), and gb_uncompress_data().