62dcdf3f92f4422a766d225550a99f30a3cc860c braney Thu Feb 21 12:05:12 2013 -0800 add comment to somewhat funky mapping of the field "genome" to the field "organism" when using track hubs since track hubs call the assembly name "genome" per code review #10237 diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 97ebc03..ed2bccf 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -2262,30 +2262,34 @@ } char *hArchiveDbDbOptionalField(char *database, char *field) /* Wrapper for hArchiveOrCentralDbDbOptionalField to * look up in the archive database. */ { return hArchiveOrCentralDbDbOptionalField(database, field, TRUE); } char *hDbDbOptionalField(char *database, char *field) /* Wrapper for hArchiveOrCentralDbDbOptionalField to * look up in the regular central database. */ { if (trackHubDatabase(database)) { + // In dbDb the genome field is the name of the organism, but + // genome is the name of the assembly in track hubs. + // Since we're called from dbDb aware code, we map a request + // for the field "genome" to "organism" if (sameString(field, "genome")) field = "organism"; return trackHubAssemblyField(database, field); } char *res = hArchiveOrCentralDbDbOptionalField(database, field, FALSE); return res; } char *hDbDbField(char *database, char *field) /* Look up field in dbDb table keyed by database. * Free this string when you are done. */ { char *res = hDbDbOptionalField(database, field);