deps/kb_meme/meme-5.0.1/src/mhmm.c
/*************************************************************************
 * store a motif identifier in a passed set with the strands of it that
 * have been requested.
 * Returns true on success.
 *************************************************************************/
store a motif identifier in a passed set with the strands of it that
have been requested.
Returns true on success.
store a motif identifier in a passed set with the strands of it that have been requested . Returns true on success .
bool store_requested_id(RBTREE_T *request_ids, char *value) {
  int strands;
  RBNODE_T *node;
  bool created;
  strands = MOTIF_PLUS; 
  if (value[0] == '+') {
    value++;
  } else if (value[0] == '-') {
    value++;
    strands = MOTIF_MINUS;
  }
  if (value[0] == '\0') return false;
  node = rbtree_lookup(request_ids, value, true, &created);
  if (!created) strands |= *((int*)rbtree_value(node));
  rbtree_set(request_ids, node, &strands);
  return true;
}
bool store_requested_id ( RBTREE_T * request_ids , char * value ) { int strands ; RBNODE_T * node ; bool created ; strands = MOTIF_PLUS ; if ( value [ 0 ] == ' ' ) { value ++ ; } else if ( value [ 0 ] == ' ' ) { value ++ ; strands = MOTIF_MINUS ; } if ( value [ 0 ] == ' \0 ' ) return false ; node = rbtree_lookup ( request_ids , value , true , & created ) ; if ( ! created ) strands |= * ( ( int * ) rbtree_value ( node ) ) ; rbtree_set ( request_ids , node , & strands ) ; return true ; }
store a motif identifier in a passed set with the strands of it that
 have been requested.
store a motif identifier in a passed set with the strands of it that have been requested .
// assume positive strand