src/hg/regulate/regClusterMakeTableOfTables/regClusterMakeTableOfTables.c 1.2

1.2 2010/03/10 19:46:34 kent
Removing -two option.
Index: src/hg/regulate/regClusterMakeTableOfTables/regClusterMakeTableOfTables.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/regulate/regClusterMakeTableOfTables/regClusterMakeTableOfTables.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/hg/regulate/regClusterMakeTableOfTables/regClusterMakeTableOfTables.c	8 Mar 2010 23:35:08 -0000	1.1
+++ src/hg/regulate/regClusterMakeTableOfTables/regClusterMakeTableOfTables.c	10 Mar 2010 19:46:34 -0000	1.2
@@ -8,24 +8,19 @@
 #include "hmmStats.h"
 
 static char const rcsid[] = "$Id$";
 
-boolean clTwo = FALSE;
-
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "regClusterMakeTableOfTables - Make up a table of tables for regCluster program\n"
   "usage:\n"
   "   regClusterMakeTableOfTables fileListFile output\n"
-  "options:\n"
-  "   -two - assume name is camelCased with two things\n"
   );
 }
 
 static struct optionSpec options[] = {
-   {"two", OPTION_BOOLEAN},
    {NULL, 0},
 };
 
 int commonPrefixSize(struct slName *list)
@@ -74,29 +69,8 @@
     }
 return commonSize;
 }
 
-void camelParseTwo(char *in, char **retA, char **retB)
-/* Parse out CamelCased in into a and b.  */
-{
-char *s = in;
-char *aStart = s;
-char *bStart = NULL;
-char c;
-while ((c = *(++s)) != 0)
-    {
-    if (isupper(c))
-        {
-	bStart = s;
-	break;
-        }
-    }
-if (bStart == NULL)
-   errAbort("Couldn't find start of second word in %s", in);
-*retA = cloneStringZ(aStart, bStart - aStart);
-*retB = cloneString(bStart);
-}
-
 double calcNormScoreFactor(char *fileName, int scoreCol)
 /* Figure out what to multiply things by to get a nice browser score (0-1000) */
 {
 struct lineFile *lf = lineFileOpen(fileName, TRUE);
@@ -114,9 +88,9 @@
     sum += x;
     sumSquares += x*x;
     n += 1;
     }
-
+lineFileClose(&lf);
 double std = calcStdFromSums(sum, sumSquares, n);
 double mean = sum/n;
 double highEnd = mean + std;
 if (highEnd > maxVal) highEnd = maxVal;
@@ -136,15 +110,8 @@
     fprintf(f, "%g\t", calcNormScoreFactor(in->name, 7));
     char *s = in->name;
     int len = strlen(s);
     char *midString = cloneStringZ(s+commonPrefix, len - commonPrefix - commonSuffix);
-    if (clTwo)
-        {
-	char *a, *b;
-	camelParseTwo(midString, &a, &b);
-	fprintf(f, "%s\t%s\n", a, b);
-	}
-    else
 	fprintf(f, "%s\n", midString);
     freez(&midString);
     }
 carefulClose(&f);
@@ -155,8 +122,7 @@
 {
 optionInit(&argc, argv, options);
 if (argc != 3)
     usage();
-clTwo = optionExists("two");
 regClusterMakeTableOfTables(argv[1], argv[2]);
 return 0;
 }