From: <tr...@us...> - 2002-09-30 21:13:14
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv24108 Modified Files: array.inc.php bioassay.inc.php bioassayset.inc.php genelist.inc.php misc.inc.php molecule.inc.php plate.inc.php probe_search.phtml search.inc.php searchhtml.inc.php Log Message: Removed 1-byte length prefix from Molecule.cloneId Index: array.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/array.inc.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** array.inc.php 10 Sep 2002 23:04:36 -0000 1.37 --- array.inc.php 30 Sep 2002 21:13:09 -0000 1.38 *************** *** 487,492 **** $y = (int)$y; ! $query = "SELECT e.id, p.molecule, ". ! "SUBSTRING(m.`cloneId`, 2) AS `cloneId` ". "FROM Element e, Well w, Probe p, Molecule m ". "WHERE e.`arrayType` = $arrayType AND e.block = $block ". --- 487,491 ---- $y = (int)$y; ! $query = "SELECT e.id, p.molecule, m.`cloneId` ". "FROM Element e, Well w, Probe p, Molecule m ". "WHERE e.`arrayType` = $arrayType AND e.block = $block ". *************** *** 504,509 **** $arrayType = (int)$arrayType; ! $query = "SELECT e.block, e.x, e.y, ". ! "SUBSTRING(m.`cloneId`, 2) AS `cloneId`, m.`geneName` ". "FROM Element e, Well w, Probe p, Molecule m ". "WHERE e.`arrayType` = $arrayType AND w.id = e.well AND ". --- 503,507 ---- $arrayType = (int)$arrayType; ! $query = "SELECT e.block, e.x, e.y, m.`cloneId`, m.`geneName` ". "FROM Element e, Well w, Probe p, Molecule m ". "WHERE e.`arrayType` = $arrayType AND w.id = e.well AND ". Index: bioassay.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassay.inc.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** bioassay.inc.php 12 Sep 2002 11:45:25 -0000 1.39 --- bioassay.inc.php 30 Sep 2002 21:13:10 -0000 1.40 *************** *** 445,449 **** $ecol = $search->getExtraColumnExpressions(); ! $query = "SELECT SUBSTRING(m.`cloneId`, 2) AS `cloneId`, m.`geneName`, ". "bad.intensity1 AS i1, bad.intensity2 AS i2, bad.ratio, ". "m.species, m.`clusterId`, bad.molecule, bad.position AS position, ". --- 445,449 ---- $ecol = $search->getExtraColumnExpressions(); ! $query = "SELECT m.`cloneId`, m.`geneName`, ". "bad.intensity1 AS i1, bad.intensity2 AS i2, bad.ratio, ". "m.species, m.`clusterId`, bad.molecule, bad.position AS position, ". *************** *** 684,688 **** "intensity1" => "AVG(bad.intensity1) AS intensity1", "intensity2" => "AVG(bad.intensity2) AS intensity2", ! "cloneId" => "SUBSTRING(m.`cloneId`, 2) AS `cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", --- 684,688 ---- "intensity1" => "AVG(bad.intensity1) AS intensity1", "intensity2" => "AVG(bad.intensity2) AS intensity2", ! "cloneId" => "m.`cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", *************** *** 710,714 **** "intensity1" => "bad.intensity1", "intensity2" => "bad.intensity2", ! "cloneId" => "SUBSTRING(m.`cloneId`, 2) AS `cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", --- 710,714 ---- "intensity1" => "bad.intensity1", "intensity2" => "bad.intensity2", ! "cloneId" => "m.`cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", Index: bioassayset.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/bioassayset.inc.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** bioassayset.inc.php 10 Sep 2002 23:04:54 -0000 1.28 --- bioassayset.inc.php 30 Sep 2002 21:13:10 -0000 1.29 *************** *** 395,399 **** $fieldsql = array( "position" => "0 AS position", ! "cloneId" => "SUBSTRING(m.`cloneId`, 2) AS `cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", --- 395,399 ---- $fieldsql = array( "position" => "0 AS position", ! "cloneId" => "m.`cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", *************** *** 408,412 **** $fieldsql = array( "position" => "sg.position", ! "cloneId" => "SUBSTRING(m.`cloneId`, 2) AS `cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", --- 408,412 ---- $fieldsql = array( "position" => "sg.position", ! "cloneId" => "m.`cloneId`", "clusterId" => "m.`clusterId`", "species" => "m.species", *************** *** 548,554 **** $ob = BioAssaySet::geneSearchSortOrder($search, true); $ecol = $search->getExtraColumnExpressions(); ! $sel = "m.id, SUBSTRING(m.`cloneId`, 2) AS `cloneId`, ". ! "m.`geneName`, m.`clusterId`, m.species, sg.cnt"; ! if(!$average) $sel .= ", sg.position"; $table = $average ? "$config[dbDynamic]BioAssaySetGene" : --- 548,555 ---- $ob = BioAssaySet::geneSearchSortOrder($search, true); $ecol = $search->getExtraColumnExpressions(); ! $sel = "m.id, m.`cloneId`, m.`geneName`, m.`clusterId`, ". ! "m.species, sg.cnt"; ! if(!$average) ! $sel .= ", sg.position"; $table = $average ? "$config[dbDynamic]BioAssaySetGene" : Index: genelist.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/genelist.inc.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** genelist.inc.php 11 Sep 2002 09:02:04 -0000 1.23 --- genelist.inc.php 30 Sep 2002 21:13:10 -0000 1.24 *************** *** 342,347 **** function getGenesBrief() { ! $query = "SELECT SUBSTRING(m.`cloneId`, 2) AS `cloneId`, ". ! "glg.score, m.`geneName` ". "FROM GeneListGene glg, Molecule m ". "WHERE glg.`geneList` = $this->id AND m.id = glg.molecule ". --- 342,346 ---- function getGenesBrief() { ! $query = "SELECT m.`cloneId`, glg.score, m.`geneName` ". "FROM GeneListGene glg, Molecule m ". "WHERE glg.`geneList` = $this->id AND m.id = glg.molecule ". Index: misc.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/misc.inc.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** misc.inc.php 30 Sep 2002 08:26:44 -0000 1.39 --- misc.inc.php 30 Sep 2002 21:13:10 -0000 1.40 *************** *** 43,47 **** { if(strlen($txt) > $len) ! return substr($txt, 0, $len).$etc; else return $txt; --- 43,47 ---- { if(strlen($txt) > $len) ! return substr($txt, 0, $len - strlen($etc)).$etc; else return $txt; Index: molecule.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/molecule.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** molecule.inc.php 30 Sep 2002 08:26:44 -0000 1.34 --- molecule.inc.php 30 Sep 2002 21:13:10 -0000 1.35 *************** *** 27,43 **** require_once("genelist.inc.php"); ! // The maximum cloneId length requires a bit of explanation: ! // To get a reasonable sort order for both numbers and strings, ! // the cloneId has its length prepended when it's stored in the ! // database. This length is stored in the simplest possible way - ! // as the ascii value of a single character. Because we want ! // case insensitivity in the cloneId, there will be problems with ! // the sort order if the character gets into the range of lowercase ! // letters, and since 'a' has ascii value 97, we limit the cloneId [...258 lines suppressed...] return $arr; } --- 626,631 ---- $res = query($query); $arr = array(); ! while($row =& db_fetch_row($res)) ! $arr[] = (int)$row[0]; return $arr; } *************** *** 689,696 **** if(!($res = query($query))) return $arr; while($row =& db_fetch_assoc($res)) - { - $row["cloneId"] = substr($row["cloneId"], 1); $arr[] = $row; - } return $arr; } --- 679,683 ---- Index: plate.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/plate.inc.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** plate.inc.php 22 Sep 2002 23:37:35 -0000 1.35 --- plate.inc.php 30 Sep 2002 21:13:10 -0000 1.36 *************** *** 373,377 **** } ! $query = "SELECT w.*, SUBSTRING(s.`cloneId`, 2) AS `cloneId`, ". "s.species, s.`clusterId`, s.`geneName`, s.`geneSymbol` ". "FROM Well w, Probe p, Molecule s ". --- 373,377 ---- } ! $query = "SELECT w.*, s.`cloneId`, ". "s.species, s.`clusterId`, s.`geneName`, s.`geneSymbol` ". "FROM Well w, Probe p, Molecule s ". Index: probe_search.phtml =================================================================== RCS file: /cvsroot/basedb/basedb/www/probe_search.phtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** probe_search.phtml 12 Sep 2002 13:53:29 -0000 1.4 --- probe_search.phtml 30 Sep 2002 21:13:10 -0000 1.5 *************** *** 80,84 **** </script> <? ! Molecule::prepareSearch($search, 30); makeSearchHeader($search, $headerfields, $sortorder, $defsort, "", --- 80,84 ---- </script> <? ! Molecule::prepareSearch($search, 25); makeSearchHeader($search, $headerfields, $sortorder, $defsort, "", *************** *** 105,109 **** $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html(maxlen($s["geneName"], 40, "..."))."</td>". "</tr>\n"; } --- 105,110 ---- $s["cloneId"])."</td>". "<td>".html($s["geneSymbol"])."</td>". ! "<td>".html($oneHit ? $s["geneName"] : ! maxlen($s["geneName"], 60, "..."))."</td>". "</tr>\n"; } Index: search.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/search.inc.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** search.inc.php 12 Sep 2002 22:37:56 -0000 1.42 --- search.inc.php 30 Sep 2002 21:13:10 -0000 1.43 *************** *** 92,97 **** // Defined fieldtypes: 0 = string, 1 = date, 2 = int, 3 = float, ! // 4 = boolean, 5 = string%, 6 = %string%, 7 = genelist, 8 = 2^float, ! // 9 = cloneId, array(0=>0, n => option) = SELECT define("SEARCH_STRING", 0); --- 92,98 ---- // Defined fieldtypes: 0 = string, 1 = date, 2 = int, 3 = float, ! // 4 = boolean, 5 = string% (deprected), 6 = %string% (depr), ! // 7 = genelist, 8 = 2^float, 9 = cloneId(obsolete), ! // array(0=>0, n => option) = SELECT define("SEARCH_STRING", 0); *************** *** 967,970 **** --- 968,978 ---- } + if($type == SEARCH_CLONEID) + { + // The SEARCH_CLONEID type was a design error which I'm now removing. + // Recall that $type is a reference to $fieldtypes[$this->field]. + $type = SEARCH_STRING; + } + if($type == SEARCH_GENELIST) // Genelists are a bit special { *************** *** 1024,1030 **** else if($type == SEARCH_CLONEID) { ! $s = (string)$arr[$j]; ! $arr[$j] = chr(strlen($s)).$s; ! $view[] = $s; } else --- 1032,1039 ---- else if($type == SEARCH_CLONEID) { ! $arr[$j] = (string)$arr[$j]; ! // $s = (string)$arr[$j]; ! // $arr[$j] = chr(strlen($s)).$s; ! // $view[] = $s; } else Index: searchhtml.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/searchhtml.inc.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** searchhtml.inc.php 12 Sep 2002 11:45:26 -0000 1.41 --- searchhtml.inc.php 30 Sep 2002 21:13:10 -0000 1.42 *************** *** 32,36 **** // Defined fieldtypes: 0 = string, 1 = date, 2 = int, 3 = float, // 4 = boolean, 5 = string%, 6 = %string%, 7 = genelist, 8 = 2^float, ! // 9 = cloneId, array(0, ... ) = enum // // $userid - ID of the user for which the table is shown --- 32,36 ---- // Defined fieldtypes: 0 = string, 1 = date, 2 = int, 3 = float, // 4 = boolean, 5 = string%, 6 = %string%, 7 = genelist, 8 = 2^float, ! // 9 = cloneId(obsolete), array(0, ... ) = enum // // $userid - ID of the user for which the table is shown |