8400ed03df6eace33018c9acc6f4b95abfcecfc8
braney
Wed Jun 19 12:03:08 2013 -0700
fix link-out to bioCyc
diff --git src/hg/hgGene/pathways.c src/hg/hgGene/pathways.c
index 7f5114b..0910d23 100644
--- src/hg/hgGene/pathways.c
+++ src/hg/hgGene/pathways.c
@@ -78,45 +78,47 @@
else
{
sqlSafef(query, sizeof(query),
"select count(*) from rgdGene2KeggPathway k, rgdGene2 x where k.rgdId=x.name and x.name='%s'", geneId);
}
return sqlQuickNum(conn, query);
}
static void bioCycLink(struct pathwayLink *pl, struct sqlConnection *conn,
char *geneId)
/* Print out bioCyc database link. */
{
char query[512], **row;
struct sqlResult *sr;
char *oldMapId = cloneString("");
+char *upperCaseGenome = cloneString(genome);
+toUpperN(upperCaseGenome, strlen(upperCaseGenome));
sqlSafef(query, sizeof(query),
"select bioCycPathway.mapId,description"
" from bioCycPathway,bioCycMapDesc"
" where bioCycPathway.kgId='%s'"
" and bioCycPathway.mapId = bioCycMapDesc.mapId order by bioCycPathway.mapId"
, geneId);
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
/* only print new ones */
if (!sameWord(oldMapId, row[0]))
{
hPrintf("",
- genome, row[0]);
+ upperCaseGenome, row[0]);
hPrintf("%s - %s
\n", row[0], row[1]);
}
oldMapId = cloneString(row[0]);
}
sqlFreeResult(&sr);
}
static int bioCycCount(struct pathwayLink *pl, struct sqlConnection *conn,
char *geneId)
/* Count up number of hits. */
{
char query[256];
sqlSafef(query, sizeof(query),
"select count(*) from bioCycPathway where kgID='%s'", geneId);
return sqlQuickNum(conn, query);