f47737c7f420db6d20601d460a438cca1ce818d3
fanhsu
  Thu Sep 8 12:57:57 2011 -0700
Disabled OMIM NCBI links, and replaced mim2gene table to omim2gene table.
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 1bb3b0b..d8c32e5 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -9635,34 +9635,37 @@
     if (row != NULL)
     	{
 	if (row[0] != NULL)
 	    {
 	    title1 = cloneString(row[0]);
     	    printf(" %s", title1);
 	    }
 	if (row[1] != NULL)
 	    {
 	    title2 = cloneString(row[1]);
     	    printf(" %s ", title2);
 	    }
 	}
     sqlFreeResult(&sr);
 
+    // disable NCBI link until they work it out with OMIM
+    /*
     printf("<BR>\n");
     printf("<B>OMIM page at NCBI: ");
     printf("<A HREF=\"%s%s\" target=_blank>", ncbiOmimUrl, itemName);
     printf("%s</A></B><BR>", itemName);
+    */
 
     safef(query, sizeof(query),
     	  "select geneSymbol from omimGeneMap where omimId=%s;", itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL)
     	{
 	geneSymbol = cloneString(row[0]);
 	}
     sqlFreeResult(&sr);
 
     if (geneSymbol!= NULL)
     	{
 	boolean disorderShown;
 	char *phenotypeClass, *phenotypeId, *disorder;
@@ -9700,54 +9703,54 @@
 		else
 		    {
 		    // show phenotype class if available, even phenotypeId is not available
 		    if (!sameWord(phenotypeClass, "-1")) printf(" (%s)", phenotypeClass);
 		    }
 
 		}
 	    printf("<BR>\n");
 	    }
 	if (disorderShown) printf("</UL>\n");
     	sqlFreeResult(&sr);
 	}
 
     // show RefSeq Gene link(s)
     safef(query, sizeof(query),
-          "select distinct r.name from refLink l, mim2gene g, refGene r where l.omimId=%s and g.geneId=l.locusLinkId and g.entryType='gene' and chrom='%s' and txStart = %s and txEnd= %s",
+          "select distinct r.name from refLink l, omim2gene g, refGene r where l.omimId=%s and g.geneId=l.locusLinkId and g.entryType='gene' and chrom='%s' and txStart = %s and txEnd= %s",
 	  itemName, chrom, chromStart, chromEnd);
     sr = sqlMustGetResult(conn, query);
     if (sr != NULL)
 	{
 	int printedCnt;
 	printedCnt = 0;
 	while ((row = sqlNextRow(sr)) != NULL)
 	    {
 	    if (printedCnt < 1)
 		printf("<B>RefSeq Gene(s): </B>");
 	    else
 		printf(", ");
     	    printf("<A HREF=\"%s%s&o=%s&t=%s\">", "../cgi-bin/hgc?g=refGene&i=", row[0], chromStart, chromEnd);
     	    printf("%s</A></B>", row[0]);
 	    printedCnt++;
 	    }
         if (printedCnt >= 1) printf("<BR>\n");
 	}
     sqlFreeResult(&sr);
 
     // show Related UCSC Gene links
     safef(query, sizeof(query),
-          "select distinct kgId from kgXref x, refLink l, mim2gene g where x.refseq = mrnaAcc and l.omimId=%s and g.omimId=l.omimId and g.entryType='gene'",
+          "select distinct kgId from kgXref x, refLink l, omim2gene g where x.refseq = mrnaAcc and l.omimId=%s and g.omimId=l.omimId and g.entryType='gene'",
 	  itemName);
     sr = sqlMustGetResult(conn, query);
     if (sr != NULL)
 	{
 	int printedCnt;
 	printedCnt = 0;
 	while ((row = sqlNextRow(sr)) != NULL)
 	    {
 	    if (printedCnt < 1)
 		printf("<B>Related UCSC Gene(s): </B>");
 	    else
 		printf(", ");
     	    printf("<A HREF=\"%s%s&hgg_chrom=none\">", "../cgi-bin/hgGene?hgg_gene=", row[0]);
     	    printf("%s</A></B>", row[0]);
 	    printedCnt++;
@@ -9797,34 +9800,37 @@
     if (row != NULL)
     	{
 	if (row[0] != NULL)
 	    {
 	    title1 = cloneString(row[0]);
     	    printf(": %s", title1);
 	    }
 	if (row[1] != NULL)
 	    {
 	    title2 = cloneString(row[1]);
     	    printf(" %s ", title2);
 	    }
 	}
     sqlFreeResult(&sr);
 
+    // disable NCBI link until they work it out with OMIM
+    /*
     printf("<BR>\n");
     printf("<B>OMIM page at NCBI: ");
     printf("<A HREF=\"%s%s\" target=_blank>", ncbiOmimUrl, itemName);
     printf("%s</A></B><BR>", itemName);
+    */
 
     printf("<B>Location: </B>");
     safef(query, sizeof(query),
     	  "select location from omimGeneMap where omimId=%s;", itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL)
     	{
 	if (row[0] != NULL)
 	    {
 	    char *locStr;
 	    locStr= cloneString(row[0]);
     	    printf("%s\n", locStr);
 	    }
 	}
@@ -10037,34 +10043,37 @@
 	avDesc = cloneString(row[3]);
 	}
     sqlFreeResult(&sr);
 
     printf("<B>OMIM Allelic Variant: ");
     printf("<A HREF=\"%s%s\" target=_blank>", url, avString);
     printf("%s</A></B>", avId);
     printf(" %s", avDesc);
 
     printf("<BR><B>OMIM page at omim.org: ");
     printf("<A HREF=\"%s%s\" target=_blank>", url, itemName);
     printf("%s</A></B>", itemName);
     if (title1 != NULL) printf(": %s", title1);
     if (title2 != NULL) printf(" %s ", title2);
 
+    // disable NCBI link until they work it out with OMIM
+    /*
     printf("<BR>\n");
     printf("<B>OMIM page at NCBI: ");
     printf("<A HREF=\"%s%s\" target=_blank>", ncbiOmimUrl, itemName);
     printf("%s</A></B><BR>", itemName);
+    */
 
     safef(query, sizeof(query),
     	  "select replStr from omimAvRepl where avId=%s;", avId);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL)
     	{
 	if (row[0] != NULL)
 	    {
 	    char *replStr;
 	    char *chp;
 	    replStr= cloneString(row[0]);
 
     	    // just take the first AA replacement if there are multiple
 	    chp = strstr(replStr, ",");