deps/kb_meme/meme-5.0.1/src/momo-modl.c
/**
 * Computes the number of bits (description length) to encode the given motifs and peptides.
 */
Computes the number of bits (description length) to encode the given motifs and peptides.
Computes the number of bits ( description length ) to encode the given motifs and peptides .
double compute_MDL(ARRAYLST_T* regexmotifs,
                   MATRIX_T* bg_freqs,
                   int max_motifs,
                   MOMO_OPTIONS_T* options,
                   SUMMARY_T* summary,
                   MOD_INFO_T* mod_info) {
  int i;
  double log2k = 7.0; 
  double motifs_dl = 0.0;
  for (i = 0; i < arraylst_size(regexmotifs); ++i) {
    motifs_dl += compute_regexmotif_numbits(arraylst_get(i, regexmotifs), options, summary);
  }
  double peptides_dl = compute_peptides_dl(regexmotifs, bg_freqs, max_motifs, options, summary, mod_info);
  return log2k + motifs_dl + peptides_dl;
}
double compute_MDL ( ARRAYLST_T * regexmotifs , MATRIX_T * bg_freqs , int max_motifs , MOMO_OPTIONS_T * options , SUMMARY_T * summary , MOD_INFO_T * mod_info ) { int i ; double log2k = 7.0 ; double motifs_dl = 0.0 ; for ( i = 0 ; i < arraylst_size ( regexmotifs ) ; ++ i ) { motifs_dl += compute_regexmotif_numbits ( arraylst_get ( i , regexmotifs ) , options , summary ) ; } double peptides_dl = compute_peptides_dl ( regexmotifs , bg_freqs , max_motifs , options , summary , mod_info ) ; return log2k + motifs_dl + peptides_dl ; }
Computes the number of bits (description length) to encode the given motifs and peptides.
Computes the number of bits ( description length ) to encode the given motifs and peptides .
// ceil log2(100) where k always = 100 for in MoDL implementation for some reason ?