deps/kb_meme/meme-5.0.1/src/spamo.c
/**************************************************************************
 * Returns a sorted array of the secondary motifs with a significant spacing, 
 * sorted by best spacing pvalue
 **************************************************************************/
Returns a sorted array of the secondary motifs with a significant spacing,
sorted by best spacing pvalue
Returns a sorted array of the secondary motifs with a significant spacing sorted by best spacing pvalue
LINKLST_T* sort_secondary_motifs(RBTREE_T *secondary_motifs) {
  RBNODE_T *node;
  LINKLST_T *list;
  SECONDARY_MOTIF_T *smotif;
  DEBUG_MSG(NORMAL_VERBOSE, "Sorting Significant Secondary Motifs\n");
  list = linklst_create();
  for (node = rbtree_first(secondary_motifs); node != NULL; node = rbtree_next(node)) {
    smotif = (SECONDARY_MOTIF_T*)rbtree_value(node);
    if (smotif->passes_evalue_cutoff) linklst_add(smotif, list);
  }
  linklst_sort(secondary_motif_pvalue_comparator, list);
  return list;
}
LINKLST_T * sort_secondary_motifs ( RBTREE_T * secondary_motifs ) { RBNODE_T * node ; LINKLST_T * list ; SECONDARY_MOTIF_T * smotif ; DEBUG_MSG ( NORMAL_VERBOSE , " \n " ) ; list = linklst_create ( ) ; for ( node = rbtree_first ( secondary_motifs ) ; node != NULL ; node = rbtree_next ( node ) ) { smotif = ( SECONDARY_MOTIF_T * ) rbtree_value ( node ) ; if ( smotif -> passes_evalue_cutoff ) linklst_add ( smotif , list ) ; } linklst_sort ( secondary_motif_pvalue_comparator , list ) ; return list ; }
Returns a sorted array of the secondary motifs with a significant spacing,
 sorted by best spacing pvalue
Returns a sorted array of the secondary motifs with a significant spacing sorted by best spacing pvalue
//copy entries with significant match into a list //sort by pvalue