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("
\n");
printf("OMIM page at NCBI: ");
printf("", ncbiOmimUrl, itemName);
printf("%s
", 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("
\n");
}
if (disorderShown) printf("\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("RefSeq Gene(s): ");
else
printf(", ");
printf("", "../cgi-bin/hgc?g=refGene&i=", row[0], chromStart, chromEnd);
printf("%s", row[0]);
printedCnt++;
}
if (printedCnt >= 1) printf("
\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("Related UCSC Gene(s): ");
else
printf(", ");
printf("", "../cgi-bin/hgGene?hgg_gene=", row[0]);
printf("%s", 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("
\n");
printf("OMIM page at NCBI: ");
printf("", ncbiOmimUrl, itemName);
printf("%s
", itemName);
+ */
printf("Location: ");
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("OMIM Allelic Variant: ");
printf("", url, avString);
printf("%s", avId);
printf(" %s", avDesc);
printf("
OMIM page at omim.org: ");
printf("", url, itemName);
printf("%s", itemName);
if (title1 != NULL) printf(": %s", title1);
if (title2 != NULL) printf(" %s ", title2);
+ // disable NCBI link until they work it out with OMIM
+ /*
printf("
\n");
printf("OMIM page at NCBI: ");
printf("", ncbiOmimUrl, itemName);
printf("%s
", 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, ",");