995b57436b88ab94ba85bb54491a983fa96c7f70 braney Sat Aug 23 16:01:24 2014 -0700 bigGenePred support in track hubs limping along #13861 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 2df4674..db9ef8a 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -1586,31 +1586,31 @@ // sr may be null for bigBeds. // Returns number of extra fields actually printed. { struct sqlConnection *conn = NULL ; if (!trackHubDatabase(database)) conn = hAllocConnTrack(database, tdb); struct asObject *as = asForTdb(conn, tdb); hFreeConn(&conn); if (as == NULL) return 0; // We are trying to print extra fields so we need to figure out how many fields to skip int start = 0; char *type = cloneString(tdb->type); char *word = nextWord(&type); -if (word && (sameWord(word,"bed") || sameWord(word,"bigBed"))) +if (word && (sameWord(word,"bed") || sameWord(word,"bigBed") || sameWord(word,"bigGenePred"))) { if (NULL != (word = nextWord(&type))) start = sqlUnsigned(word); else // custom beds and bigBeds may not have full type "begBed 9 +" start = max(0,slCount(as->columnList) - fieldCount); } int count = 0; struct asColumn *col = as->columnList; char *urlsStr = trackDbSetting(tdb, "urls"); struct hash* fieldToUrl = hashFromString(urlsStr); for (;col != NULL && count < fieldCount;col=col->next) { if (start > 0) // skip past already known fields { @@ -3957,30 +3957,35 @@ if (container != NULL) { genericContainerClick(conn, container, tdb, item, itemForUrl); } else if (wordCount > 0) { type = words[0]; if (sameString(type, "bed")) { int num = 0; if (wordCount > 1) num = atoi(words[1]); if (num < 3) num = 3; genericBedClick(conn, tdb, item, start, num); } + else if (sameString(type, "bigGenePred")) + { + int num = 12; + genericBigBedClick(conn, tdb, item, start, end, num); + } else if (sameString(type, "bigBed")) { int num = 0; if (wordCount > 1) num = atoi(words[1]); if (num < 3) num = 3; genericBigBedClick(conn, tdb, item, start, end, num); } else if (sameString(type, "sample")) { int num = 9; genericSampleClick(conn, tdb, item, start, num); } else if (sameString(type, "genePred")) {