deps/kb_meme/meme-5.0.1/src/scanned-sequence.c
/*
 * Create a scanned sequence structure.
 * The seq_id is copied.
 */
Create a scanned sequence structure.
The seq_id is copied.
Create a scanned sequence structure . The seq_id is copied .
SCANNED_SEQ_T* sseq_create(const char *seq_id, long length, double log10pvalue, 
    long site_count) {
  SCANNED_SEQ_T *sseq;
  sseq = mm_malloc(sizeof(SCANNED_SEQ_T));
  memset(sseq, 0, sizeof(SCANNED_SEQ_T));
  sseq->seq_id = strdup(seq_id);
  sseq->length = length;
  sseq->pvalue = pow(10.0, log10pvalue);
  sseq->site_count = site_count;
  sseq->sites = (SCANNED_SITE_T*)mm_malloc(sizeof(SCANNED_SITE_T) * site_count);
  memset(sseq->sites, 0, sizeof(SCANNED_SITE_T) * site_count);
  return sseq;
}
SCANNED_SEQ_T * sseq_create ( const char * seq_id , long length , double log10pvalue , long site_count ) { SCANNED_SEQ_T * sseq ; sseq = mm_malloc ( sizeof ( SCANNED_SEQ_T ) ) ; memset ( sseq , 0 , sizeof ( SCANNED_SEQ_T ) ) ; sseq -> seq_id = strdup ( seq_id ) ; sseq -> length = length ; sseq -> pvalue = pow ( 10.0 , log10pvalue ) ; sseq -> site_count = site_count ; sseq -> sites = ( SCANNED_SITE_T * ) mm_malloc ( sizeof ( SCANNED_SITE_T ) * site_count ) ; memset ( sseq -> sites , 0 , sizeof ( SCANNED_SITE_T ) * site_count ) ; return sseq ; }
Create a scanned sequence structure.
Create a scanned sequence structure .