368788bb8c47f73d62c9714fab6e0457038a2783
kent
  Thu Feb 10 15:14:06 2011 -0800
Starting to work on getting qName based identifiers to work for BAM files.
diff --git src/hg/hgTables/identifiers.c src/hg/hgTables/identifiers.c
index 97464b6..7387f51 100644
--- src/hg/hgTables/identifiers.c
+++ src/hg/hgTables/identifiers.c
@@ -53,35 +53,43 @@
 	sqlFieldIndex(conn, xrefTable, aliasField) < 0)
 	xrefTable = idField = aliasField = NULL;
     }
 if (retXrefTable != NULL)
     *retXrefTable = xrefTable;
 if (retIdField != NULL)
     *retIdField = idField;
 if (retAliasField != NULL)
     *retAliasField = aliasField;
 }
 
 static struct slName *getExamples(struct sqlConnection *conn,
 				  char *table, char *field, int count)
 /* Return a list of several example values of table.field. */
 {
+if (isBamTable(table))
+    {
+    assert(sameString(field, "qName"));
+    return randomBamIds(table, conn, count);
+    }
+else
+    {
 char fullTable[HDB_MAX_TABLE_STRING];
 if (! hFindSplitTable(database, NULL, table, fullTable, NULL))
     safecpy(fullTable, sizeof(fullTable), table);
 return sqlRandomSampleConn(conn, fullTable, field, count);
 }
+}
 
 static void explainIdentifiers(struct sqlConnection *conn, char *idField)
 /* Tell the user what field(s) they may paste/upload values for, and give 
  * some examples. */
 {
 char *xrefTable = NULL, *xrefIdField = NULL, *aliasField = NULL;
 getXrefInfo(conn, &xrefTable, &xrefIdField, &aliasField);
 hPrintf("The items must be values of the <B>%s</B> field of the currently "
 	"selected table, <B>%s</B>",
 	idField, curTable);
 if (aliasField != NULL)
     {
     if (sameString(curTable, xrefTable))
 	{
 	if (!sameString(idField, aliasField))