src/hg/instinct/hgBamBam/hgBamBam.c 1.6
1.6 2010/06/01 03:45:09 jsanborn
minor updtae
Index: src/hg/instinct/hgBamBam/hgBamBam.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgBamBam/hgBamBam.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 4 -r1.5 -r1.6
--- src/hg/instinct/hgBamBam/hgBamBam.c 31 May 2010 22:07:03 -0000 1.5
+++ src/hg/instinct/hgBamBam/hgBamBam.c 1 Jun 2010 03:45:09 -0000 1.6
@@ -160,10 +160,10 @@
float minVal = 0;
float tmpMax = 0;
struct bed *bed = getBed(conn, tableName, pos, 4, &minVal, &tmpMax);
-//if (maxVal == FLOAT_NULL)
-maxVal = tmpMax;
+if (maxVal == FLOAT_NULL)
+ maxVal = tmpMax;
struct settings *settings = initSettings(conn, pos, title, width, height, 0.0, maxVal);
char *filename = copyNumberGif(conn, bed, settings, suffix, 0.0, col);
@@ -360,11 +360,16 @@
return;
struct json *js = newJson();
float maxVal = FLOAT_NULL;
-maxVal = drawCopy(conn, js, pos, width, height, name, "cnv", "Overall Copy Number", FLOAT_NULL, 0.0, MG_BLACK);
-drawCopy(conn, js, pos, width, height, name, "major", "Majority Copy Number", maxVal, 0.0, MG_RED);
-drawCopy(conn, js, pos, width, height, name, "minor", "Minority Copy Number", maxVal, 0.0, MG_BLUE);
+drawCopy(conn, js, pos, width, height, name,
+ "cnv", "Overall Copy Number", FLOAT_NULL, 0.0, MG_BLACK);
+
+/* set max val according to majority copy number */
+maxVal = drawCopy(conn, js, pos, width, height, name,
+ "major", "Majority Copy Number", maxVal, 0.0, MG_RED);
+drawCopy(conn, js, pos, width, height, name,
+ "minor", "Minority Copy Number", maxVal, 0.0, MG_BLUE);
drawSNPs(conn, js, pos, width, name, "snps");
drawInterBreaks(conn, js, pos, width, name, "breaks");
drawIntraBreaks(conn, js, pos, width, name, "breaks");
@@ -419,9 +424,10 @@
else
{
char cmd[1024];
safef(cmd, sizeof(cmd),
- "echo 'User %s wanted you to check out:\n\n%s\n\nThank you!' | mail -s \"UCSC BamBam Browser link\" -c %s %s",
+ "echo 'User %s wanted you to check out:\n\n%s\n\nCourtesy of the UCSC BamBam Browser.'"
+ "| mail -s \"UCSC BamBam Browser link\" -c %s %s",
emailFrom, link, emailFrom, emailTo);
int result = system(cmd);
if (result == -1)