Index: src/hg/instinct/raToDb/raToDb.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/raToDb/raToDb.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 1000000 -r1.1 -r1.2
--- src/hg/instinct/raToDb/raToDb.c	9 Apr 2010 18:51:52 -0000	1.1
+++ src/hg/instinct/raToDb/raToDb.c	9 Apr 2010 19:31:15 -0000	1.2
@@ -1,40 +1,53 @@
 /* raToDb - RA to database table converter RA to database converter. */
 #include "common.h"
 #include "linefile.h"
 #include "hash.h"
 #include "options.h"
 #include "jksql.h"
 #include "ra.h"
+#include "hgHeatmapLib.h"
+#include "raDb.h"
 
 static char const rcsid[] = "$Id$";
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "raToDb - RA to database table converter RA to database converter\n"
   "usage:\n"
-  "   raToDb XXX\n"
-  "options:\n"
-  "   -xxx=XXX\n"
+  "   raToDb db file.ra\n"
+  "\n"
+  "    db = database to put ra_username table\n"
+  "    file.ra = root ra file\n"
   );
 }
 
 static struct optionSpec options[] = {
    {NULL, 0},
 };
 
-void raToDb(char *XXX)
+void raToDb(char *db, char *raName)
 /* raToDb - RA to database table converter RA to database converter. */
 {
+struct hash *ra, *raList = readRa(raName);
+
+if (raList == NULL)
+    errAbort("Couldn't find anything from %s", raName);
+
+for (ra = raList; ra != NULL; ra = ra->next)
+    {
+    char *name = (char *)(hashMustFindVal(ra, "name"));
+    printf("name: %s\n", name); 
+    }
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
-if (argc != 2)
+if (argc != 3)
     usage();
-raToDb(argv[1]);
+raToDb(argv[1], argv[2]);
 return 0;
 }

