hmmer-3.3/easel/miniapps/esl-alimerge.c
/* write_pfam_msa_gc
 *                   
 * Highly specialized function for printing out the GC annotation to a
 * Pfam Stockholm alignment file (1 line/seq). This function is
 * necessary when printing the merged alignment file in small memory
 * mode (when --small enabled). <msa> is an alignment with no sequence
 * information (no aseq, ax, GS, nor GR data).
 */


Highly specialized function for printing out the GC annotation to a
Pfam Stockholm alignment file (1 line/seq). This function is
necessary when printing the merged alignment file in small memory
mode (when --small enabled).  is an alignment with no sequence
information (no aseq, ax, GS, nor GR data).
Highly specialized function for printing out the GC annotation to a Pfam Stockholm alignment file ( 1 line / seq ) . This function is necessary when printing the merged alignment file in small memory mode ( when -- small enabled ) . is an alignment with no sequence information ( no aseq ax GS nor GR data ) .
void
write_pfam_msa_gc(FILE *fp, ESL_MSA *msa, int margin)
{
  int i;
  if (msa->ss_cons != NULL) { fprintf(fp, "#=GC %-*s %s\n", margin-6, "SS_cons", msa->ss_cons); }
  if (msa->sa_cons != NULL) { fprintf(fp, "#=GC %-*s %s\n", margin-6, "SA_cons", msa->sa_cons); }
  if (msa->pp_cons != NULL) { fprintf(fp, "#=GC %-*s %s\n", margin-6, "PP_cons", msa->pp_cons); }
  if (msa->rf != NULL)      { fprintf(fp, "#=GC %-*s %s\n", margin-6, "RF", msa->rf); }
  for (i = 0; i < msa->ngc; i++) { fprintf(fp, "#=GC %-*s %s\n", margin-6, msa->gc_tag[i], msa->gc[i]); }
  fprintf(fp, "//\n");
}
void write_pfam_msa_gc ( FILE * fp , ESL_MSA * msa , int margin ) { int i ; if ( msa -> ss_cons != NULL ) { fprintf ( fp , " \n " , margin - 6 , " " , msa -> ss_cons ) ; } if ( msa -> sa_cons != NULL ) { fprintf ( fp , " \n " , margin - 6 , " " , msa -> sa_cons ) ; } if ( msa -> pp_cons != NULL ) { fprintf ( fp , " \n " , margin - 6 , " " , msa -> pp_cons ) ; } if ( msa -> rf != NULL ) { fprintf ( fp , " \n " , margin - 6 , " " , msa -> rf ) ; } for ( i = 0 ; i < msa -> ngc ; i ++ ) { fprintf ( fp , " \n " , margin - 6 , msa -> gc_tag [ i ] , msa -> gc [ i ] ) ; } fprintf ( fp , " \n " ) ; }
write_pfam_msa_gc
write_pfam_msa_gc