deps/kb_meme/meme-5.0.1/src/dreme-sax.c
/*****************************************************************************
 * dreme > model > negatives
 *
 *  name            the name of the negative dataset
 *  count           the number of sequences in the negative dataset
 *  from            the source of the negative dataset (eg shuffled positives)
 *  file            the file containing the negative dataset (optional)
 *  last_mod_date   the last modified date of the file (optional)
 ****************************************************************************/
dreme > model > negatives
name            the name of the negative dataset
count           the number of sequences in the negative dataset
from            the source of the negative dataset
file            the file containing the negative dataset (optional)
last_mod_date   the last modified date of the file (optional)
dreme > model > negatives name the name of the negative dataset count the number of sequences in the negative dataset from the source of the negative dataset file the file containing the negative dataset ( optional ) last_mod_date the last modified date of the file ( optional )
static void start_ele_negatives(PS_T *ps, const xmlChar **attrs) {
  char *name, *file, *lastmod;
  long count;
  int from;
  file = NULL;
  lastmod = NULL;
  char* from_options[2] = {"file", "shuffled"};
  int from_values[2] = {DREME_NEG_FILE, DREME_NEG_SHUFFLED};
  MULTI_T from_multi = {.count = 2, .options = from_options, .outputs = from_values, .target = &(from)};
  char* names[5] = {"count", "file", "from", "last_mod_date", "name"};
  int (*parsers[5])(char*, void*) = {ld_long, ld_str, ld_multi, ld_str, ld_str};
  void *data[5] = {&count, &file, &from_multi, &lastmod, &name};
  bool required[5] = {true, false, true, false, true};
  bool done[5];
  parse_attributes(dreme_attr_parse_error, ps, "negatives", attrs, 5, names, parsers, data, required, done);
  if (ps->state != PS_ERROR && from == DREME_NEG_FILE) {
    if (file == NULL) {
      dreme_attr_parse_error(ps, PARSE_ATTR_MISSING, "negatives", "file", NULL);
    } 
    if (lastmod == NULL) {
      dreme_attr_parse_error(ps, PARSE_ATTR_MISSING, "negatives", "last_mod_date", NULL);
    }
  }
  if (ps->callbacks->handle_negatives && ps->state != PS_ERROR) {
    ps->callbacks->handle_negatives(ps->user_data, name, count, (DREME_NEG_EN)from, file, lastmod);
  }
}
static void start_ele_negatives ( PS_T * ps , const xmlChar * * attrs ) { char * name , * file , * lastmod ; long count ; int from ; file = NULL ; lastmod = NULL ; char * from_options [ 2 ] = { " " , " " } ; int from_values [ 2 ] = { DREME_NEG_FILE , DREME_NEG_SHUFFLED } ; MULTI_T from_multi = { . count = 2 , . options = from_options , . outputs = from_values , . target = & ( from ) } ; char * names [ 5 ] = { " " , " " , " " , " " , " " } ; int ( * parsers [ 5 ] ) ( char * , void * ) = { ld_long , ld_str , ld_multi , ld_str , ld_str } ; void * data [ 5 ] = { & count , & file , & from_multi , & lastmod , & name } ; bool required [ 5 ] = { true , false , true , false , true } ; bool done [ 5 ] ; parse_attributes ( dreme_attr_parse_error , ps , " " , attrs , 5 , names , parsers , data , required , done ) ; if ( ps -> state != PS_ERROR && from == DREME_NEG_FILE ) { if ( file == NULL ) { dreme_attr_parse_error ( ps , PARSE_ATTR_MISSING , " " , " " , NULL ) ; } if ( lastmod == NULL ) { dreme_attr_parse_error ( ps , PARSE_ATTR_MISSING , " " , " " , NULL ) ; } } if ( ps -> callbacks -> handle_negatives && ps -> state != PS_ERROR ) { ps -> callbacks -> handle_negatives ( ps -> user_data , name , count , ( DREME_NEG_EN ) from , file , lastmod ) ; } }
dreme > model > negatives
  name            the name of the negative dataset
  count           the number of sequences in the negative dataset
  from            the source of the negative dataset (eg shuffled positives)
  file            the file containing the negative dataset (optional)
  last_mod_date   the last modified date of the file (optional)
dreme > model > negatives name the name of the negative dataset count the number of sequences in the negative dataset from the source of the negative dataset ( eg shuffled positives ) file the file containing the negative dataset ( optional ) last_mod_date the last modified date of the file ( optional )