72f28b6721ce6fb430d88ec0559a08e6c3e5cf55
kent
  Tue May 3 22:48:28 2011 -0700
Improving comment.
diff --git src/lib/peakCluster.c src/lib/peakCluster.c
index f5cee04..f315dea 100644
--- src/lib/peakCluster.c
+++ src/lib/peakCluster.c
@@ -115,33 +115,33 @@
 struct peakCluster *peakClusterItems(struct lm *lm, struct peakItem *itemList, 
 	double forceJoinScore, double weakLevel)
 /* Convert a list of items to a list of clusters of items.  This may break up clusters that
  * have weakly linked parts. 
       [                ]
       AAAAAAAAAAAAAAAAAA 
        BBBBBB   DDDDDD
         CCCC     EEEE
    gets tranformed into
        [    ]   [    ]
       AAAAAAAAAAAAAAAAAA 
        BBBBBB   DDDDDD
         CCCC     EEEE
    The strategy is to build a rangeTree of coverage, which might look something like so:
       123333211123333211 
-   then define cluster ends that exceed the minimum limit, which is either 10% of the highest
-   or forceJoinScore if 10% of the highest is more than forceJoinScore.  This will go to
-   something like so:
+   then define cluster ends that exceed the minimum limit, which is either weakLevel
+   (usually 10%) of the highest or forceJoinScore if weakLevel times the highest is 
+   more than forceJoinScore.  This will go to something like so:
         [---]   [----]   
    Finally the items that are overlapping a cluster are assigned to it.  Note that this
    may mean that an item may be in multiple clusters.
         [ABC]   [ ADE]
  */
 {
 int easyMax = round(1.0/weakLevel);
 int itemCount = slCount(itemList);
 struct peakCluster *clusterList = NULL;
 if (itemCount < easyMax)
     {
     struct peakItem *item = itemList;
     int chromStart = item->chromStart;
     int chromEnd = item->chromEnd;
     for (item = item->next; item != NULL; item = item->next)