CDynProg Class Reference


Detailed Description

Dynamic Programming Class.

Structure and Function collection. This Class implements a Dynamic Programming functions.

Definition at line 47 of file DynProg.h.

Inheritance diagram for CDynProg:
Inheritance graph
[legend]

List of all members.

Classes

struct  segment_loss_struct
 segment loss More...
struct  svm_values_struct
 SVM values. More...

Public Member Functions

 CDynProg (int32_t p_num_svms=8)
virtual ~CDynProg ()
float64_t best_path_no_b (int32_t max_iter, int32_t &best_iter, int32_t *my_path)
void best_path_no_b_trans (int32_t max_iter, int32_t &max_best_iter, int16_t nbest, float64_t *prob_nbest, int32_t *my_paths)
void set_num_states (int32_t p_N)
int32_t get_num_states ()
int32_t get_num_svms ()
void init_content_svm_value_array (const int32_t p_num_svms, const int32_t seq_len)
void init_tiling_data (int32_t *probe_pos, float64_t *intensities, const int32_t num_probes, const int32_t seq_len)
void precompute_tiling_plifs (CPlif **PEN, const int32_t *tiling_plif_ids, const int32_t num_tiling_plifs, const int32_t seq_len, const int32_t *pos)
void resize_lin_feat (int32_t num_new_feat, int32_t seq_len)
void set_p_vector (float64_t *p, int32_t N)
void set_q_vector (float64_t *q, int32_t N)
void set_a (float64_t *a, int32_t M, int32_t N)
void set_a_id (int32_t *a, int32_t M, int32_t N)
void set_a_trans_matrix (float64_t *a_trans, int32_t num_trans, int32_t N)
void init_svm_arrays (int32_t p_num_degrees, int32_t p_num_svms)
void init_word_degree_array (int32_t *p_word_degree_array, int32_t num_elem)
void init_cum_num_words_array (int32_t *p_cum_num_words_array, int32_t num_elem)
void init_num_words_array (int32_t *p_num_words_array, int32_t num_elem)
void init_mod_words_array (int32_t *p_mod_words_array, int32_t num_elem, int32_t num_columns)
void init_sign_words_array (bool *p_sign_words_array, int32_t num_elem)
void init_string_words_array (int32_t *p_string_words_array, int32_t num_elem)
bool check_svm_arrays ()
void best_path_set_seq (float64_t *seq, int32_t N, int32_t seq_len)
void best_path_set_seq3d (float64_t *seq, int32_t p_N, int32_t seq_len, int32_t max_num_signals)
void best_path_set_pos (int32_t *pos, int32_t seq_len)
void best_path_set_orf_info (int32_t *orf_info, int32_t m, int32_t n)
void best_path_set_segment_sum_weights (float64_t *segment_sum_weights, int32_t num_states, int32_t seq_len)
void best_path_set_plif_list (CDynamicArray< CPlifBase * > *plifs)
void best_path_set_plif_id_matrix (int32_t *plif_id_matrix, int32_t m, int32_t n)
void best_path_set_plif_state_signal_matrix (int32_t *plif_id_matrix, int32_t m, int32_t n)
void best_path_set_genestr (char *genestr, int32_t genestr_len, int32_t genestr_num)
void best_path_set_my_state_seq (int32_t *my_state_seq, int32_t seq_len)
void best_path_set_my_pos_seq (int32_t *my_pos_seq, int32_t seq_len)
void best_path_set_single_genestr (char *genestr, int32_t genestr_len)
void best_path_set_dict_weights (float64_t *dictionary_weights, int32_t dict_len, int32_t n)
void best_path_set_segment_loss (float64_t *segment_loss, int32_t num_segment_id1, int32_t num_segment_id2)
void best_path_set_segment_ids_mask (int32_t *segment_ids, float64_t *segment_mask, int32_t m)
void best_path_call (int32_t nbest, bool use_orf)
void best_path_deriv_call ()
void best_path_2struct_call (int32_t nbest)
void best_path_simple_call (int32_t nbest)
void best_path_deriv_call (int32_t nbest)
void best_path_get_scores (float64_t **scores, int32_t *n)
void best_path_get_states (int32_t **states, int32_t *m, int32_t *n)
void best_path_get_positions (int32_t **positions, int32_t *m, int32_t *n)
void best_path_get_losses (float64_t **my_losses, int32_t *seq_len)
template<int16_t nbest, bool with_loss, bool with_multiple_sequences>
void best_path_trans (const float64_t *seq, int32_t seq_len, const int32_t *pos, const int32_t *orf_info, CPlifBase **PLif_matrix, CPlifBase **Plif_state_signals, int32_t max_num_signals, int32_t genestr_num, float64_t *prob_nbest, int32_t *my_state_seq, int32_t *my_pos_seq, bool use_orf)
void best_path_trans_deriv (int32_t *my_state_seq, int32_t *my_pos_seq, float64_t *my_scores, float64_t *my_losses, int32_t my_seq_len, const float64_t *seq_array, int32_t seq_len, const int32_t *pos, CPlifBase **Plif_matrix, CPlifBase **Plif_state_signals, int32_t max_num_signals, int32_t genestr_num)
void best_path_2struct (const float64_t *seq, int32_t seq_len, const int32_t *pos, CPlifBase **Plif_matrix, const char *genestr, int32_t genestr_len, int16_t nbest, float64_t *prob_nbest, int32_t *my_state_seq, int32_t *my_pos_seq, float64_t *dictionary_weights, int32_t dict_len, float64_t *segment_sum_weights)
void best_path_trans_simple (const float64_t *seq, int32_t seq_len, int16_t nbest, float64_t *prob_nbest, int32_t *my_state_seq)
T_STATES get_N () const
 access function for number of states N
void set_q (T_STATES offset, float64_t value)
void set_p (T_STATES offset, float64_t value)
void set_a (T_STATES line_, T_STATES column, float64_t value)
float64_t get_q (T_STATES offset) const
float64_t get_q_deriv (T_STATES offset) const
float64_t get_p (T_STATES offset) const
float64_t get_p_deriv (T_STATES offset) const
void precompute_content_values (uint16_t ***wordstr, const int32_t *pos, const int32_t num_cand_pos, const int32_t genestr_len, float64_t *dictionary_weights, int32_t dict_len)
float64_tget_lin_feat (int32_t &dim1, int32_t &dim2)
void set_lin_feat (float64_t *p_lin_feat, int32_t p_num_svms, int32_t p_seq_len)
void create_word_string (const char *genestr, int32_t genestr_num, int32_t genestr_len, uint16_t ***wordstr)
void precompute_stop_codons (const char *genestr, int32_t genestr_len)
void set_genestr_len (int32_t genestr_len)
float64_t get_a (T_STATES line_, T_STATES column) const
float64_t get_a_deriv (T_STATES line_, T_STATES column) const

Protected Member Functions

void lookup_content_svm_values (const int32_t from_state, const int32_t to_state, const int32_t from_pos, const int32_t to_pos, float64_t *svm_values, int32_t frame)
void lookup_tiling_plif_values (const int32_t from_state, const int32_t to_state, const int32_t len, float64_t *svm_values)
int32_t find_frame (const int32_t from_state)
int32_t raw_intensities_interval_query (const int32_t from_pos, const int32_t to_pos, float64_t *intensities, int32_t type)
void translate_from_single_order (uint16_t *obs, int32_t sequence_length, int32_t start, int32_t order, int32_t max_val=2)
void reset_svm_value (int32_t pos, int32_t &last_svm_pos, float64_t *svm_value)
void extend_svm_value (uint16_t *wordstr, int32_t pos, int32_t &last_svm_pos, float64_t *svm_value)
void reset_segment_sum_value (int32_t num_states, int32_t pos, int32_t &last_segment_sum_pos, float64_t *segment_sum_value)
void extend_segment_sum_value (float64_t *segment_sum_weights, int32_t seqlen, int32_t num_states, int32_t pos, int32_t &last_segment_sum_pos, float64_t *segment_sum_value)
void init_svm_values (struct svm_values_struct &svs, int32_t start_pos, int32_t seqlen, int32_t howmuchlookback)
void clear_svm_values (struct svm_values_struct &svs)
void find_svm_values_till_pos (uint16_t ***wordstr, const int32_t *pos, int32_t t_end, struct svm_values_struct &svs)
void find_svm_values_till_pos (uint16_t **wordstr, const int32_t *pos, int32_t t_end, struct svm_values_struct &svs)
void update_svm_values_till_pos (uint16_t ***wordstr, const int32_t *pos, int32_t t_end, int32_t prev_t_end, struct svm_values_struct &svs)
bool extend_orf (int32_t orf_from, int32_t orf_to, int32_t start, int32_t &last_pos, int32_t to)
void init_segment_loss (struct segment_loss_struct &loss, int32_t seqlen, int32_t howmuchlookback)
void clear_segment_loss (struct segment_loss_struct &loss)
float64_t extend_segment_loss (struct segment_loss_struct &loss, const int32_t *pos_array, int32_t segment_id, int32_t pos, int32_t &last_pos, float64_t &last_value)
void find_segment_loss_till_pos (const int32_t *pos, int32_t t_end, CArray< int32_t > &segment_ids, CArray< float64_t > &segment_mask, struct segment_loss_struct &loss)
virtual const char * get_name () const

Protected Attributes

CArray2< float64_tdict_weights
float64_tdict_weights_array
int32_t num_degrees
int32_t num_svms
int32_t num_strings
CArray< int32_t > word_degree
CArray< int32_t > cum_num_words
int32_t * cum_num_words_array
CArray< int32_t > num_words
int32_t * num_words_array
CArray2< int32_t > mod_words
int32_t * mod_words_array
CArray< bool > sign_words
bool * sign_words_array
CArray< int32_t > string_words
int32_t * string_words_array
CArray< int32_t > svm_pos_start
CArray< int32_t > num_unique_words
bool svm_arrays_clean
int32_t num_svms_single
int32_t word_degree_single
int32_t cum_num_words_single
int32_t num_words_single
CArray< bool > word_used_single
CArray< float64_tsvm_value_unnormalized_single
int32_t num_unique_words_single
int32_t max_a_id
int32_t m_step
int32_t m_call
CArray3< float64_tm_seq
CArray< int32_t > m_pos
CArray2< int32_t > m_orf_info
CArray2< float64_tm_segment_sum_weights
CArray< CPlifBase * > m_plif_list
CArray2< CPlifBase * > m_PEN
CArray2< CPlifBase * > m_PEN_state_signals
CArray2< char > m_genestr
CArray2< float64_tm_dict_weights
CArray3< float64_tm_segment_loss
CArray< int32_t > m_segment_ids
CArray< float64_tm_segment_mask
CArray< int32_t > m_my_state_seq
CArray< int32_t > m_my_pos_seq
CArray< float64_tm_my_scores
CArray< float64_tm_my_losses
CArray< float64_tm_scores
CArray2< int32_t > m_states
CArray2< int32_t > m_positions
CArray< bool > m_genestr_stop
CArray2< float64_tm_lin_feat
float64_tm_raw_intensities
int32_t * m_probe_pos
int32_t * m_num_probes_cum
int32_t * m_num_lin_feat_plifs_cum
int32_t m_num_raw_data
int32_t m_genestr_len
model specific variables.

these are p,q,a,b,N,M etc



int32_t N
 number of states
CArray2< int32_t > transition_matrix_a_id
 transition matrix
CArray2< float64_ttransition_matrix_a
CArray2< float64_ttransition_matrix_a_deriv
CArray< float64_tinitial_state_distribution_p
 initial distribution of states
CArray< float64_tinitial_state_distribution_p_deriv
CArray< float64_tend_state_distribution_q
 distribution of end-states
CArray< float64_tend_state_distribution_q_deriv

Constructor & Destructor Documentation

CDynProg::CDynProg ( int32_t  p_num_svms = 8  ) 

constructor

Parameters:
p_num_svms number of SVMs

Definition at line 75 of file DynProg.cpp.

CDynProg::~CDynProg (  )  [virtual]

Definition at line 147 of file DynProg.cpp.


Member Function Documentation

void CDynProg::best_path_2struct ( const float64_t seq,
int32_t  seq_len,
const int32_t *  pos,
CPlifBase **  Plif_matrix,
const char *  genestr,
int32_t  genestr_len,
int16_t  nbest,
float64_t prob_nbest,
int32_t *  my_state_seq,
int32_t *  my_pos_seq,
float64_t dictionary_weights,
int32_t  dict_len,
float64_t segment_sum_weights 
)

best path 2struct

Parameters:
seq sequence
seq_len length of sequence
pos position
Plif_matrix Plif matrix
genestr gene string
genestr_len length of gene string
nbest nbest
prob_nbest prob(ability?) nbest
my_state_seq my state seq
my_pos_seq my pos seq
dictionary_weights dictionary weights
dict_len length of dictionary weights
segment_sum_weights segment sum weights

Definition at line 1513 of file DynProg.cpp.

void CDynProg::best_path_2struct_call ( int32_t  nbest  ) 

best path 2struct call

Parameters:
nbest nbest

Definition at line 1062 of file DynProg.cpp.

void CDynProg::best_path_call ( int32_t  nbest,
bool  use_orf 
)

best path call

Parameters:
nbest nbest
use_orf whether to use orf

Definition at line 1004 of file DynProg.cpp.

void CDynProg::best_path_deriv_call ( int32_t  nbest  ) 

best path derivative call

Parameters:
nbest nbest

Definition at line 1108 of file DynProg.cpp.

void CDynProg::best_path_deriv_call (  ) 

best path derivative call

Definition at line 1039 of file DynProg.cpp.

void CDynProg::best_path_get_losses ( float64_t **  my_losses,
int32_t *  seq_len 
)

get best path losses

Parameters:
my_losses my losses
seq_len length of sequence

Definition at line 1163 of file DynProg.cpp.

void CDynProg::best_path_get_positions ( int32_t **  positions,
int32_t *  m,
int32_t *  n 
)

best path get positions

Parameters:
positions positions
m dimension m
n dimension n

Definition at line 1150 of file DynProg.cpp.

void CDynProg::best_path_get_scores ( float64_t **  scores,
int32_t *  n 
)

best path get scores

Parameters:
scores scores
n dimension n

Definition at line 1120 of file DynProg.cpp.

void CDynProg::best_path_get_states ( int32_t **  states,
int32_t *  m,
int32_t *  n 
)

best path get states

Parameters:
states states
m dimension m
n dimension n

Definition at line 1138 of file DynProg.cpp.

float64_t CDynProg::best_path_no_b ( int32_t  max_iter,
int32_t &  best_iter,
int32_t *  my_path 
)

best path no b

Parameters:
max_iter max iter
best_iter best iter
my_path my path
Returns:
best path no b

Definition at line 1173 of file DynProg.cpp.

void CDynProg::best_path_no_b_trans ( int32_t  max_iter,
int32_t &  max_best_iter,
int16_t  nbest,
float64_t prob_nbest,
int32_t *  my_paths 
)

best path no b transition

Parameters:
max_iter max iter
max_best_iter max best iter
nbest nbest
prob_nbest prob_nbest
my_paths my paths

Definition at line 1258 of file DynProg.cpp.

void CDynProg::best_path_set_dict_weights ( float64_t dictionary_weights,
int32_t  dict_len,
int32_t  n 
)

set best path dict weights

Parameters:
dictionary_weights dictionary weights
dict_len length of dictionary weights
n dimension n

Definition at line 952 of file DynProg.cpp.

void CDynProg::best_path_set_genestr ( char *  genestr,
int32_t  genestr_len,
int32_t  genestr_num 
)

set best path genesstr

Parameters:
genestr gene string
genestr_len length of gene string
genestr_num number of gene strings, typically 1

Definition at line 920 of file DynProg.cpp.

void CDynProg::best_path_set_my_pos_seq ( int32_t *  my_pos_seq,
int32_t  seq_len 
)

set best path my position sequence

Parameters:
my_pos_seq my position sequence
seq_len length of sequence

Definition at line 944 of file DynProg.cpp.

void CDynProg::best_path_set_my_state_seq ( int32_t *  my_state_seq,
int32_t  seq_len 
)

set best path my state sequence

Parameters:
my_state_seq my state sequence
seq_len length of sequence

Definition at line 935 of file DynProg.cpp.

void CDynProg::best_path_set_orf_info ( int32_t *  orf_info,
int32_t  m,
int32_t  n 
)

set best path orf info only for best_path_trans

Parameters:
orf_info the orf info
m dimension m
n dimension n

Definition at line 821 of file DynProg.cpp.

void CDynProg::best_path_set_plif_id_matrix ( int32_t *  plif_id_matrix,
int32_t  m,
int32_t  n 
)

set best path plif id(entity?) matrix

Parameters:
plif_id_matrix plif id matrix
m dimension m of matrix
n dimension n of matrix

Definition at line 867 of file DynProg.cpp.

void CDynProg::best_path_set_plif_list ( CDynamicArray< CPlifBase * > *  plifs  ) 

set best path Plif list

Parameters:
plifs list of Plifs

Definition at line 853 of file DynProg.cpp.

void CDynProg::best_path_set_plif_state_signal_matrix ( int32_t *  plif_id_matrix,
int32_t  m,
int32_t  n 
)

set best path plif state signal matrix

Parameters:
plif_id_matrix plif id matrix
m dimension m of matrix
n dimension n of matrix

Definition at line 892 of file DynProg.cpp.

void CDynProg::best_path_set_pos ( int32_t *  pos,
int32_t  seq_len 
)

set best path pos

Parameters:
pos the position
seq_len length of sequence

Definition at line 808 of file DynProg.cpp.

void CDynProg::best_path_set_segment_ids_mask ( int32_t *  segment_ids,
float64_t segment_mask,
int32_t  m 
)

set best path segmend ids mask

Parameters:
segment_ids segment ids
segment_mask segment mask
m dimension m

Definition at line 990 of file DynProg.cpp.

void CDynProg::best_path_set_segment_loss ( float64_t segment_loss,
int32_t  num_segment_id1,
int32_t  num_segment_id2 
)

set best path segment loss

Parameters:
segment_loss segment loss
num_segment_id1 number of segment id1
num_segment_id2 number of segment id2

Definition at line 974 of file DynProg.cpp.

void CDynProg::best_path_set_segment_sum_weights ( float64_t segment_sum_weights,
int32_t  num_states,
int32_t  seq_len 
)

set best path segment sum weights only for best_path_2struct

Parameters:
segment_sum_weights segment sum weights
num_states number of states
seq_len length of sequence

Definition at line 836 of file DynProg.cpp.

void CDynProg::best_path_set_seq ( float64_t seq,
int32_t  N,
int32_t  seq_len 
)

set best path seq

Parameters:
seq the sequence
N dimension N
seq_len length of sequence

Definition at line 769 of file DynProg.cpp.

void CDynProg::best_path_set_seq3d ( float64_t seq,
int32_t  p_N,
int32_t  seq_len,
int32_t  max_num_signals 
)

set best path seq3d

Parameters:
seq the 3D sequence
p_N dimension N
seq_len length of sequence
max_num_signals maximal number of signals

Definition at line 788 of file DynProg.cpp.

void CDynProg::best_path_set_single_genestr ( char *  genestr,
int32_t  genestr_len 
)

set best path single gene string

Parameters:
genestr gene string
genestr_len length of gene string

Definition at line 340 of file DynProg.h.

void CDynProg::best_path_simple_call ( int32_t  nbest  ) 

best path simple call

Parameters:
nbest nbest

Definition at line 1088 of file DynProg.cpp.

template<int16_t nbest, bool with_loss, bool with_multiple_sequences>
void CDynProg::best_path_trans ( const float64_t seq,
int32_t  seq_len,
const int32_t *  pos,
const int32_t *  orf_info,
CPlifBase **  PLif_matrix,
CPlifBase **  Plif_state_signals,
int32_t  max_num_signals,
int32_t  genestr_num,
float64_t prob_nbest,
int32_t *  my_state_seq,
int32_t *  my_pos_seq,
bool  use_orf 
)

best path trans

Parameters:
seq sequence
seq_len length of sequence
pos position
orf_info orf info
PLif_matrix Plif matrix
Plif_state_signals Plif state signals
max_num_signals maximal number of signals
genestr_num number of gene strings
prob_nbest prob nbest
my_state_seq my state seq
my_pos_seq my pos seq
use_orf whether orf shall be used

Definition at line 2380 of file DynProg.cpp.

void CDynProg::best_path_trans_deriv ( int32_t *  my_state_seq,
int32_t *  my_pos_seq,
float64_t my_scores,
float64_t my_losses,
int32_t  my_seq_len,
const float64_t seq_array,
int32_t  seq_len,
const int32_t *  pos,
CPlifBase **  Plif_matrix,
CPlifBase **  Plif_state_signals,
int32_t  max_num_signals,
int32_t  genestr_num 
)

best path trans derivative

Parameters:
my_state_seq my state seq
my_pos_seq my pos seq
my_scores my scores
my_losses my losses
my_seq_len my sequence length
seq_array sequence array
seq_len length of sequence
pos position
Plif_matrix Plif matrix
Plif_state_signals Plif state signals
max_num_signals maximal number of signals
genestr_num number of gene strings

Definition at line 3037 of file DynProg.cpp.

void CDynProg::best_path_trans_simple ( const float64_t seq,
int32_t  seq_len,
int16_t  nbest,
float64_t prob_nbest,
int32_t *  my_state_seq 
)

best path trans simple

Parameters:
seq sequence
seq_len length of sequence
nbest nbest
prob_nbest prob(ability?) nbest
my_state_seq my state seq

Definition at line 3301 of file DynProg.cpp.

bool CDynProg::check_svm_arrays (  ) 

check SVM arrays call this function to check consistency

Returns:
whether arrays are ok

Definition at line 713 of file DynProg.cpp.

void CDynProg::clear_segment_loss ( struct segment_loss_struct loss  )  [protected]

clear segment loss

Parameters:
loss segment loss to clear

Definition at line 1861 of file DynProg.cpp.

void CDynProg::clear_svm_values ( struct svm_values_struct svs  )  [protected]

clear SVM values

Parameters:
svs SVM values

Definition at line 2085 of file DynProg.cpp.

void CDynProg::create_word_string ( const char *  genestr,
int32_t  genestr_num,
int32_t  genestr_len,
uint16_t ***  wordstr 
)

create word string from char* Jonas

Parameters:
genestr gene string
genestr_num number of gene string
genestr_len length of gene string
wordstr word strings

Definition at line 384 of file DynProg.cpp.

bool CDynProg::extend_orf ( int32_t  orf_from,
int32_t  orf_to,
int32_t  start,
int32_t &  last_pos,
int32_t  to 
) [protected]

extend orf

Parameters:
orf_from orf from
orf_to orf to
start start
last_pos last position
to to

Definition at line 2341 of file DynProg.cpp.

float64_t CDynProg::extend_segment_loss ( struct segment_loss_struct loss,
const int32_t *  pos_array,
int32_t  segment_id,
int32_t  pos,
int32_t &  last_pos,
float64_t last_value 
) [protected]

extend segment loss

Parameters:
loss segment loss to extend
pos_array position array
segment_id ID of segment
pos position
last_pos last position
last_value last value
Returns:
last value

Definition at line 1882 of file DynProg.cpp.

void CDynProg::extend_segment_sum_value ( float64_t segment_sum_weights,
int32_t  seqlen,
int32_t  num_states,
int32_t  pos,
int32_t &  last_segment_sum_pos,
float64_t segment_sum_value 
) [protected]

extend segment sum value

Parameters:
segment_sum_weights segment sum weights
seqlen length of sequence
num_states number of states
pos position
last_segment_sum_pos last segment sum position
segment_sum_value value to set

Definition at line 1499 of file DynProg.cpp.

void CDynProg::extend_svm_value ( uint16_t *  wordstr,
int32_t  pos,
int32_t &  last_svm_pos,
float64_t svm_value 
) [protected]

extend SVM value

Parameters:
wordstr word string
pos position
last_svm_pos lsat SVM position
svm_value value to set

Definition at line 1453 of file DynProg.cpp.

int32_t CDynProg::find_frame ( const int32_t  from_state  )  [protected]

find frame

Parameters:
from_state from state
void CDynProg::find_segment_loss_till_pos ( const int32_t *  pos,
int32_t  t_end,
CArray< int32_t > &  segment_ids,
CArray< float64_t > &  segment_mask,
struct segment_loss_struct loss 
) [protected]

find segment loss till pos

Parameters:
pos position
t_end t end
segment_ids segment IDs
segment_mask segmend mask
loss segment loss

Definition at line 1949 of file DynProg.cpp.

void CDynProg::find_svm_values_till_pos ( uint16_t **  wordstr,
const int32_t *  pos,
int32_t  t_end,
struct svm_values_struct svs 
) [protected]

find SVM values till position

Parameters:
wordstr word string
pos position
t_end t end
svs SVM values

Definition at line 2236 of file DynProg.cpp.

void CDynProg::find_svm_values_till_pos ( uint16_t ***  wordstr,
const int32_t *  pos,
int32_t  t_end,
struct svm_values_struct svs 
) [protected]

find SVM values till position (swig compatible?)

Parameters:
wordstr word string
pos position
t_end t end
svs SVM values

Definition at line 2121 of file DynProg.cpp.

float64_t CDynProg::get_a ( T_STATES  line_,
T_STATES  column 
) const

access function for matrix a

Parameters:
line_ row in matrix 0...N-1
column column in matrix 0...N-1
Returns:
value at position line colum

Definition at line 652 of file DynProg.h.

float64_t CDynProg::get_a_deriv ( T_STATES  line_,
T_STATES  column 
) const

access function for matrix a derivated

Parameters:
line_ row in matrix 0...N-1
column column in matrix 0...N-1
Returns:
value at position line colum

Definition at line 663 of file DynProg.h.

float64_t* CDynProg::get_lin_feat ( int32_t &  dim1,
int32_t &  dim2 
)

return array of precomputed linear features like content predictions and PLiFed tiling array data Jonas

Returns:
lin_feat_array

Definition at line 607 of file DynProg.h.

T_STATES CDynProg::get_N (  )  const

access function for number of states N

Definition at line 512 of file DynProg.h.

virtual const char* CDynProg::get_name (  )  const [protected, virtual]
Returns:
object name

Implements CSGObject.

Definition at line 900 of file DynProg.h.

int32_t CDynProg::get_num_states (  ) 

get num states

Definition at line 235 of file DynProg.cpp.

int32_t CDynProg::get_num_svms (  ) 

get num svms

Definition at line 194 of file DynProg.cpp.

float64_t CDynProg::get_p ( T_STATES  offset  )  const

access function for probability of initial states

Parameters:
offset index 0...N-1
Returns:
value at offset

Definition at line 571 of file DynProg.h.

float64_t CDynProg::get_p_deriv ( T_STATES  offset  )  const

access function for derivated probability of initial states

Parameters:
offset index 0...N-1
Returns:
value at offset

Definition at line 581 of file DynProg.h.

float64_t CDynProg::get_q ( T_STATES  offset  )  const

access function for probability of end states

Parameters:
offset index 0...N-1
Returns:
value at offset

Definition at line 551 of file DynProg.h.

float64_t CDynProg::get_q_deriv ( T_STATES  offset  )  const

access function for derivated probability of end states

Parameters:
offset index 0...N-1
Returns:
value at offset

Definition at line 561 of file DynProg.h.

void CDynProg::init_content_svm_value_array ( const int32_t  p_num_svms,
const int32_t  seq_len 
)

init CArray for precomputed content svm values with size seq_len x num_svms

Parameters:
p_num_svms,: number of svm weight vectors for content prediction
seq_len,: number of candidate positions

Definition at line 271 of file DynProg.cpp.

void CDynProg::init_cum_num_words_array ( int32_t *  p_cum_num_words_array,
int32_t  num_elem 
)

init cum num words array

Parameters:
p_cum_num_words_array new cum num words array
num_elem number of array elements

Definition at line 640 of file DynProg.cpp.

void CDynProg::init_mod_words_array ( int32_t *  p_mod_words_array,
int32_t  num_elem,
int32_t  num_columns 
)

init mod words array

Parameters:
p_mod_words_array new mod words array
num_elem number of array elements
num_columns number of columns

Definition at line 669 of file DynProg.cpp.

void CDynProg::init_num_words_array ( int32_t *  p_num_words_array,
int32_t  num_elem 
)

init num words array

Parameters:
p_num_words_array new num words array
num_elem number of array elements

Definition at line 653 of file DynProg.cpp.

void CDynProg::init_segment_loss ( struct segment_loss_struct loss,
int32_t  seqlen,
int32_t  howmuchlookback 
) [protected]

init segment loss

Parameters:
loss segment loss to init
seqlen length of sequence
howmuchlookback how far to look back

Definition at line 1825 of file DynProg.cpp.

void CDynProg::init_sign_words_array ( bool *  p_sign_words_array,
int32_t  num_elem 
)

init sign words array

Parameters:
p_sign_words_array new sign words array
num_elem number of array elements

Definition at line 692 of file DynProg.cpp.

void CDynProg::init_string_words_array ( int32_t *  p_string_words_array,
int32_t  num_elem 
)

init string words array

Parameters:
p_string_words_array new string words array
num_elem number of array elements

Definition at line 702 of file DynProg.cpp.

void CDynProg::init_svm_arrays ( int32_t  p_num_degrees,
int32_t  p_num_svms 
)

init SVM arrays

Parameters:
p_num_degrees number of degrees
p_num_svms number of SVMs

Definition at line 608 of file DynProg.cpp.

void CDynProg::init_svm_values ( struct svm_values_struct svs,
int32_t  start_pos,
int32_t  seqlen,
int32_t  howmuchlookback 
) [protected]

init SVM values

Parameters:
svs SVM values
start_pos start position
seqlen length of sequence
howmuchlookback how far to look back

Definition at line 2012 of file DynProg.cpp.

void CDynProg::init_tiling_data ( int32_t *  probe_pos,
float64_t intensities,
const int32_t  num_probes,
const int32_t  seq_len 
)

init CArray for precomputed tiling intensitie-plif-values with size seq_len x num_svms

Parameters:
probe_pos local positions of probes
intensities intensities of probes
num_probes number of probes
seq_len,: number of candidate positions

Definition at line 240 of file DynProg.cpp.

void CDynProg::init_word_degree_array ( int32_t *  p_word_degree_array,
int32_t  num_elem 
)

init word degree array

Parameters:
p_word_degree_array new word degree array
num_elem number of array elements

Definition at line 626 of file DynProg.cpp.

void CDynProg::lookup_content_svm_values ( const int32_t  from_state,
const int32_t  to_state,
const int32_t  from_pos,
const int32_t  to_pos,
float64_t svm_values,
int32_t  frame 
) [protected]

lookup content SVM values

Parameters:
from_state from state
to_state to state
from_pos from position
to_pos to position
svm_values SVM values
frame frame

Definition at line 1090 of file DynProg.h.

void CDynProg::lookup_tiling_plif_values ( const int32_t  from_state,
const int32_t  to_state,
const int32_t  len,
float64_t svm_values 
) [protected]

lookup tiling Plif values

Parameters:
from_state from state
to_state to state
len length
svm_values SVM values
void CDynProg::precompute_content_values ( uint16_t ***  wordstr,
const int32_t *  pos,
const int32_t  num_cand_pos,
const int32_t  genestr_len,
float64_t dictionary_weights,
int32_t  dict_len 
)

create array of precomputed content svm values Jonas

Parameters:
wordstr word strings
pos position
num_cand_pos number of cand position
genestr_len length of DNA-sequence
dictionary_weights SVM weight vectors for content prediction
dict_len number of weight vectors

Definition at line 416 of file DynProg.cpp.

void CDynProg::precompute_stop_codons ( const char *  genestr,
int32_t  genestr_len 
)

precompute stop codons

Parameters:
genestr gene string
genestr_len length of gene string

Definition at line 199 of file DynProg.cpp.

void CDynProg::precompute_tiling_plifs ( CPlif **  PEN,
const int32_t *  tiling_plif_ids,
const int32_t  num_tiling_plifs,
const int32_t  seq_len,
const int32_t *  pos 
)

precompute tiling Plifs

Parameters:
PEN Plif PEN
tiling_plif_ids tiling plif id's
num_tiling_plifs number of tiling plifs
seq_len sequence length
pos pos

Definition at line 307 of file DynProg.cpp.

int32_t CDynProg::raw_intensities_interval_query ( const int32_t  from_pos,
const int32_t  to_pos,
float64_t intensities,
int32_t  type 
) [protected]

raw intensities interval query

Parameters:
from_pos from position
to_pos to position
intensities intensities
type type
Returns:
an integer

Definition at line 1065 of file DynProg.h.

void CDynProg::reset_segment_sum_value ( int32_t  num_states,
int32_t  pos,
int32_t &  last_segment_sum_pos,
float64_t segment_sum_value 
) [protected]

reset segment sum value

Parameters:
num_states number of states
pos position
last_segment_sum_pos last segment sum position
segment_sum_value value to set

Definition at line 1489 of file DynProg.cpp.

void CDynProg::reset_svm_value ( int32_t  pos,
int32_t &  last_svm_pos,
float64_t svm_value 
) [protected]

reset SVM value

Parameters:
pos position
last_svm_pos last SVM position
svm_value value to set

Definition at line 1440 of file DynProg.cpp.

void CDynProg::resize_lin_feat ( int32_t  num_new_feat,
int32_t  seq_len 
)

append rows to linear features array

Parameters:
num_new_feat number of new rows to add
seq_len number of columns == number of candidate positions (must be equal to the existing num of cols)

Definition at line 275 of file DynProg.cpp.

void CDynProg::set_a ( T_STATES  line_,
T_STATES  column,
float64_t  value 
)

access function for matrix a

Parameters:
line_ row in matrix 0...N-1
column column in matrix 0...N-1
value value to be set

Definition at line 541 of file DynProg.h.

void CDynProg::set_a ( float64_t a,
int32_t  M,
int32_t  N 
)

set matrix a

Parameters:
a new matrix a
M dimension M of matrix a
N dimension N of matrix a

Definition at line 493 of file DynProg.cpp.

void CDynProg::set_a_id ( int32_t *  a,
int32_t  M,
int32_t  N 
)

set a id

Parameters:
a new a id (identity?)
M dimension M of matrix a
N dimension N of matrix a

Definition at line 501 of file DynProg.cpp.

void CDynProg::set_a_trans_matrix ( float64_t a_trans,
int32_t  num_trans,
int32_t  N 
)

set a transition matrix

Parameters:
a_trans transition matrix a
num_trans number of transitions
N dimension N of matrix a

Definition at line 512 of file DynProg.cpp.

void CDynProg::set_genestr_len ( int32_t  genestr_len  ) 

set genestr len

Parameters:
genestr_len length of gene string

Definition at line 189 of file DynProg.cpp.

void CDynProg::set_lin_feat ( float64_t p_lin_feat,
int32_t  p_num_svms,
int32_t  p_seq_len 
)

return array of precomputed linear features like content predictions and PLiFed tiling array data Jonas

Returns:
lin_feat_array

Definition at line 618 of file DynProg.h.

void CDynProg::set_num_states ( int32_t  p_N  ) 

set number of states use this to set N first

Parameters:
p_N new N

Definition at line 218 of file DynProg.cpp.

void CDynProg::set_p ( T_STATES  offset,
float64_t  value 
)

access function for probability of first state

Parameters:
offset index 0...N-1
value value to be set

Definition at line 530 of file DynProg.h.

void CDynProg::set_p_vector ( float64_t p,
int32_t  N 
)

set vector p

Parameters:
p new vector p
N size of vector p

Definition at line 476 of file DynProg.cpp.

void CDynProg::set_q ( T_STATES  offset,
float64_t  value 
)

access function for probability of end states

Parameters:
offset index 0...N-1
value value to be set

Definition at line 521 of file DynProg.h.

void CDynProg::set_q_vector ( float64_t q,
int32_t  N 
)

set vector q

Parameters:
q new vector q
N size of vector q

Definition at line 486 of file DynProg.cpp.

void CDynProg::translate_from_single_order ( uint16_t *  obs,
int32_t  sequence_length,
int32_t  start,
int32_t  order,
int32_t  max_val = 2 
) [protected]

translate from single order

Parameters:
obs observation matrix
sequence_length length of sequence
start start
order order
max_val maximum number of bits, e.g. 2 for DNA

Definition at line 1407 of file DynProg.cpp.

void CDynProg::update_svm_values_till_pos ( uint16_t ***  wordstr,
const int32_t *  pos,
int32_t  t_end,
int32_t  prev_t_end,
struct svm_values_struct svs 
) [protected]

update SVM values till position

Parameters:
wordstr word string
pos position
t_end t end
prev_t_end previous t end
svs SVM values

Member Data Documentation

CArray<int32_t> CDynProg::cum_num_words [protected]

cum num words

Definition at line 940 of file DynProg.h.

int32_t* CDynProg::cum_num_words_array [protected]

cum num words array

Definition at line 942 of file DynProg.h.

int32_t CDynProg::cum_num_words_single [protected]

cum num words single

Definition at line 975 of file DynProg.h.

dict weights

Definition at line 926 of file DynProg.h.

dict weights array

Definition at line 928 of file DynProg.h.

distribution of end-states

Definition at line 920 of file DynProg.h.

Definition at line 921 of file DynProg.h.

initial distribution of states

Definition at line 916 of file DynProg.h.

Definition at line 917 of file DynProg.h.

int32_t CDynProg::m_call [protected]

m call

Definition at line 993 of file DynProg.h.

m dict weights

Definition at line 1013 of file DynProg.h.

CArray2<char> CDynProg::m_genestr [protected]

m genestr

Definition at line 1011 of file DynProg.h.

int32_t CDynProg::m_genestr_len [protected]

length of gene string

Definition at line 1062 of file DynProg.h.

CArray<bool> CDynProg::m_genestr_stop [protected]

storeage of stop codons array of size length(sequence)

Definition at line 1040 of file DynProg.h.

array for storage of precomputed linear features linge content svm values or pliffed tiling data Jonas

Definition at line 1046 of file DynProg.h.

m my losses

Definition at line 1027 of file DynProg.h.

CArray<int32_t> CDynProg::m_my_pos_seq [protected]

m my position sequence

Definition at line 1023 of file DynProg.h.

m my scores

Definition at line 1025 of file DynProg.h.

CArray<int32_t> CDynProg::m_my_state_seq [protected]

m my state seq

Definition at line 1021 of file DynProg.h.

int32_t* CDynProg::m_num_lin_feat_plifs_cum [protected]

num lin feat plifs cum

Definition at line 1058 of file DynProg.h.

int32_t* CDynProg::m_num_probes_cum [protected]

number of probes

Definition at line 1056 of file DynProg.h.

int32_t CDynProg::m_num_raw_data [protected]

number of additional data tracks like tiling, RNA-Seq, ...

Definition at line 1060 of file DynProg.h.

CArray2<int32_t> CDynProg::m_orf_info [protected]

m orf info

Definition at line 1001 of file DynProg.h.

m PEN

Definition at line 1007 of file DynProg.h.

m PEN state signals

Definition at line 1009 of file DynProg.h.

m Plif list

Definition at line 1005 of file DynProg.h.

CArray<int32_t> CDynProg::m_pos [protected]

m position

Definition at line 999 of file DynProg.h.

CArray2<int32_t> CDynProg::m_positions [protected]

m positions

Definition at line 1035 of file DynProg.h.

int32_t* CDynProg::m_probe_pos [protected]

probe position

Definition at line 1054 of file DynProg.h.

number of linear features raw intensities

Definition at line 1052 of file DynProg.h.

m scores

Definition at line 1031 of file DynProg.h.

CArray<int32_t> CDynProg::m_segment_ids [protected]

m segment IDs

Definition at line 1017 of file DynProg.h.

m segment loss

Definition at line 1015 of file DynProg.h.

m segment mask

Definition at line 1019 of file DynProg.h.

m segment sum weights

Definition at line 1003 of file DynProg.h.

m sequence

Definition at line 997 of file DynProg.h.

CArray2<int32_t> CDynProg::m_states [protected]

m states

Definition at line 1033 of file DynProg.h.

int32_t CDynProg::m_step [protected]

m step

Definition at line 991 of file DynProg.h.

int32_t CDynProg::max_a_id [protected]

max a id

Definition at line 987 of file DynProg.h.

CArray2<int32_t> CDynProg::mod_words [protected]

mod words

Definition at line 948 of file DynProg.h.

int32_t* CDynProg::mod_words_array [protected]

mod words array

Definition at line 950 of file DynProg.h.

int32_t CDynProg::N [protected]

number of states

Definition at line 908 of file DynProg.h.

int32_t CDynProg::num_degrees [protected]

number of degress

Definition at line 931 of file DynProg.h.

int32_t CDynProg::num_strings [protected]

number of strings

Definition at line 935 of file DynProg.h.

int32_t CDynProg::num_svms [protected]

number of SVMs

Definition at line 933 of file DynProg.h.

int32_t CDynProg::num_svms_single [protected]

number of SVMs single

Definition at line 971 of file DynProg.h.

CArray<int32_t> CDynProg::num_unique_words [protected]

number of unique words

Definition at line 966 of file DynProg.h.

int32_t CDynProg::num_unique_words_single [protected]

number of unique words single

Definition at line 984 of file DynProg.h.

CArray<int32_t> CDynProg::num_words [protected]

num words

Definition at line 944 of file DynProg.h.

int32_t* CDynProg::num_words_array [protected]

num words array

Definition at line 946 of file DynProg.h.

int32_t CDynProg::num_words_single [protected]

num words single

Definition at line 977 of file DynProg.h.

CArray<bool> CDynProg::sign_words [protected]

sign words

Definition at line 952 of file DynProg.h.

bool* CDynProg::sign_words_array [protected]

sign words array

Definition at line 954 of file DynProg.h.

CArray<int32_t> CDynProg::string_words [protected]

string words

Definition at line 956 of file DynProg.h.

int32_t* CDynProg::string_words_array [protected]

string words array

Definition at line 958 of file DynProg.h.

bool CDynProg::svm_arrays_clean [protected]

SVM arrays clean

Definition at line 968 of file DynProg.h.

CArray<int32_t> CDynProg::svm_pos_start [protected]

SVM start position

Definition at line 964 of file DynProg.h.

SVM value unnormalised single

Definition at line 982 of file DynProg.h.

Definition at line 912 of file DynProg.h.

Definition at line 913 of file DynProg.h.

transition matrix

Definition at line 911 of file DynProg.h.

CArray<int32_t> CDynProg::word_degree [protected]

word degree

Definition at line 938 of file DynProg.h.

int32_t CDynProg::word_degree_single [protected]

word degree single

Definition at line 973 of file DynProg.h.

word used single

Definition at line 980 of file DynProg.h.


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

SHOGUN Machine Learning Toolbox - Documentation