\n"; echo "

Supermotif [graphic]", substr($s,11), "

"; } function f_prnOut( $s1, $s2, $i, $pref, $SEQ_REF1, $SEQ_REF2 ) { global $OUTPUT; $parts = split( "[ ]+", $s1, 2 ); echo( "" ); //echo( "

" . $s1 . "

" ); echo( "

" ); echo( $parts[0] . "" . $parts[1] . "

" ); echo( "

" ); if( f_afind( $OUTPUT, "GRALI" ) > -1 ) echo( "[graphic] " ); else echo( "[annotation]"); echo( $s2 . "

" ); } function f_briOut( $s1, $i, $pref, $SEQ_REF1, $SEQ_REF2 ) { global $OUTPUT; $parts = split( "[ |]+", $s1, 3 ); echo( "" ); //echo( "

" . $s1 . "

" ); echo( $parts[0] . "| " ); echo( "" ); echo( $parts[1] . "" . "| " .$parts[2] ); //. "
" ); if( $i % 10 == 0 ) { if( f_afind( $OUTPUT, "GRALI" ) > -1 ) echo( "

" . "[graphic] " . "

" ); else echo( "

" . "[annotation]" . "

" ); } } /** //$F_MOT = "e:\vnickolaev\annot\\" . "44\\" . "44.mot"; if( $Linux ) { $F_PRN = $res_file.".prn"; // ************ Linux } **/ $fmot = fopen( $F_PRN, "r" ); $i = 1; //+$section = "BRIEF"; //+include "annmline.h"; echo "

Brief Descriptions of Alignments

"; echo "

";


 while( $buf = fgets( $fmot, 256 ) )    {
    if( ereg("Brief", $buf ) ) break;
 }
 while( $buf = fgets( $fmot, 256 ) )    {
    if( (strlen( $buf ) > 2) && (substr($buf,0,1) != " " ) ) break;
 }
 
 do {
   //echo( $buf );
   f_briOut( $buf, $i++, "b" , $SEQ_REF1, $SEQ_REF2 );  //echo $bufs;
   
 } while( ($buf = fgets( $fmot, 256 )) 
           && (strlen( $buf ) > 2) && (substr($buf,0,1) != " " ) );

 echo "
"; $tail = " (first " . $MN_PRINT . ")"; if( $i <= ( $MN_PRINT + 1 ) ) $tail = ""; $i = 1; $section = "SMOT"; include "annmline.h"; echo( "

Supermotifs" . $tail . "

" ); echo "

";
 /**        for *.mot                 // Actualy *.prn is needed
 while( $buf = fgets( $fmot, 128 ) )    {
    if( substr( $buf, 0,5 ) == "Super" ) {
      f_smOut( $buf, $i++, "a" );  //echo $buf;
      break;
    }
 }
 while( $buf = fgets( $fmot, 128 ) )    {
    if( substr( $buf, 0,5 ) == "Super" ) {
      f_smOut( $buf, $i++, "a" );  //echo $buf;
    } else {
      echo $buf;
    }
 }
 /**/


 // Really *.prn
 while( $buf = fgets( $fmot, 128 ) )    {
    if( ereg("Supermotifs", $buf ) ) break;
 }
 while( $buf = fgets( $fmot, 128 ) )    {
    if( (strlen( $buf ) > 2) && (substr($buf,0,1) != " " ) ) break;
 }
 
 do {
     $buf2 = fgets( $fmot, 128 );
     f_prnOut( $buf, $buf2, $i++, "a" , $SEQ_REF1, $SEQ_REF2 );  //echo $bufs;

     while( $buf = fgets( $fmot, 128 ) )    {
        if( (strlen( $buf ) > 2) && (substr($buf,0,1) != " " ) ) break;
        echo( $buf );
     }

 } while( $buf && $i <= $MN_PRINT );                    // *** 18.01.01

 fclose( $fmot );
 echo "
"; ?>