From: <tr...@us...> - 2002-09-12 11:45:29
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv27760 Modified Files: assay_plotter.phtml bioassay.inc.php experiment_plotter.phtml item.inc.php misc.inc.php raw.inc.php searchhtml.inc.php spotinfo.phtml test.phtml trans_create.phtml Log Message: added SNR to plot and filtering, plus some misc stuff Index: assay_plotter.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/assay_plotter.phtml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** assay_plotter.phtml 29 Aug 2002 16:51:33 -0000 1.7 --- assay_plotter.phtml 12 Sep 2002 11:45:25 -0000 1.8 *************** *** 61,65 **** // Limit the width and height if($format == "txt") $minmax = array(24, 97, 40, 12, 46, 25); ! else if($format == "png") $minmax = array(40, 1280, 640, 30, 960, 480); else $minmax = array(0, 1280, 640, 0, 960, 480); --- 61,65 ---- // Limit the width and height if($format == "txt") $minmax = array(24, 97, 40, 12, 46, 25); ! else if($format == "png") $minmax = array(40, 1280, 800, 30, 960, 600); else $minmax = array(0, 1280, 640, 0, 960, 480); *************** *** 88,96 **** $assayColsY = array_merge($assayColsX, array("Histogram")); $annotCols = array("(raw) Block", "(raw) Flags", "log2(ratio)", ! "Plate N", "Plate N-1"); $plotAnnot = isset($i_annot) ? max(-1, min(count($annotCols) - 1, (int)$i_annot)) : -1; ! $colorScale = $plotAnnot == 2; if(!isset($i_ploty)) $i_ploty = 0; --- 88,102 ---- $assayColsY = array_merge($assayColsX, array("Histogram")); $annotCols = array("(raw) Block", "(raw) Flags", "log2(ratio)", ! "Plate N", "Plate N-1", ! "log2 SNR(means)", "log2 SNR(medians)", ! "log2 SNR(Ch1 mean)", "log2 SNR(Ch2 mean)", ! "log2 SNR(Ch1 median)", "log2 SNR(Ch2 median)" ! ); ! $withColorScale = array(0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1); ! $withColorScale[-1] = 0; $plotAnnot = isset($i_annot) ? max(-1, min(count($annotCols) - 1, (int)$i_annot)) : -1; ! $colorScale = $withColorScale[$plotAnnot]; if(!isset($i_ploty)) $i_ploty = 0; Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** bioassay.inc.php 11 Sep 2002 10:35:12 -0000 1.38 --- bioassay.inc.php 12 Sep 2002 11:45:25 -0000 1.39 *************** *** 310,314 **** "Growth (LIMS)", "Bands (LIMS)", ! "Seq ver. (LIMS)" ); } --- 310,316 ---- "Growth (LIMS)", "Bands (LIMS)", ! "Seq ver. (LIMS)", ! "Raw SNR(Ch1 mean)", "Raw SNR(Ch2 mean)", [...113 lines suppressed...] } ! if($third == 3 || $third == 4) { $extra .= " p.name AS `C`"; *************** *** 1141,1145 **** $arr = array(); while($row =& db_fetch_row($res)) ! $arr[] = $row; return $arr; } --- 1180,1187 ---- $arr = array(); while($row =& db_fetch_row($res)) ! { ! if(isset($row[0]) && isset($row[1])) ! $arr[] = $row; ! } return $arr; } Index: experiment_plotter.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/experiment_plotter.phtml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** experiment_plotter.phtml 5 Aug 2002 11:29:33 -0000 1.11 --- experiment_plotter.phtml 12 Sep 2002 11:45:26 -0000 1.12 *************** *** 89,93 **** $rawCols = array("Mean(Mean FG)", "Mean(Mean BG)", "% flagged", "Mean(Median FG)", "Mean(Median BG)", ! "Mean(Ch1 total int.)", "Mean(Ch2 total int.)"); $rawColsX = array("Raw data sets"); $annotCols = array("Owner", "Array print", "Hybridization date"); --- 89,96 ---- $rawCols = array("Mean(Mean FG)", "Mean(Mean BG)", "% flagged", "Mean(Median FG)", "Mean(Median BG)", ! "Mean(Ch1 total int.)", "Mean(Ch2 total int.)", ! "Mean(SNR(Ch1 mean))", "Mean(SNR(Ch2 mean))", ! "Mean(SNR(Ch1 median))", "Mean(SNR(Ch2 median))" ! ); $rawColsX = array("Raw data sets"); $annotCols = array("Owner", "Array print", "Hybridization date"); *************** *** 382,387 **** else { ! fwrite($fd, "set title \"".addslashes(ereg_replace("[^[:print:]]", ! "", $annotCols[$plotAnnot].", ".$exp->getName()))."\"\n"); // Find all annotations and group the data points by them. --- 385,390 ---- else { ! fwrite($fd, "set title \"".addslashes(printable( ! $annotCols[$plotAnnot].", ".$exp->getName()))."\"\n"); // Find all annotations and group the data points by them. *************** *** 407,412 **** for(reset($rawnames); list($i, $n) = each($rawnames); ) { ! fwrite($fd, "set label \" ".addslashes(ereg_replace( ! "[^[:print:]]", "", $n))."\" at $i,0 $justify rotate\n"); } --- 410,415 ---- for(reset($rawnames); list($i, $n) = each($rawnames); ) { ! fwrite($fd, "set label \" ".addslashes(printable($n)). ! "\" at $i,0 $justify rotate\n"); } *************** *** 417,421 **** if($ann == "") $ann = "not annotated"; fwrite($fd, ($f ? "plot" : ",")." '-' title \"". ! addslashes(ereg_replace("[^[:print:]]", "", $ann))."\""); } fwrite($fd, "\n"); --- 420,424 ---- if($ann == "") $ann = "not annotated"; fwrite($fd, ($f ? "plot" : ",")." '-' title \"". ! addslashes(printable($ann))."\""); } fwrite($fd, "\n"); Index: item.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/item.inc.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** item.inc.php 10 Sep 2002 23:05:33 -0000 1.28 --- item.inc.php 12 Sep 2002 11:45:26 -0000 1.29 *************** *** 32,38 **** class Item { ! var $type, $id, $name, $descr, $owner, $addedDate, $visible; ! function Item($type, $name, $descr, $owner, $addedDate, $id, $visible = 1) { $this->type = $type; --- 32,39 ---- class Item { [...81 lines suppressed...] ! } else { $query = "SELECT i.* FROM $this->type i, Shared$this->type s ". ! "WHERE s.item = i.id AND s.owner IN (0, $owner) ". ! "AND i.id = $id ". ! $this->sqlRemoved("i", $removed); } return $this->readQuery($query); } ! function readOwned($id, $owner, $removed = NULL) { $id = (int)$id; $owner = (int)$owner; $query = "SELECT i.* FROM $this->type i ". ! "WHERE i.owner = $owner AND i.id = $id ". ! $this->sqlRemoved("i", $removed); return $this->readQuery($query); } Index: misc.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/misc.inc.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** misc.inc.php 10 Sep 2002 23:06:00 -0000 1.36 --- misc.inc.php 12 Sep 2002 11:45:26 -0000 1.37 *************** *** 85,88 **** --- 85,90 ---- else { + // A Location header must have an absolute path. There will + // be no violation of the HTTP standard on my watch. if($url == "" || substr($url, 0, 1) != "/") $url = $config["urlpath"].$url; Index: raw.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/raw.inc.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** raw.inc.php 10 Sep 2002 23:06:28 -0000 1.38 --- raw.inc.php 12 Sep 2002 11:45:26 -0000 1.39 *************** *** 706,710 **** $arr = array(); while($row =& db_fetch_row($res)) ! $arr[] = $row; return $arr; } --- 706,713 ---- $arr = array(); while($row =& db_fetch_row($res)) ! { ! if(isset($row[0]) && isset($row[1])) ! $arr[] = $row; ! } return $arr; } *************** *** 716,719 **** --- 719,723 ---- // 3 = mean median fg, 4 = mean median bg, // 5 = mean ch1 int., 6 = mean ch2 int. + // 7-10 = mean SNR(ch[1/2] [mean/median]) // fg and bg are (ch1 fg + ch2 fg) etc. // $grouping: -1 = none, 0 = user name, 1 = print name, 2 = hybe day *************** *** 721,730 **** { $expid = (int)$expid; ! $what = max(0, min(6, (int)$what)); $grouping = max(-1, min(2, (int)$grouping)); if($what != 2) { ! $whats = array("rbad.`FCh1Mean`+rbad.`FCh2Mean`", "rbad.`BCh1Mean`+rbad.`BCh2Mean`", "", --- 725,735 ---- { $expid = (int)$expid; ! $what = max(0, min(10, (int)$what)); $grouping = max(-1, min(2, (int)$grouping)); if($what != 2) { ! $whats = array( ! "rbad.`FCh1Mean`+rbad.`FCh2Mean`", "rbad.`BCh1Mean`+rbad.`BCh2Mean`", "", *************** *** 732,736 **** "rbad.`BCh1Median`+rbad.`BCh2Median`", "rbad.`FCh1Mean`*rbad.`FPixels`", ! "rbad.`FCh2Mean`*rbad.`FPixels`"); $wot = "AVG($whats[$what]), STDDEV($whats[$what]+0.0)*". "SQRT(COUNT(*)/(COUNT(*)+1.0))"; --- 737,746 ---- "rbad.`BCh1Median`+rbad.`BCh2Median`", "rbad.`FCh1Mean`*rbad.`FPixels`", ! "rbad.`FCh2Mean`*rbad.`FPixels`", ! "(rbad.`FCh1Mean`-rbad.`BCh1Mean`) / rbad.`BCh1SD`", ! "(rbad.`FCh2Mean`-rbad.`BCh2Mean`) / rbad.`BCh2SD`", ! "(rbad.`FCh1Median`-rbad.`BCh1Median`) rbad.`BCh1SD`", ! "(rbad.`FCh2Median`-rbad.`BCh2Median`) / rbad.`BCh2SD`" ! ); $wot = "AVG($whats[$what]), STDDEV($whats[$what]+0.0)*". "SQRT(COUNT(*)/(COUNT(*)+1.0))"; *************** *** 747,751 **** "WHERE rbad.`rawBioAssay` = r.id AND r.id = pr.`rawBioAssay` ". "AND pr.experiment = $expid GROUP BY name, id ORDER BY name"; - $res = query($query); $arr = array(); --- 757,760 ---- Index: searchhtml.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/searchhtml.inc.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** searchhtml.inc.php 10 Sep 2002 23:06:30 -0000 1.40 --- searchhtml.inc.php 12 Sep 2002 11:45:26 -0000 1.41 *************** *** 280,284 **** } ! if(!$noform) echo "<form method=post action='$PHP_SELF'>\n"; echo "<tr><th>".webHelp(87)." Field</th><th>Op</th>". --- 280,285 ---- } ! if(!$noform) ! echo "<form method=post action='$PHP_SELF'>\n"; echo "<tr><th>".webHelp(87)." Field</th><th>Op</th>". Index: spotinfo.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/spotinfo.phtml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** spotinfo.phtml 5 Aug 2002 11:19:01 -0000 1.9 --- spotinfo.phtml 12 Sep 2002 11:45:26 -0000 1.10 *************** *** 69,76 **** function sigNoise(&$v, &$e1, &$e2) { ! if($v === false || ($e1 === false && $e2 === false)) return "-"; ! if($e1 === false) $noise = $e2; else if($e2 === false) $noise = $e1; ! else $noise = sqrt($e1*$e1 + $e2*$e2); if($noise == 0) return "inf"; return sprintf("%.2f", $v / $noise); --- 69,77 ---- function sigNoise(&$v, &$e1, &$e2) { ! if($v === false || (/*$e1 === false &&*/ $e2 === false)) return "-"; ! /* if($e1 === false) $noise = $e2; else if($e2 === false) $noise = $e1; ! else $noise = sqrt($e1*$e1 + $e2*$e2);*/ ! $noise =& $e2; if($noise == 0) return "inf"; return sprintf("%.2f", $v / $noise); Index: test.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/test.phtml,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** test.phtml 7 Sep 2002 11:36:32 -0000 1.47 --- test.phtml 12 Sep 2002 11:45:26 -0000 1.48 *************** *** 26,32 **** header("content-type: text/plain"); require_once("init.inc.php"); ! echo "Testing db...\n"; ob_implicit_flush(1); $s = array(0, 0, 0); --- 26,35 ---- header("content-type: text/plain"); + echo "old PHP_SELF: $_SERVER[PHP_SELF]\n"; require_once("init.inc.php"); ! echo "new PHP_SELF: $PHP_SELF\n"; ! ! /*echo "Testing db...\n"; ob_implicit_flush(1); $s = array(0, 0, 0); *************** *** 71,75 **** echo "db_fetch_assoc2: $s[1] s\n"; echo "&db_fetch_assoc2: $s[2] s\n"; ! ?> --- 74,78 ---- echo "db_fetch_assoc2: $s[1] s\n"; echo "&db_fetch_assoc2: $s[2] s\n"; ! */ ?> Index: trans_create.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/trans_create.phtml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** trans_create.phtml 10 Sep 2002 23:06:30 -0000 1.25 --- trans_create.phtml 12 Sep 2002 11:45:26 -0000 1.26 *************** *** 242,246 **** ob_implicit_flush(0); echo "<p>\n"; ! if($err != "") echo "<span class=red>Error: <?= $err ?></span><p>\n"; ?> <a class=large href="<?= html($location, 0) ?>">Return to BASE</a> --- 242,247 ---- ob_implicit_flush(0); echo "<p>\n"; ! if($err != "") ! echo "<span class=red>Error: $err</span><p>\n"; ?> <a class=large href="<?= html($location, 0) ?>">Return to BASE</a> |