b09810165e57a61fc8e61549ea87da8b2dca3f58
kent
  Mon Jan 11 15:50:41 2021 -0800
Changing some Barchart to BarChart that I'd missed.

diff --git src/utils/clusterMatrixToBarChartBed/clusterMatrixToBarChartBed.c src/utils/clusterMatrixToBarChartBed/clusterMatrixToBarChartBed.c
index 4f32403..bdaeb3a 100644
--- src/utils/clusterMatrixToBarChartBed/clusterMatrixToBarChartBed.c
+++ src/utils/clusterMatrixToBarChartBed/clusterMatrixToBarChartBed.c
@@ -1,39 +1,39 @@
-/* clusterMatrixToBarchartBed - Compute a barchart bed file from  a gene matrix 
+/* clusterMatrixToBarChartBed - Compute a barchart bed file from  a gene matrix 
  * and a gene bed file and a way to cluster samples. */
 
 #include "common.h"
 #include "linefile.h"
 #include "hash.h"
 #include "options.h"
 #include "localmem.h"
 #include "obscure.h"
 #include "sqlNum.h"
 
 boolean clSimple = FALSE;
 boolean clMedian = FALSE;
 char *clName2 = NULL;
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
-  "clusterMatrixToBarchartBed - Compute a barchart bed file from  a gene matrix\n"
+  "clusterMatrixToBarChartBed - Compute a barchart bed file from  a gene matrix\n"
   "and a gene bed file and a way to cluster samples.\n"
   "NOTE: consider using matrixClusterColumns and matrixToBarChartBed instead\n"
   "usage:\n"
-  "   clusterMatrixToBarchartBed sampleClusters.tsv geneMatrix.tsv geneset.bed output.bed\n"
+  "   clusterMatrixToBarChartBed sampleClusters.tsv geneMatrix.tsv geneset.bed output.bed\n"
   "where:\n"
   "   sampleClusters.tsv is a two column tab separated file with sampleId and clusterId\n"
   "   geneMatrix.tsv has a row for each gene. The first row uses the same sampleId as above\n"
   "   geneset.bed has the maps the genes in the matrix (from it's first column) to the genome\n"
   "        geneset.bed needs 6 standard bed fields.  Unless name2 is set it also needs a name2\n"
   "        field as the last field\n"
   "   output.bed is the resulting bar chart, with one column per cluster\n"
   "options:\n"
   "   -simple - don't store the position of gene in geneMatrix.tsv file in output\n"
   "   -median - use median (instead of mean)\n"
   "   -name2=twoColFile.tsv - get name2 from file where first col is same ase geneset.bed's name\n"
   );
 }
 
 /* Command line validation table. */
@@ -57,39 +57,39 @@
     /* Find cluster in cluster hash, if it doesn't exist make it. */
     char *clusterName = row[1];
     struct hashEl *hel = hashLookup(clusterHash, clusterName);
     if (hel == NULL)
 	hel = hashAddInt(clusterHash, clusterName, 1);
     else
 	hel->val = ((char *)hel->val)+1;    // Increment hash pointer as per hashIncInt
     char *clusterStableName = hel->name;	// This is allocated in clusterHash
     hashAdd(sampleHash, row[0], clusterStableName);
     }
 lineFileClose(&lf);
 *retSampleHash = sampleHash;
 *retClusterHash = clusterHash;
 }
 
-void clusterMatrixToBarchartBed(char *sampleClusters, char *matrixTsv, char *geneBed, char *output)
-/* clusterMatrixToBarchartBed - Compute a barchart bed file from  a gene matrix 
+void clusterMatrixToBarChartBed(char *sampleClusters, char *matrixTsv, char *geneBed, char *output)
+/* clusterMatrixToBarChartBed - Compute a barchart bed file from  a gene matrix 
  * and a gene bed file and a way to cluster samples. */
 {
 /* Figure out if we need to do medians etc */
 boolean doMedian = clMedian;
 
 /* Load up the gene set */
-verbose(2, "clusterMatrixToBarchartBed(%s,%s,%s,%s)\n", sampleClusters, matrixTsv, geneBed, output);
+verbose(2, "clusterMatrixToBarChartBed(%s,%s,%s,%s)\n", sampleClusters, matrixTsv, geneBed, output);
 int bedRowSize = 0;
 struct hash *geneHash = hashTsvBy(geneBed, 3, &bedRowSize);
 verbose(2, "%d columns about %d genes in %s\n", bedRowSize, geneHash->elCount, geneBed);
 
 /* Deal with external gene hash */
 struct hash *nameToName2 = NULL;
 if (clName2 != NULL)
     {
     int colCount = 0;
     nameToName2 = hashTsvBy(clName2, 0, &colCount);
     if (colCount != 2)
         errAbort("Expecting %s to be a two column tab separated file", clName2);
     }
 
 /* Keep track of how many fields gene bed has to have and locate name2 */
@@ -312,18 +312,18 @@
     verbose(1, "matrix total %g, %d clusters, %g ave/cluster\n", 
 	sumTotal, clusterCount, sumTotal/clusterCount);
     }
 carefulClose(&f);
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
 if (argc != 5)
     usage();
 clSimple = optionExists("simple");
 clMedian = optionExists("median");
 clName2 = optionVal("name2", clName2);
-clusterMatrixToBarchartBed(argv[1], argv[2], argv[3], argv[4]);
+clusterMatrixToBarChartBed(argv[1], argv[2], argv[3], argv[4]);
 return 0;
 }