6eaeb14754e63042fad7370fc49c4c12274c74a8 hiram Fri Feb 10 10:59:25 2017 -0800 eliminate the dbAlias option for snake hal tracks not completely useful at this time refs #18440 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index be8b9f3..1da66e8 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -25002,58 +25002,45 @@ struct trackDb *parentTdb = trackDbTopLevelSelfOrParent(tdb); char *otherSpecies = trackDbSetting(tdb, "otherSpecies"); if (otherSpecies == NULL) otherSpecies = trackHubSkipHubName(tdb->table) + strlen("snake"); char *hubName = cloneString(database); char otherDb[4096]; char *qName = cartOptionalString(cart, "qName"); int qs = atoi(cartOptionalString(cart, "qs")); int qe = atoi(cartOptionalString(cart, "qe")); int qWidth = atoi(cartOptionalString(cart, "qWidth")); char *qTrack = cartString(cart, "g"); if(isHubTrack(qTrack) && ! trackHubDatabase(database)) hubName = cloneString(qTrack); -struct hash *dbAliasHash = NULL; // create later when needed -char * dbAliasList = trackDbSetting(tdb, "dbAliasList"); -if (dbAliasList) - dbAliasHash = hashFromString(dbAliasList); - /* current mouse strain hal file has incorrect chrom names */ char *aliasQName = qName; // aliasQName = "chr1"; // temporarily make this work for the mouse hal if(trackHubDatabase(database) || isHubTrack(qTrack)) { char *ptr = strchr(hubName + 4, '_'); *ptr = 0; safef(otherDb, sizeof otherDb, "%s_%s", hubName, otherSpecies); } else { safef(otherDb, sizeof otherDb, "%s", otherSpecies); } -if (dbAliasHash) - { - char *otherDbName = trackHubSkipHubName(otherDb); - struct hashEl* alias = hashLookup(dbAliasHash, otherDbName); - if (alias) - safef(otherDb, sizeof otherDb, "%s", (char *)alias->val); - } - char headerText[256]; safef(headerText, sizeof headerText, "reference: %s, query: %s\n", trackHubSkipHubName(database), trackHubSkipHubName(otherDb) ); genericHeader(parentTdb, headerText); printf("<A HREF=\"hgTracks?db=%s&position=%s:%d-%d&%s_snake%s=full\" TARGET=_BLANK>%s:%d-%d</A> link to block in query assembly: <B>%s</B></A><BR>\n", otherDb, aliasQName, qs, qe, hubName, trackHubSkipHubName(database), aliasQName, qs, qe, trackHubSkipHubName(otherDb)); int qCenter = (qs + qe) / 2; int newQs = qCenter - qWidth/2; int newQe = qCenter + qWidth/2; printf("<A HREF=\"hgTracks?db=%s&position=%s:%d-%d&%s_snake%s=full\" TARGET=\"_blank\">%s:%d-%d</A> link to same window size in query assembly: <B>%s</B></A><BR>\n", otherDb, aliasQName, newQs, newQe,hubName, trackHubSkipHubName(database), aliasQName, newQs, newQe, trackHubSkipHubName(otherDb) ); printTrackHtml(tdb); } bool vsameWords(char *a, va_list args) /* returns true if a is sameWord as any arg, all args must be char* */