deps/kb_meme/meme-5.0.1/src/display.c
/**********************************************************************
  print_meme_psfm_xml

  Print XML elements describing the frequency matrix. See DTD embeded in
  print_meme_header_xml for the description of model XML syntax.
**********************************************************************/
print_meme_psfm_xml
Print XML elements describing the frequency matrix. See DTD embeded in
print_meme_header_xml for the description of model XML syntax.
print_meme_psfm_xml Print XML elements describing the frequency matrix . See DTD embeded in print_meme_header_xml for the description of model XML syntax .
static void print_meme_psfm_xml(
  THETA theta,  
  ALPH_T *alph, 
  int width,    
  FILE* outfile 
) {
  int i = 0;
  int j = 0;
  STR_T *b;
  b = str_create(3);
  fprintf(outfile, "<probabilities>\n<alphabet_matrix>\n");
  for (i=0; i < width; i++) { 
    fprintf(outfile, "<alphabet_array>\n");
    for (j=0; j < alph_size_core(alph); j++) { 
      fprintf(
        outfile,
        "<value letter_id=\"%s\">%f</value>\n",
        alph_xml_id(alph, j, b),
        theta(i, j)
      );
    }
    fprintf(outfile, "</alphabet_array>\n");
  }
  fprintf(outfile, "</alphabet_matrix>\n</probabilities>\n");
  str_destroy(b, false);
}
static void print_meme_psfm_xml ( THETA theta , ALPH_T * alph , int width , FILE * outfile ) { int i = 0 ; int j = 0 ; STR_T * b ; b = str_create ( 3 ) ; fprintf ( outfile , " \n \n " ) ; for ( i = 0 ; i < width ; i ++ ) { fprintf ( outfile , " \n " ) ; for ( j = 0 ; j < alph_size_core ( alph ) ; j ++ ) { fprintf ( outfile , " \" \" \n " , alph_xml_id ( alph , j , b ) , theta ( i , j ) ) ; } fprintf ( outfile , " \n " ) ; } fprintf ( outfile , " \n \n " ) ; str_destroy ( b , false ) ; }
print_meme_psfm_xml
Print XML elements describing the frequency matrix.
print_meme_psfm_xml Print XML elements describing the frequency matrix .
// pointer to matrix of frequencies  // alphabet // width of the motif  // pointer to output file  // site position  // letter 