deps/kb_meme/meme-5.0.1/src/motif-in.c
/*
 * Set the background to be used for pseudocounts.
 *
 * This cancels a conversion alphabet.
 */
Set the background to be used for pseudocounts.
This cancels a conversion alphabet.
Set the background to be used for pseudocounts . This cancels a conversion alphabet .
void mread_set_background(MREAD_T *mread, const ARRAY_T *bg, ALPH_T *alph) {
  if (mread->other_bg != NULL) free_array(mread->other_bg);
  mread->other_bg = NULL;
  if (mread->other_bg_src != NULL) free(mread->other_bg_src);
  mread->other_bg_src = NULL;
  if (mread->conv_alph != NULL) alph_release(mread->conv_alph);
  mread->conv_alph = NULL;
  if (bg != NULL) {
    mread->other_bg = allocate_array(get_array_length(bg));
    copy_array(bg, mread->other_bg);
  }
  if (mread->success) set_pseudo_bg(mread, alph);
}
void mread_set_background ( MREAD_T * mread , const ARRAY_T * bg , ALPH_T * alph ) { if ( mread -> other_bg != NULL ) free_array ( mread -> other_bg ) ; mread -> other_bg = NULL ; if ( mread -> other_bg_src != NULL ) free ( mread -> other_bg_src ) ; mread -> other_bg_src = NULL ; if ( mread -> conv_alph != NULL ) alph_release ( mread -> conv_alph ) ; mread -> conv_alph = NULL ; if ( bg != NULL ) { mread -> other_bg = allocate_array ( get_array_length ( bg ) ) ; copy_array ( bg , mread -> other_bg ) ; } if ( mread -> success ) set_pseudo_bg ( mread , alph ) ; }
Set the background to be used for pseudocounts.
Set the background to be used for pseudocounts .
// clean up old bg // clean up conversion alphabet // copy the passed background // check if we've chosen a parser already