ARB
Public Member Functions | List of all members
ST_ML Class Reference

#include <st_ml.hxx>

Inheritance diagram for ST_ML:
Inheritance graph
[legend]
Collaboration diagram for ST_ML:
Collaboration graph
[legend]

Public Member Functions

 ST_ML (GBDATA *gb_main)
 
 ~ST_ML ()
 
void create_column_statistic (AW_root *awr, const char *awarname, AW_awar *awar_default_alignment)
 
ColumnStatget_column_statistic ()
 
GB_ERROR calc_st_ml (const char *tree_name, const char *alignment_name, const char *species_names, int marked_only, ColumnStat *colstat, const WeightedFilter *weighted_filter) __ATTR__USERESULT
 
void cleanup ()
 
const AP_filterget_filter () const
 
size_t get_filtered_length () const
 
size_t get_alignment_length () const
 
ST_rate_matrixget_matrix_for (int distance)
 
GBDATAget_gb_main () const
 
const TreeNodeget_gbt_tree () const
 
size_t count_species_in_tree () const
 
AP_treefind_node_by_name (const char *species_name)
 
void set_postcalc_callback (WindowCallbackSimple postcalc_cb_, AW_window *cb_window_)
 
void do_postcalc_callback ()
 
size_t get_first_pos () const
 
size_t get_last_pos () const
 
double get_step_size () const
 
const ST_base_vectorget_inv_base_frequencies () const
 
const ST_base_vectorget_base_frequency_at (size_t pos) const
 
float get_rate_at (size_t pos) const
 
void set_modified (int *what=NULp)
 
void set_refresh ()
 
void clear_all ()
 
MostLikelySeqget_ml_vectors (const char *species_name, AP_tree *node, size_t start_ali_pos, size_t end_ali_pos)
 
ST_ML_Colorget_color_string (const char *species_name, AP_tree *node, size_t start_ali_pos, size_t end_ali_pos)
 
bool update_ml_likelihood (char *result[4], int &latest_update, const char *species_name, AP_tree *node)
 
int refresh_needed ()
 

Detailed Description

Definition at line 111 of file st_ml.hxx.

Constructor & Destructor Documentation

ST_ML::ST_ML ( GBDATA gb_main)

Definition at line 314 of file ST_ml.cxx.

ST_ML::~ST_ML ( )

Definition at line 339 of file ST_ml.cxx.

References GBS_free_hash().

Member Function Documentation

void ST_ML::create_column_statistic ( AW_root awr,
const char awarname,
AW_awar awar_default_alignment 
)

Definition at line 867 of file ST_ml.cxx.

References get_gb_main().

Referenced by STAT_create_main_window().

ColumnStat* ST_ML::get_column_statistic ( )
inline

Definition at line 175 of file st_ml.hxx.

Referenced by st_ok_cb(), and STAT_create_main_window().

GB_ERROR ST_ML::calc_st_ml ( const char tree_name,
const char alignment_name,
const char species_names,
int  marked_only,
ColumnStat colstat,
const WeightedFilter weighted_filter 
)
void ST_ML::cleanup ( )

Definition at line 472 of file ST_ml.cxx.

References GBS_free_hash(), NULp, and MostLikelySeq::tmp_out.

Referenced by calc_st_ml().

const AP_filter * ST_ML::get_filter ( ) const
size_t ST_ML::get_filtered_length ( ) const
size_t ST_ML::get_alignment_length ( ) const

Definition at line 889 of file ST_ml.cxx.

References get_filter(), and AP_filter::get_length().

Referenced by get_color_string(), and update_ml_likelihood().

ST_rate_matrix& ST_ML::get_matrix_for ( int  distance)
inline

Definition at line 190 of file st_ml.hxx.

Referenced by MostLikelySeq::calc_out(), and MostLikelySeq::calculate_ancestor().

GBDATA* ST_ML::get_gb_main ( ) const
inline

Definition at line 194 of file st_ml.hxx.

Referenced by create_column_statistic(), st_ok_cb(), and STAT_create_main_window().

const TreeNode * ST_ML::get_gbt_tree ( ) const

Definition at line 871 of file ST_ml.cxx.

Referenced by st_ml_check_sequence_quality().

size_t ST_ML::count_species_in_tree ( ) const

Definition at line 875 of file ST_ml.cxx.

References info, and ARB_tree_info::leafs.

Referenced by calc_st_ml().

AP_tree * ST_ML::find_node_by_name ( const char species_name)

Definition at line 881 of file ST_ml.cxx.

References GBS_read_hash(), and NULp.

Referenced by STAT_find_node_by_name().

void ST_ML::set_postcalc_callback ( WindowCallbackSimple  postcalc_cb_,
AW_window cb_window_ 
)
inline

Definition at line 200 of file st_ml.hxx.

Referenced by STAT_set_postcalc_callback().

void ST_ML::do_postcalc_callback ( )
inline

Definition at line 204 of file st_ml.hxx.

Referenced by st_ok_cb().

size_t ST_ML::get_first_pos ( ) const
inline
size_t ST_ML::get_last_pos ( ) const
inline
double ST_ML::get_step_size ( ) const
inline

Definition at line 209 of file st_ml.hxx.

Referenced by MostLikelySeq::calc_out(), and MostLikelySeq::calculate_ancestor().

const ST_base_vector* ST_ML::get_inv_base_frequencies ( ) const
inline

Definition at line 211 of file st_ml.hxx.

Referenced by MostLikelySeq::set_sequence().

const ST_base_vector& ST_ML::get_base_frequency_at ( size_t  pos) const
inline

Definition at line 212 of file st_ml.hxx.

Referenced by MostLikelySeq::calc_out().

float ST_ML::get_rate_at ( size_t  pos) const
inline

Definition at line 213 of file st_ml.hxx.

Referenced by MostLikelySeq::calc_out(), and MostLikelySeq::calculate_ancestor().

void ST_ML::set_modified ( int what = NULp)
void ST_ML::set_refresh ( )
void ST_ML::clear_all ( )

Definition at line 662 of file ST_ml.cxx.

References GB_read_clock(), and ta.

Referenced by MostLikelySeq::sequence_change().

MostLikelySeq * ST_ML::get_ml_vectors ( const char species_name,
AP_tree node,
size_t  start_ali_pos,
size_t  end_ali_pos 
)
ST_ML_Color * ST_ML::get_color_string ( const char species_name,
AP_tree node,
size_t  start_ali_pos,
size_t  end_ali_pos 
)
bool ST_ML::update_ml_likelihood ( char result[4],
int latest_update,
const char species_name,
AP_tree node 
)

calculates values for 'Detailed column statistics' in ARB_EDIT4

Returns
true if calculated with sucess
Parameters
resultif result[0] is NULp, memory will be allocated and assigned to result[0 .. 3]. You should NOT allocate result yourself, but you can reuse it for multiple calls.
latest_updatehas to contain and will be set to the latest statistic modification time (0 is a good start value)
species_namename of the species (for which the column statistic shall be calculated)
nodeof the current tree (for which the column statistic shall be calculated)

Note: either 'species_name' or 'node' needs to be specified, but NOT BOTH

Definition at line 725 of file ST_ml.cxx.

References ARB_calloc(), ST_base_vector::b, DNA_Table::char_to_enum(), GBS_read_hash(), get_alignment_length(), get_filtered_length(), get_ml_vectors(), GET_ML_VECTORS_BUG_WORKAROUND_INCREMENT, min, NULp, st_assert, ST_base_vector::summarize(), and MostLikelySeq::tmp_out.

Referenced by STAT_update_ml_likelihood().

int ST_ML::refresh_needed ( )

The documentation for this class was generated from the following files: