hmmer-3.3/easel/esl_msafile_stockholm.c
/* Function:  esl_msafile_stockholm_Write()
 * Synopsis:  Write a Stockholm format alignment to a stream.
 *
 * Purpose:   Write alignment <msa> to output stream <fp>, in Stockholm
 *            format. <fmt> may either be <eslMSAFILE_STOCKHOLM> or
 *            <eslMSAFILE_PFAM>.  <eslMSAFILE_PFAM> puts the alignment
 *            into a single block, one alignment line per sequence.
 *            <eslMSAFILE_STOCKHOLM> is a multiple block format, with
 *            a width of 200 aligned residues per line.
 *
 * Args:      fp  - open output stream, writable
 *            msa - alignment to write
 *            fmt - eslMSAFILE_STOCKHOLM | eslMSAFILE_PFAM
 *
 * Returns:   <eslOK> on success.
 *
 * Throws:    <eslEMEM> on allocation error.
 *            <eslEWRITE> on any system write error, such as filled disk.
 */
esl_msafile_stockholm_Write()
Synopsis:  Write a Stockholm format alignment to a stream.

Write alignment  to output stream , in Stockholm
format.  may either be  or
.  puts the alignment
into a single block, one alignment line per sequence.
 is a multiple block format, with
a width of 200 aligned residues per line.

fp  - open output stream, writable
msa - alignment to write
fmt - eslMSAFILE_STOCKHOLM | eslMSAFILE_PFAM

 on success.

 on allocation error.
 on any system write error, such as filled disk.
esl_msafile_stockholm_Write () Synopsis : Write a Stockholm format alignment to a stream . Write alignment to output stream in Stockholm format . may either be or . puts the alignment into a single block one alignment line per sequence . is a multiple block format with a width of 200 aligned residues per line . fp - open output stream writable msa - alignment to write fmt - eslMSAFILE_STOCKHOLM | eslMSAFILE_PFAM on success . on allocation error . on any system write error such as filled disk .
int
esl_msafile_stockholm_Write(FILE *fp, const ESL_MSA *msa, int fmt)
{
  switch (fmt) {
  case eslMSAFILE_PFAM:       return stockholm_write(fp, msa, msa->alen);
  case eslMSAFILE_STOCKHOLM:  return stockholm_write(fp, msa, 200);
  }
  return eslEINCONCEIVABLE;
}
int esl_msafile_stockholm_Write ( FILE * fp , const ESL_MSA * msa , int fmt ) { switch ( fmt ) { case eslMSAFILE_PFAM : return stockholm_write ( fp , msa , msa -> alen ) ; case eslMSAFILE_STOCKHOLM : return stockholm_write ( fp , msa , 200 ) ; } return eslEINCONCEIVABLE ; }
Function:  esl_msafile_stockholm_Write()
 Synopsis:  Write a Stockholm format alignment to a stream.
Function : esl_msafile_stockholm_Write () Synopsis : Write a Stockholm format alignment to a stream .