deps/kb_meme/meme-5.0.1/src/seq.c
/***************************************************************************
 * Add or remove Xs from either side of the sequence.
 ***************************************************************************/
Add or remove Xs from either side of the sequence.
Add or remove Xs from either side of the sequence .
static void add_flanking_xs
  (SEQ_T* sequence, ALPH_T* alph)
{
  char*  new_seq = NULL;         
  new_seq = (char*)mm_calloc(sequence->length + 3, sizeof(char));
  strcpy(&(new_seq[1]), sequence->sequence);
  new_seq[0] = alph_wildcard(alph);
  new_seq[sequence->length + 1] = alph_wildcard(alph);
  new_seq[sequence->length + 2] = '\0';
  myfree(sequence->sequence);
  sequence->sequence = new_seq;
  sequence->length += 2;
}
static void add_flanking_xs ( SEQ_T * sequence , ALPH_T * alph ) { char * new_seq = NULL ; new_seq = ( char * ) mm_calloc ( sequence -> length + 3 , sizeof ( char ) ) ; strcpy ( & ( new_seq [ 1 ] ) , sequence -> sequence ) ; new_seq [ 0 ] = alph_wildcard ( alph ) ; new_seq [ sequence -> length + 1 ] = alph_wildcard ( alph ) ; new_seq [ sequence -> length + 2 ] = ' \0 ' ; myfree ( sequence -> sequence ) ; sequence -> sequence = new_seq ; sequence -> length += 2 ; }
Add or remove Xs from either side of the sequence.
Add or remove Xs from either side of the sequence .
// Pointer to copy of the sequence.