deps/kb_meme/meme-5.0.1/src/beadstring.c
/***********************************************************************
 * Print beadstring specific information to an XML file
 ***********************************************************************/
Print beadstring specific information to an XML file
Print beadstring specific information to an XML file
static  void print_settings_xml(
  FILE *out,
  OPTIONS_T *options
) {
  fputs("<settings>\n",  out);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "output directory", options->output_dirname);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "MEME file name", options->meme_filename);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "background file name", options->bg_filename);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "score file name", options->score_filename);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "sequence file name", options->seq_filename);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "model file name", options->model_filename);
  fprintf(out, "<setting name=\"%s\">%s</setting>\n", "order string", options->order_string);
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "allow weak motifs",
    boolean_to_string(options->allow_weak_motifs)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "allow clobber",
    boolean_to_string(options->allow_clobber)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "fim",
    boolean_to_string(options->fim)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "local scoring",
    boolean_to_string(options->local_scoring)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "motif scoring",
    boolean_to_string(options->motif_scoring)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "synth",
    boolean_to_string(options->synth)
  );
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "zselo",
    boolean_to_string(options->zselo)
  );
  fprintf(out, "<setting name=\"%s\">%d</setting>\n", "max_seq", options->max_seq);
  fprintf(out, "<setting name=\"%s\">%d</setting>\n", "pam_distance", options->pam_distance);
  fprintf(out, "<setting name=\"%s\">%d</setting>\n", "paths", options->paths);
  fprintf(out, "<setting name=\"%s\">%d</setting>\n", "spacer_states", options->spacer_states);
  fprintf(out, "<setting name=\"%s\">%3.1g</setting>\n", "gap extend", options->gap_extend);
  fprintf(out, "<setting name=\"%s\">%3.1g</setting>\n", "gap open", options->gap_open);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "e-threshold", options->e_threshold);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "p-threshold", options->p_threshold);
  fprintf(
    out,
    "<setting name=\"%s\">%s</setting>\n",
    "perform search",
    boolean_to_string(options->perform_search)
  );
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "progress", options->progress);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "motif e-threshold", options->motif_e_threshold);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "motif p-threshold", options->motif_p_threshold);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "motif pseudocount", options->motif_pseudo);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "spacer pseudocount", options->spacer_pseudo);
  fprintf(out, "<setting name=\"%s\">%3.2g</setting>\n", "transition pseudocount", options->trans_pseudo);
  fprintf(out, "<setting name=\"%s\">%d</setting>\n", "verbosity", verbosity);
  RBNODE_T *node;
  for(node = rbtree_first(options->request_nums); node != NULL; node = rbtree_next(node)) {
    int motif_num;
    int strands;
    motif_num = *((int*)rbtree_key(node));
    strands = *((int*)rbtree_value(node));
    if (strands & MOTIF_PLUS) {
      fprintf(out, "<setting name=\"%s\">+%d</setting>\n", "requested motif", motif_num);
    }
    if (strands & MOTIF_MINUS) {
      fprintf(out, "<setting name=\"%s\">-%d</setting>\n", "requested motif", motif_num);
    }
  }
  fputs("</settings>\n",  out);
}
static void print_settings_xml ( FILE * out , OPTIONS_T * options ) { fputs ( " \n " , out ) ; fprintf ( out , " \" \" \n " , " " , options -> output_dirname ) ; fprintf ( out , " \" \" \n " , " " , options -> meme_filename ) ; fprintf ( out , " \" \" \n " , " " , options -> bg_filename ) ; fprintf ( out , " \" \" \n " , " " , options -> score_filename ) ; fprintf ( out , " \" \" \n " , " " , options -> seq_filename ) ; fprintf ( out , " \" \" \n " , " " , options -> model_filename ) ; fprintf ( out , " \" \" \n " , " " , options -> order_string ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> allow_weak_motifs ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> allow_clobber ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> fim ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> local_scoring ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> motif_scoring ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> synth ) ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> zselo ) ) ; fprintf ( out , " \" \" \n " , " " , options -> max_seq ) ; fprintf ( out , " \" \" \n " , " " , options -> pam_distance ) ; fprintf ( out , " \" \" \n " , " " , options -> paths ) ; fprintf ( out , " \" \" \n " , " " , options -> spacer_states ) ; fprintf ( out , " \" \" \n " , " " , options -> gap_extend ) ; fprintf ( out , " \" \" \n " , " " , options -> gap_open ) ; fprintf ( out , " \" \" \n " , " " , options -> e_threshold ) ; fprintf ( out , " \" \" \n " , " " , options -> p_threshold ) ; fprintf ( out , " \" \" \n " , " " , boolean_to_string ( options -> perform_search ) ) ; fprintf ( out , " \" \" \n " , " " , options -> progress ) ; fprintf ( out , " \" \" \n " , " " , options -> motif_e_threshold ) ; fprintf ( out , " \" \" \n " , " " , options -> motif_p_threshold ) ; fprintf ( out , " \" \" \n " , " " , options -> motif_pseudo ) ; fprintf ( out , " \" \" \n " , " " , options -> spacer_pseudo ) ; fprintf ( out , " \" \" \n " , " " , options -> trans_pseudo ) ; fprintf ( out , " \" \" \n " , " " , verbosity ) ; RBNODE_T * node ; for ( node = rbtree_first ( options -> request_nums ) ; node != NULL ; node = rbtree_next ( node ) ) { int motif_num ; int strands ; motif_num = * ( ( int * ) rbtree_key ( node ) ) ; strands = * ( ( int * ) rbtree_value ( node ) ) ; if ( strands & MOTIF_PLUS ) { fprintf ( out , " \" \" \n " , " " , motif_num ) ; } if ( strands & MOTIF_MINUS ) { fprintf ( out , " \" \" \n " , " " , motif_num ) ; } } fputs ( " \n " , out ) ; }
Print beadstring specific information to an XML file
Print beadstring specific information to an XML file