deps/kb_meme/meme-5.0.1/src/data-block-reader.c
/****************************************************************************
 * Read priors until a new sequence is encountered or too many letters
 * are read.  The new priors are copied to the priors buffer of the given
 * sequence starting at buffer_offset.
 ****************************************************************************/
Read priors until a new sequence is encountered or too many letters
are read.  The new priors are copied to the priors buffer of the given
sequence starting at buffer_offset.
Read priors until a new sequence is encountered or too many letters are read . The new priors are copied to the priors buffer of the given sequence starting at buffer_offset .
void read_one_priors_segment_from_reader(
   DATA_BLOCK_READER_T *prior_reader,
   size_t max_size,
   size_t buffer_offset,
   SEQ_T *sequence
) {
  assert(sequence != NULL);
  char *seq_name = get_seq_name(sequence);
  size_t seq_start = get_seq_offset(sequence);
  double *priors = get_seq_priors(sequence);
  if (priors == NULL) {
    priors = mm_malloc(max_size * sizeof(double));
  }
  get_prior_array_from_reader(
    prior_reader, 
    seq_name, 
    seq_start, 
    max_size, 
    buffer_offset,
    priors
  );
  set_seq_priors(priors, sequence);
}
void read_one_priors_segment_from_reader ( DATA_BLOCK_READER_T * prior_reader , size_t max_size , size_t buffer_offset , SEQ_T * sequence ) { assert ( sequence != NULL ) ; char * seq_name = get_seq_name ( sequence ) ; size_t seq_start = get_seq_offset ( sequence ) ; double * priors = get_seq_priors ( sequence ) ; if ( priors == NULL ) { priors = mm_malloc ( max_size * sizeof ( double ) ) ; } get_prior_array_from_reader ( prior_reader , seq_name , seq_start , max_size , buffer_offset , priors ) ; set_seq_priors ( priors , sequence ) ; }
Read priors until a new sequence is encountered or too many letters
 are read.
Read priors until a new sequence is encountered or too many letters are read .
// Get the priors buffer from the SEQ_T // Priors buffer not yet allocated