bd0b0a42ee56a2e20728a1e4d5002127c724e72d
tdreszer
Mon Jun 25 17:08:25 2012 -0700
Next batch of many checkins as dictated by Jim. Formatting space after if and limiting lines to 100 chars. Changes limited to lines last touched by tdreszer (git blame) so as not to ruin history. None of these changes should affect executables in any way. Only affect is to my sanity and Jim's.
diff --git src/hg/hgc/encodeClick.c src/hg/hgc/encodeClick.c
index 4edf210..22e7c9f 100644
--- src/hg/hgc/encodeClick.c
+++ src/hg/hgc/encodeClick.c
@@ -193,31 +193,32 @@
void doPeptideMapping(struct sqlConnection *conn, struct trackDb *tdb, char *item)
/* Print details for a peptideMapping track. */
{
char *chrom = cartString(cart,"c");
int start = cgiInt("o");
int end = cgiInt("t");
char query[256];
char **row;
struct sqlResult *sr;
struct peptideMapping pos;
int rowOffset = 0; // skip bin field
int found = 0;
genericHeader(tdb, NULL);
/* Just get the current item. */
-safef(query, sizeof(query), "select * from %s where name='%s' and chrom='%s' and chromStart=%d and chromEnd=%d",
+safef(query, sizeof(query),
+ "select * from %s where name='%s' and chrom='%s' and chromStart=%d and chromEnd=%d",
tdb->track, item, chrom, start, end);
sr = sqlGetResult(conn, query);
if (sqlFieldColumn(sr, "bin") == 0)
rowOffset = 1;
while ((row = sqlNextRow(sr)) != NULL)
{
++found;
peptideMappingStaticLoad(row + rowOffset, &pos);
if (found == 1)
{
printf("Item: %s
\n", pos.name);
printPos(pos.chrom, pos.chromStart, pos.chromEnd, pos.strand, TRUE, item);
@@ -237,31 +238,32 @@
webPrintIntCell(pos.peptideRank);
}
if (found == 0)
errAbort("No items in range");
webPrintLinkTableEnd();
sqlFreeResult(&sr);
/* Draw table of other locations */
printf("
\n");
printf("Peptide Repeat Count: %d
\n", pos.peptideRepeatCount);
if (pos.peptideRepeatCount > 1)
{
struct hash *hash = hashNew(8);
struct peptideMapping anotherPos;
- safef(query, sizeof(query), "select * from %s where name='%s' and not (chrom='%s' and chromStart=%d and chromEnd=%d)",
+ safef(query, sizeof(query),
+ "select * from %s where name='%s' and not (chrom='%s' and chromStart=%d and chromEnd=%d)",
tdb->track, item, chrom, start, end);
printf("
\n");
webPrintLinkTableStart();
webPrintLabelCell("Other genomic loci");
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
char s[1024];
peptideMappingStaticLoad(row + rowOffset, &anotherPos);
char k[1024];
safef(k, sizeof k, "%s.%d.%d", anotherPos.chrom, anotherPos.chromStart, anotherPos.chromEnd);
if (!hashLookup(hash, k))
{
hashAdd(hash, k, NULL);
safef(s, sizeof(s), "%s:%d-%d",