deps/kb_meme/meme-5.0.1/src/motif-in-meme-json.c
/*
 * Add a symbol entry to the alphabet
 */
Add a symbol entry to the alphabet
Add a symbol entry to the alphabet
bool mhtml2_alph_entry(void *user_data, void *list, const int *index, void *value) {
  DATA_T *data;
  ALPH_READER_T *reader;
  SYM_T *sym;
  char *alias_p, sym_comprise[2];
  data = (DATA_T*)user_data;
  reader = (ALPH_READER_T*)list;
  sym = (SYM_T*)value;
  if (index[0] < data->alph_ncore) {
    alph_reader_core(reader, sym->symbol, sym->aliases, sym->name, sym->colour, sym->complement);
  } else {
    if (sym->comprise != NULL) {
      alph_reader_ambig(reader, sym->symbol, sym->aliases, sym->name, sym->colour, sym->comprise);
    } else {
      error(data, "Alphabet ambiguous symbol %c requires attribute \"equals\".", sym->symbol);
      return false;
    }
  }
  return true;
}
bool mhtml2_alph_entry ( void * user_data , void * list , const int * index , void * value ) { DATA_T * data ; ALPH_READER_T * reader ; SYM_T * sym ; char * alias_p , sym_comprise [ 2 ] ; data = ( DATA_T * ) user_data ; reader = ( ALPH_READER_T * ) list ; sym = ( SYM_T * ) value ; if ( index [ 0 ] < data -> alph_ncore ) { alph_reader_core ( reader , sym -> symbol , sym -> aliases , sym -> name , sym -> colour , sym -> complement ) ; } else { if ( sym -> comprise != NULL ) { alph_reader_ambig ( reader , sym -> symbol , sym -> aliases , sym -> name , sym -> colour , sym -> comprise ) ; } else { error ( data , " \" \" " , sym -> symbol ) ; return false ; } } return true ; }
Add a symbol entry to the alphabet
Add a symbol entry to the alphabet
// core symbol // ambiguous symbol