ce84dec02479202e3c5da08720403faa4cf4f215 braney Thu Mar 14 12:09:42 2019 -0700 support bigGenePred with no table as a native track diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 58f1232..170bbe9 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -8472,31 +8472,38 @@ /* Build a genePred list for the given table and gene name. */ { struct genePred *gpList = NULL; if (isCustomTrack(table)) { struct trackDb *tdb = getCustomTrackTdb(table); gpList = getGenePredForPositionBigGene(tdb, geneName); } else if (isHubTrack(table)) { struct trackDb *tdb = hubConnectAddHubForTrackAndFindTdb( database, table, NULL, trackHash); gpList = getGenePredForPositionBigGene(tdb, geneName); } else + { + struct trackDb *tdb = hashFindVal(trackHash, table); + char *bigDataUrl = trackDbSetting(tdb, "bigDataUrl"); + if (bigDataUrl) + gpList = getGenePredForPositionBigGene(tdb, geneName); + else gpList = getGenePredForPositionSql(table, geneName); + } return gpList; } void htcTranslatedPredMRna(char *geneName) /* Translate virtual mRNA defined by genePred to protein and display it. */ { char *table = cartString(cart, "table"); struct genePred *gp = NULL; char protName[256]; char *prot = NULL; cartHtmlStart("Protein Translation from Genome"); gp = getGenePredForPosition(table, geneName); @@ -8732,31 +8739,46 @@ cgiMakeHiddenVar("g", "htcDnaNearGene"); cgiContinueHiddenVar("i"); printf("\n"); cgiContinueHiddenVar("db"); printf("\n"); cgiContinueHiddenVar("c"); printf("\n"); cgiContinueHiddenVar("l"); printf("\n"); cgiContinueHiddenVar("r"); printf("\n"); cgiContinueHiddenVar("o"); printf("\n"); +if (isCustomTrack(tbl) || startsWith("hub_", tbl)) hgSeqOptions(cart, database, tbl); +else + { + struct trackDb *tdb = hashFindVal(trackHash, tbl); + char *bigDataUrl = trackDbSetting(tdb, "bigDataUrl"); + if (bigDataUrl) + { + // we asssume that this is a bigGenePred table if we got here with it + hgSeqFeatureRegionOptions(cart, TRUE, TRUE); + hgSeqDisplayOptions(cart, TRUE, TRUE, FALSE); + } + else + hgSeqOptions(cart, database, tbl); + } + cgiMakeButton("submit", "submit"); printf(""); } void htcGeneAlignment(char *geneName) /* Put up page that lets user display genomic sequence * associated with gene. */ { cartWebStart(cart, database, "Aligned Annotated Genomic Sequence "); printf("