hmmer-3.3/easel/esl_msafile_stockholm.c
/* Function:  esl_msafile_stockholm_SetInmap()
 * Synopsis:  Configure the input map for Stockholm format.
 *
 * Purpose:   Configure <afp->inmap> for Stockholm format.
 *
 *            Text mode accepts any <isgraph()> character. 
 *            Digital mode enforces the usual Easel alphabets.
 *            
 *            No characters may be ignored in the input. We cannot
 *            skip whitespace in the inmap, because we'd misalign
 *            relative to the text-mode annotation lines (GR, GC),
 *            where we don't do mapped input.)
 */
esl_msafile_stockholm_SetInmap()
Synopsis:  Configure the input map for Stockholm format.

Configure inmap> for Stockholm format.

Text mode accepts any  character.
Digital mode enforces the usual Easel alphabets.

No characters may be ignored in the input. We cannot
skip whitespace in the inmap, because we'd misalign
relative to the text-mode annotation lines (GR, GC),
where we don't do mapped input.)
esl_msafile_stockholm_SetInmap () Synopsis : Configure the input map for Stockholm format . Configure inmap > for Stockholm format . Text mode accepts any character . Digital mode enforces the usual Easel alphabets . No characters may be ignored in the input . We cannot skip whitespace in the inmap because we ' d misalign relative to the text - mode annotation lines ( GR GC ) where we don ' t do mapped input . )
int
esl_msafile_stockholm_SetInmap(ESL_MSAFILE *afp)
{
  int sym;
  if (afp->abc)
    {
      for (sym = 0; sym < 128; sym++) 
	afp->inmap[sym] = afp->abc->inmap[sym];
      afp->inmap[0] = esl_abc_XGetUnknown(afp->abc);
    }
  if (! afp->abc)
    {
      for (sym = 1; sym < 128; sym++) 
	afp->inmap[sym] = (isgraph(sym) ? sym : eslDSQ_ILLEGAL);
      afp->inmap[0] = '?';
    }
  return eslOK;
}
int esl_msafile_stockholm_SetInmap ( ESL_MSAFILE * afp ) { int sym ; if ( afp -> abc ) { for ( sym = 0 ; sym < 128 ; sym ++ ) afp -> inmap [ sym ] = afp -> abc -> inmap [ sym ] ; afp -> inmap [ 0 ] = esl_abc_XGetUnknown ( afp -> abc ) ; } if ( ! afp -> abc ) { for ( sym = 1 ; sym < 128 ; sym ++ ) afp -> inmap [ sym ] = ( isgraph ( sym ) ? sym : eslDSQ_ILLEGAL ) ; afp -> inmap [ 0 ] = ' ' ; } return eslOK ; }
Function:  esl_msafile_stockholm_SetInmap()
 Synopsis:  Configure the input map for Stockholm format.
Function : esl_msafile_stockholm_SetInmap () Synopsis : Configure the input map for Stockholm format .