deps/kb_meme/meme-5.0.1/src/tomtom.c
/**************************************************************************
 * Parse a list of Tomtom output strings, converting p-values to q-values.
 **************************************************************************/
Parse a list of Tomtom output strings, converting p-values to q-values.
Parse a list of Tomtom output strings converting p - values to q - values .
static void convert_tomtom_p_to_q(int match_count, TOMTOM_MATCH_T **match_list) {
  ARRAY_T *pvalues;
  int i;
  pvalues = allocate_array(match_count);
  for (i = 0; i < match_count; i++) set_array_item(i, match_list[i]->pvalue, pvalues);
  compute_qvalues(
    false, 
    true, 
    NULL, 
    NUM_BOOTSTRAPS,
    NUM_BOOTSTRAP_SAMPLES,
    NUM_LAMBDA,
    MAX_LAMBDA,
    match_count, 
    pvalues,
    NULL 
  );
  for (i = 0; i < match_count; i++) match_list[i]->qvalue = get_array_item(i, pvalues);
  free_array(pvalues);
}
static void convert_tomtom_p_to_q ( int match_count , TOMTOM_MATCH_T * * match_list ) { ARRAY_T * pvalues ; int i ; pvalues = allocate_array ( match_count ) ; for ( i = 0 ; i < match_count ; i ++ ) set_array_item ( i , match_list [ i ] -> pvalue , pvalues ) ; compute_qvalues ( false , true , NULL , NUM_BOOTSTRAPS , NUM_BOOTSTRAP_SAMPLES , NUM_LAMBDA , MAX_LAMBDA , match_count , pvalues , NULL ) ; for ( i = 0 ; i < match_count ; i ++ ) match_list [ i ] -> qvalue = get_array_item ( i , pvalues ) ; free_array ( pvalues ) ; }
Parse a list of Tomtom output strings, converting p-values to q-values.
Parse a list of Tomtom output strings converting p - values to q - values .
// Extract all of the p-values. // Convert p-values to q-values. // Don't stop with FDR. // Estimate pi-zero. // Don't store pi-zero in a file. // No sampled p-values provided // Set q-values // clean up