src/hg/lib/pgSnp.c 1.7
1.7 2010/01/22 23:44:59 angie
Tweaked label of coding changes. If there are no coding changes, suppress messages about coding changes (confused me a bit).
Index: src/hg/lib/pgSnp.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/pgSnp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 4 -r1.6 -r1.7
--- src/hg/lib/pgSnp.c 3 Sep 2008 19:19:26 -0000 1.6
+++ src/hg/lib/pgSnp.c 22 Jan 2010 23:44:59 -0000 1.7
@@ -395,9 +395,8 @@
struct sqlConnection *conn = hAllocConn(db);
safef(query, sizeof(query), "select chrom, txStart, txEnd, name, 0, strand, cdsStart, cdsEnd, 0, exonCount, exonEnds, exonStarts from knownGene where chrom = '%s' and cdsStart <= %d and cdsEnd >= %d",
item->chrom, item->chromStart, item->chromEnd);
-printf("\n<BR>Coding sequence changes shown in strand matching transcript<BR>\n");
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
el = bedLoad12(row);
@@ -420,8 +419,10 @@
{
struct pgCodon *cod = fetchCodons(db, el, item->chromStart, item->chromEnd);
if (cod == NULL)
continue; /* not in exon */
+ if (found == 0)
+ printf("\n<BR>Coding sequence changes are relative to strand of transcript:<BR>\n");
found++;
if (sameString(el->strand, "-"))
reverseComplement(cod->seq, strlen(cod->seq));
/* bold changing seq */
@@ -479,10 +480,8 @@
}
}
}
}
-if (!found)
- printf("None found<BR>\n");
bedFreeList(&list);
}
char *aaPolarity (char *aa)