hmmer-3.3/src/p7_hmm.c
/* Function:  p7_hmm_EncodeStatetype()
 * Synopsis:  Convert a state type string to internal code.
 *
 * Purpose:   Converts state type string <typestring> case insensitively to
 *            an internal code, and returns the code. For example,
 *            <p7_hmm_DecodeStatetype("M")> returns <p7T_M>.
 *            
 *            If the string isn't recognized, returns <p7T_BOGUS>.
 */
p7_hmm_EncodeStatetype()
Synopsis:  Convert a state type string to internal code.

Converts state type string  case insensitively to
an internal code, and returns the code. For example,
 returns .

If the string isn't recognized, returns .
p7_hmm_EncodeStatetype () Synopsis : Convert a state type string to internal code . Converts state type string case insensitively to an internal code and returns the code . For example returns . If the string isn ' t recognized returns .
char
p7_hmm_EncodeStatetype(char *typestring)
{
  if      (strcasecmp(typestring, "M") == 0) return p7T_M;
  else if (strcasecmp(typestring, "D") == 0) return p7T_D;
  else if (strcasecmp(typestring, "I") == 0) return p7T_I;
  else if (strcasecmp(typestring, "S") == 0) return p7T_S;
  else if (strcasecmp(typestring, "N") == 0) return p7T_N;
  else if (strcasecmp(typestring, "B") == 0) return p7T_B;
  else if (strcasecmp(typestring, "E") == 0) return p7T_E;
  else if (strcasecmp(typestring, "C") == 0) return p7T_C;
  else if (strcasecmp(typestring, "T") == 0) return p7T_T;
  else if (strcasecmp(typestring, "J") == 0) return p7T_J;
  else if (strcasecmp(typestring, "X") == 0) return p7T_X;
  else return p7T_BOGUS;
}
char p7_hmm_EncodeStatetype ( char * typestring ) { if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_M ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_D ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_I ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_S ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_N ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_B ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_E ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_C ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_T ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_J ; else if ( strcasecmp ( typestring , " " ) == 0 ) return p7T_X ; else return p7T_BOGUS ; }
Function:  p7_hmm_EncodeStatetype()
 Synopsis:  Convert a state type string to internal code.
Function : p7_hmm_EncodeStatetype () Synopsis : Convert a state type string to internal code .