fcb3971566d6570959c4cd8022972d8f7c455ebc chmalee Mon Aug 19 13:21:18 2019 -0700 Remove links to lssnp from dbSnp hgc pages, and change lssnp links to mupit on hgGene pages, refs #22953 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index a0c8863..167fb73 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -18499,91 +18499,30 @@ struct trackDb *gcTdb = hashFindVal(trackHash, gcTable); if (gcTdb != NULL) { printf(">%s SNP \n", gcTdb->shortLabel); } } } } -static void printLsSnpPdb(struct sqlConnection *conn, char *pdbId, char *snpId) -/* generate LS-SNP and chimera links for a PDB id */ -{ -char *lsSnpUrl = lsSnpPdbGetUrlPdbSnp(pdbId, snpId); -struct tempName chimerax; -lsSnpPdbChimeraSnpAnn(conn, pdbId, snpId, &chimerax); -printf("%s%sLS-SNPChimera\n", - pdbId, lsSnpPdbChimeraGetStructType(conn, pdbId), - lsSnpUrl, chimerax.forHtml); -freeMem(lsSnpUrl); -} - -static void printLsSnpMappings(struct sqlConnection *conn, struct slName *pdbIds, - char *snpTrack, char *snpId) -/* Print lsSnp mappings. */ -{ -jsBeginCollapsibleSection(cart, snpTrack, "lsSnp", "Mappings to PDB protein structures", FALSE); -printf("\n"); -printf("\n"); -int numPdbs = slCount(pdbIds); -// limit column groups if just one row -int numCols = (numPdbs < 3) ? numPdbs : 3; -int iCol = 0; -struct slName *pdbId; -for (pdbId = pdbIds; pdbId != NULL; pdbId = pdbId->next) - { - if (iCol == 0) - printf("\n"); - printLsSnpPdb(conn, pdbId->name, snpId); - iCol++; - if (iCol == numCols) - { - printf("\n"); - iCol = 0; - } - } -if (iCol != 0) - { - // fill in last row - for (; iCol < numCols; iCol++) - printf("\n"); - } -printf("\n"); -printf("
\n"); - printf("
\n"); -printf("Chimera help\n"); -jsEndCollapsibleSection(); -} - -static void checkForLsSnpMappings(struct sqlConnection *conn, char *snpTrack, char *snpId) -/* check if this SNP is mapped to any protein by LS-SNP, and if so print -* the information. */ -{ -struct slName *pdbIds = lsSnpPdbChimeraGetSnpPdbs(conn, snpId); -if (pdbIds != NULL) - { - printLsSnpMappings(conn, pdbIds, snpTrack, snpId); - slFreeList(&pdbIds); - } -} - void printOtherSnpMappings(char *table, char *name, int start, struct sqlConnection *conn, int rowOffset) /* If this SNP (from any bed4+ table) is not uniquely mapped, print the other mappings. */ { char query[512]; sqlSafef(query, sizeof(query), "select * from %s where name='%s'", table, name); struct sqlResult *sr = sqlGetResult(conn, query); int snpCount = 0; char **row; while ((row = sqlNextRow(sr)) != NULL) { struct bed *snp = bedLoad3(row + rowOffset); if (snp->chromStart != start || differentString(snp->chrom, seqName)) { @@ -18627,31 +18566,30 @@ printf("
\n"); printSnp125Info(tdb, snp, version); doSnpEntrezGeneLink(tdb, itemName); } else errAbort("SNP %s not found at %s base %d", itemName, seqName, start); sqlFreeResult(&sr); printOtherSnpMappings(table, itemName, start, conn, rowOffset); puts("
"); // Make table for collapsible sections: puts(""); checkForGwasCatalog(conn, tdb, itemName); checkForHgdpGeo(conn, tdb, itemName, start); checkForHapmap(conn, tdb, itemName); -checkForLsSnpMappings(conn, tdb->track, itemName); printSnpAlignment(tdb, snpAlign, version); puts("
"); printTrackHtml(tdb); hFreeConn(&conn); } void doTigrGeneIndex(struct trackDb *tdb, char *item) /* Put up info on tigr gene index item. */ { char *animal = cloneString(item); char *id = strchr(animal, '_'); char buf[128]; if (id == NULL)