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("<TR><TD colspan=2>><B><A HREF=\"%s", hgTracksPathAndSettings());
 	    // If gcTable is hidden, make it dense; otherwise, leave it alone.
 	    if (sameString("hide",
 			   cartUsualString(cart, gcTable,
 					   trackDbSettingOrDefault(gcTdb, "visibility", "hide"))))
 		printf("&%s=dense", gcTable);
 	    printf("\">%s SNP</A> </B></TD></TR>\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("<TD>%s<TD>%s<TD><A HREF=\"%s\" target=_blank>LS-SNP</A><td class=\"hgcLsSnpSep\"><A HREF=\"%s\">Chimera</A>\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("<TABLE class=\"hgcLsSnp\">\n");
-printf("<TBODY>\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("<TR>\n");
-    printLsSnpPdb(conn, pdbId->name, snpId);
-    iCol++;
-    if (iCol == numCols)
-        {
-        printf("</TR>\n");
-        iCol = 0;
-        }
-    }
-if (iCol != 0)
-    {
-    // fill in last row
-    for (; iCol < numCols; iCol++)
-        printf("<TD colspan=4 class=\"hgcLsSnpSep\">\n");
-    printf("</TR>\n");
-    }
-printf("</TBODY>\n");
-printf("</TABLE>\n");
-printf("<A href=\"../goldenPath/help/chimera.html\" TARGET=_blank>Chimera help</A>\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("<BR>\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("<BR>");
 // Make table for collapsible sections:
 puts("<TABLE>");
 checkForGwasCatalog(conn, tdb, itemName);
 checkForHgdpGeo(conn, tdb, itemName, start);
 checkForHapmap(conn, tdb, itemName);
-checkForLsSnpMappings(conn, tdb->track, itemName);
 printSnpAlignment(tdb, snpAlign, version);
 puts("</TABLE>");
 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)