706c8c2b49fcbd941c9da43c1b8a950c0c33f5ba
galt
Mon Feb 10 23:54:13 2014 -0800
now converting hgsid and hguid to strings. when the hgsid cart var or hguid cookie is not found it returns NULL instead of 0.
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index a986afc..857817d 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -13895,31 +13895,31 @@
hFreeConn(&conn1);
}
void doStsMapMouse(struct trackDb *tdb, char *marker)
/* Respond to click on an STS marker. */
{
char *table = tdb->table;
char title[256];
char query[256];
struct sqlConnection *conn = hAllocConn(database);
struct sqlConnection *conn1 = hAllocConn(database);
struct sqlResult *sr = NULL, *sr1 = NULL;
char **row;
int start = cartInt(cart, "o");
int end = cartInt(cart, "t");
-int hgsid = cartSessionId(cart);
+char *hgsid = cartSessionId(cart);
struct stsMapMouse stsRow;
struct stsInfoMouse *infoRow;
char stsid[20];
int i;
struct psl *pslList = NULL, *psl;
int pslStart;
/* Print out non-sequence info */
safef(title, sizeof title, "STS Marker %s", marker);
cartWebStart(cart, database, "%s", title);
/* Find the instance of the object in the bed table */
sqlSafef(query, sizeof query, "SELECT * FROM %s WHERE name = '%s' "
"AND chrom = '%s' AND chromStart = %d "
"AND chromEnd = %d",
@@ -13995,59 +13995,59 @@
if (stsRow.score == 1000)
printf("
This is the only location found for %s
\n",marker);
else
{
sqlFreeResult(&sr);
printf("Other locations found for %s in the genome:
\n", marker);
printf("\n");
sqlSafef(query, sizeof query, "SELECT * FROM %s WHERE name = '%s' "
"AND (chrom != '%s' OR chromStart != %d OR chromEnd != %d)",
table, marker, seqName, start, end);
sr = sqlGetResult(conn,query);
while ((row = sqlNextRow(sr)) != NULL)
{
stsMapMouseStaticLoad(row, &stsRow);
- printf("%s: | %d |
\n",
+ printf("%s: | %d |
\n",
stsRow.chrom, hgsid, stsRow.chromStart,stsRow.chromEnd, stsRow.name, stsRow.chrom,(stsRow.chromStart+stsRow.chromEnd)>>1);
}
printf("
\n");
}
}
webNewSection("Notes:");
printTrackHtml(tdb);
sqlFreeResult(&sr);
hFreeConn(&conn);
hFreeConn(&conn1);
}
void doStsMapMouseNew(struct trackDb *tdb, char *marker)
/* Respond to click on an STS marker. */
{
char *table = tdb->table;
char title[256];
char query[256];
char query1[256];
struct sqlConnection *conn = hAllocConn(database);
struct sqlConnection *conn1 = hAllocConn(database);
struct sqlResult *sr = NULL, *sr1 = NULL, *sr2 = NULL;
char **row;
int start = cartInt(cart, "o");
int end = cartInt(cart, "t");
-int hgsid = cartSessionId(cart);
+char *hgsid = cartSessionId(cart);
struct stsMapMouseNew stsRow;
struct stsInfoMouseNew *infoRow;
char stsid[20];
char stsPrimer[40];
char stsClone[45];
int i;
struct psl *pslList = NULL, *psl;
int pslStart;
char sChar='%';
/* Print out non-sequence info */
safef(title, sizeof title, "STS Marker %s\n", marker);
/* safef(title, sizeof title, "STS Marker %s\n", marker, marker); */
cartWebStart(cart, database, "%s", title);
@@ -14181,60 +14181,60 @@
if (stsRow.score == 1000)
printf("This is the only location found for %s
\n",marker);
else
{
sqlFreeResult(&sr);
printf("Other locations found for %s in the genome:
\n", marker);
printf("\n");
sqlSafef(query, sizeof query, "SELECT * FROM %s WHERE name = '%s' "
"AND (chrom != '%s' OR chromStart != %d OR chromEnd != %d)",
table, marker, seqName, start, end);
sr = sqlGetResult(conn,query);
while ((row = sqlNextRow(sr)) != NULL)
{
stsMapMouseNewStaticLoad(row, &stsRow);
- printf("%s: | | %s: | %d |
\n",
stsRow.chrom, hgsid, stsRow.chromStart,stsRow.chromEnd, stsRow.name,
stsRow.chrom,(stsRow.chromStart+stsRow.chromEnd)>>1);
}
printf("
\n");
}
}
webNewSection("Notes:");
printTrackHtml(tdb);
sqlFreeResult(&sr);
hFreeConn(&conn);
hFreeConn(&conn1);
}
void doStsMapRat(struct trackDb *tdb, char *marker)
/* Respond to click on an STS marker. */
{
char *table = tdb->table;
char title[256];
char query[256];
char query1[256];
struct sqlConnection *conn = hAllocConn(database);
struct sqlConnection *conn1 = hAllocConn(database);
struct sqlResult *sr = NULL, *sr1 = NULL, *sr2 = NULL;
char **row;
int start = cartInt(cart, "o");
int end = cartInt(cart, "t");
-int hgsid = cartSessionId(cart);
+char *hgsid = cartSessionId(cart);
struct stsMapRat stsRow;
struct stsInfoRat *infoRow;
char stsid[20];
char stsPrimer[40];
char stsClone[45];
int i;
struct psl *pslList = NULL, *psl;
int pslStart;
boolean hasBin = FALSE;
/* Print out non-sequence info */
safef(title, sizeof title, "STS Marker %s", marker);
cartWebStart(cart, database, "%s", title);
/* Find the instance of the object in the bed table */
@@ -14361,31 +14361,31 @@
htmlHorizontalLine();
if (stsRow.score == 1000)
printf("This is the only location found for %s
\n",marker);
else
{
sqlFreeResult(&sr);
printf("Other locations found for %s in the genome:
\n", marker);
printf("\n");
sqlSafefFrag(query, sizeof(query), "name = '%s'", marker);
sr = hRangeQuery(conn, table, seqName, start, end, query, &hasBin);
while ((row = sqlNextRow(sr)) != NULL)
{
stsMapRatStaticLoad(row+hasBin, &stsRow);
- printf("%s: | %d |
\n",
+ printf("%s: | %d |
\n",
stsRow.chrom, hgsid, stsRow.chromStart,stsRow.chromEnd, stsRow.name, stsRow.chrom,(stsRow.chromStart+stsRow.chromEnd)>>1);
}
printf("
\n");
}
}
webNewSection("Notes:");
printTrackHtml(tdb);
sqlFreeResult(&sr);
hFreeConn(&conn);
hFreeConn(&conn1);
}
void doFishClones(struct trackDb *tdb, char *clone)
/* Handle click on the FISH clones track */
{