deps/kb_meme/meme-5.0.1/src/spamo.c
/**************************************************************************
 * Loads the primary motif using the information specified in the options
 * and the pre-calculated background or from the options->bg_filename file.
 **************************************************************************/
Loads the primary motif using the information specified in the options
and the pre-calculated background or from the options->bg_filename file.
Loads the primary motif using the information specified in the options and the pre - calculated background or from the options - > bg_filename file .
static MOTIF_DB_T *load_primary_motif(
  SPAMO_OPTIONS_T *options, 
  ALPH_T *alph,
  ARRAY_T **background, 
  MOTIF_T **primary_motif, 
  bool *stdin_used
) {
  if (options->primary_name && rbtree_size(options->primary_name) > 0) {
    RBNODE_T *node = rbtree_first(options->primary_name);
    DEBUG_FMT(NORMAL_VERBOSE, "Loading Primary Motif (name=%s)\n", (char *)rbtree_value(node));
  } else if (options->primary_index && rbtree_size(options->primary_index) > 0) {
    RBNODE_T *node = rbtree_first(options->primary_index);
    DEBUG_FMT(NORMAL_VERBOSE, "Loading Primary Motif (index=%d)\n", *((int *)rbtree_value(node))+1);
  } else {
    DEBUG_MSG(NORMAL_VERBOSE, "Loading Primary Motif\n");
  }
  MOTIF_DB_T *primary_db = read_motifs_and_background(
    0,				
    options->primary_file,	
    "Primary motif",		
    options->primary_name,	
    options->primary_index,	
    NULL,			
    NULL,			
    true,			
    false,			
    options->pseudocount,	
    true,			
    options->trim_bit_threshold,
    &(options->bg_filename),	
    true, 			
    background,			
    options->sequences_file,	
    alph,			
    false,			
    false,			
    true,			
    false,			
    stdin_used			
  );
  *primary_motif = (MOTIF_T *)arraylst_get(0, primary_db->motifs);
  assert(*primary_motif);
  return(primary_db);
}
static MOTIF_DB_T * load_primary_motif ( SPAMO_OPTIONS_T * options , ALPH_T * alph , ARRAY_T * * background , MOTIF_T * * primary_motif , bool * stdin_used ) { if ( options -> primary_name && rbtree_size ( options -> primary_name ) > 0 ) { RBNODE_T * node = rbtree_first ( options -> primary_name ) ; DEBUG_FMT ( NORMAL_VERBOSE , " \n " , ( char * ) rbtree_value ( node ) ) ; } else if ( options -> primary_index && rbtree_size ( options -> primary_index ) > 0 ) { RBNODE_T * node = rbtree_first ( options -> primary_index ) ; DEBUG_FMT ( NORMAL_VERBOSE , " \n " , * ( ( int * ) rbtree_value ( node ) ) + 1 ) ; } else { DEBUG_MSG ( NORMAL_VERBOSE , " \n " ) ; } MOTIF_DB_T * primary_db = read_motifs_and_background ( 0 , options -> primary_file , " " , options -> primary_name , options -> primary_index , NULL , NULL , true , false , options -> pseudocount , true , options -> trim_bit_threshold , & ( options -> bg_filename ) , true , background , options -> sequences_file , alph , false , false , true , false , stdin_used ) ; * primary_motif = ( MOTIF_T * ) arraylst_get ( 0 , primary_db -> motifs ) ; assert ( * primary_motif ) ; return ( primary_db ) ; }
Loads the primary motif using the information specified in the options
 and the pre-calculated background or from the options->bg_filename file.
Loads the primary motif using the information specified in the options and the pre - calculated background or from the options - > bg_filename file .
// Load the primary motif and the background. // index to give DB // motif file name (or special word) // type of database for error messages // get one motif by name // get one motif by index // get set of motifs by name // exclude set of motifs by name // allow motifs with zero probability entries // create RC copies, appended // multiply times background model // set_trim // trim_bit_threshold // background source; may be changed // make bg symmetrical if alph complementable // will be set if id==0 // sequence file name // primary motif alphabet // set motif conversion alphabet // don't remove extension from name // remove ".meme" extension from name // don't replace underscores in name // IN/OUT check or set if path is "-" // Get the primary motif from the database.