a44421a79fb36cc2036fe116b97ea3bc9590cd0c
braney
Fri Dec 2 09:34:39 2011 -0800
removed rcsid (#295)
diff --git src/hg/hgGene/localization.c src/hg/hgGene/localization.c
index 6c33d7b..2179c66 100644
--- src/hg/hgGene/localization.c
+++ src/hg/hgGene/localization.c
@@ -1,141 +1,140 @@
/* localization - info/predictions from various sources about protein
* localization in cellular compartments */
#include "common.h"
#include "hash.h"
#include "linefile.h"
#include "dystring.h"
#include "spDb.h"
#include "hgGene.h"
-static char const rcsid[] = "$Id: localization.c,v 1.2 2005/12/08 19:02:56 fanhsu Exp $";
static boolean localizationExists(struct section *section,
struct sqlConnection *conn, char *geneId)
/* Return TRUE if localization and existance tables exist and have something
* on this one. */
{
char query[256];
/* mitopred - prediction of nuclear-encoded mitochondrial proteins */
if (swissProtAcc != NULL && sqlTablesExist(conn, "mitopred"))
{
safef(query, sizeof(query),
"select count(*) from mitopred where name = '%s' or name = '%s'",
swissProtAcc, spAnyAccToId(spConn, swissProtAcc));
if (sqlQuickNum(conn, query) > 0)
return TRUE;
}
/* SGD (Sacchromyces Genome Database) localization & abundance data */
if (sqlTablesExist(conn, "sgdLocalization sgdAbundance"))
{
safef(query, sizeof(query),
"select count(*) from sgdLocalization where name = '%s'", geneId);
if (sqlQuickNum(conn, query) > 0)
return TRUE;
safef(query, sizeof(query),
"select count(*) from sgdAbundance where name = '%s'", geneId);
if (sqlQuickNum(conn, query) > 0)
return TRUE;
}
return FALSE;
}
static void localizationPrint(struct section *section,
struct sqlConnection *conn, char *geneId)
/* Print out localization and abundance links. */
{
char query[256], **row, *s = NULL;
struct sqlResult *sr;
boolean firstTime = TRUE;
/* mitopred - prediction of nuclear-encoded mitochondrial proteins */
if (swissProtAcc != NULL && sqlTablesExist(conn, "mitopred"))
{
safef(query, sizeof(query),
"select confidence from mitopred where name = '%s' or name = '%s'",
swissProtAcc, spAnyAccToId(spConn, swissProtAcc));
sr = sqlGetResult(conn, query);
firstTime = TRUE;
while ((row = sqlNextRow(sr)) != NULL)
{
if (firstTime)
{
hPrintf("Mitopred: mitochondrion, confidence level: ");
firstTime = FALSE;
}
else
{
hPrintf(", ");
}
hPrintf("%s", row[0]);
}
sqlFreeResult(&sr);
if (!firstTime)
{
hPrintf("
");
hPrintf("Prediction of nuclear-encoded mitochondrial proteins from "
"Guda et al., Bioinformatics. 2004 Jul 22;20(11):1785-94.
"
"For more information see "
""
"http://mitopred.sdsc.edu/.
");
}
}
/* SGD (Sacchromyces Genome Database) localization & abundance data */
if (sqlTablesExist(conn, "sgdLocalization sgdAbundance"))
{
safef(query, sizeof(query),
"select value from sgdLocalization where name = '%s'", geneId);
sr = sqlGetResult(conn, query);
firstTime = TRUE;
while ((row = sqlNextRow(sr)) != NULL)
{
if (firstTime)
{
hPrintf("SGD Localization: ");
firstTime = FALSE;
}
else
{
hPrintf(", ");
}
hPrintf("%s", row[0]);
}
sqlFreeResult(&sr);
if (!firstTime)
{
hPrintf("
");
}
safef(query, sizeof(query),
"select abundance from sgdAbundance where name = '%s'", geneId);
s = sqlQuickString(conn, query);
if (s != NULL)
{
hPrintf("SGD Abundance: %s (range from 41 to 1590000)
\n",
s);
freez(&s);
}
hPrintf("Protein localization data from "
"Huh et al. (2003), Nature 425:686-691
"
"Protein abundance data from "
"Ghaemmaghami et al. (2003) Nature 425:737-741
"
"For more information see "
""
"http://yeastgfp.yeastgenome.org.");
}
}
struct section *localizationSection(struct sqlConnection *conn,
struct hash *sectionRa)
/* Create Localization section. */
{
struct section *section = sectionNew(sectionRa, "localization");
if (section != NULL)
{
section->exists = localizationExists;
section->print = localizationPrint;
}
return section;
}