<html>
<head>
<title>ANISEED - Find Ciona intestinalis cells by their shapes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="This page allows to search Ciona intestinalis 3D Virtual Embryo data to identify cells of a given shape. The values of all shape descriptors are displayed (cell volume, cell surface, sphericity, convexity, elongation, flatness, squareness, entropy, surface/volume ratio and cell volume/embryo volume).">
<meta name="keywords" content="Shape descriptor, cell volume, cell surface, sphericity, convexity, elongation, flatness, squareness, entropy, Ciona intestinalis, Halocynthia roretzi, Aniseed, Ciona intestinalis database, geometry, virtual embryo, cell shape, 3D embryo, geometry, Daian, Dauga, Sobral.">
<meta name = "robots" content = "index, follow, all">
<META HTTP-EQUIV="Content-Language" CONTENT="EN">
<style type="text/css">
</style>
</head>

<?php
/*
    ANISEED, NISEED System and Database
    Copyright (C) 2007 Olivier Tassy, Fabrice Daian, Patrick Lemaire

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
    include("connection.php");
    include("frames_header.php");
?>
<div style="border-top:0px solid black;border-bottom:1px solid black;">
<font color="#D64242" size="3"><b>Find cells by their shapes</b></font>
</div>
<br>
This page allows to search 3D Virtual Embryo data to identify cells
of a given shape. All values are set to zero by default and upon
submission the values of all shape descriptors are displayed (Cell
volume, Cell surface, sphericity, convexity, elongation, Flatness,
Squareness, Entropy, Surface/volume ratio and cell volume/embryo
volume).
<br>
<br>
<center>
The dataset this tool works with is still incomplete and involves a restricted set of developmental stages:
 <br>
<form name="formulaire" action="embryo-biometry-result.php" method="post" target="_blank">

<?php
            $celllist="";
			if(isset($_POST["celllist"]))
            	$celllist=$_POST["celllist"];
            if(strlen($celllist)>0)
			      print "<center><H2><font color=\"#FF6600\">Refine subset mode</font> <a href=\"biometry-search.php\" target=\"_self\"><img src=\"pictures/button-reset.jpg\" border=\"0\" align=\"middle\"></a> </H2></center>";
            
			print '<input name="celllist" type="hidden" value="'.$celllist.'">';
?>

            
	        <table width="99%" border="0" cellspacing="0" cellpadding="0" background="pictures/barre.jpg">
              <tr> 
                <td>&nbsp;</td>
                <td>&nbsp;</td>
				<td>&nbsp;</td>
              </tr>
			  
              <tr> 
                
				<td align="center" valign="top">
				    <font color="#456898" size="2"><b>Species</b></font>
				    <!--
					<select name="species" size="1" onChange="javascript: self.location.href = 'fate-search.php?species=' + this.options[ this.selectedIndex ].value;">
				    <select name="species" size="1" onChange="javascript: self.formulaire.action='biometry-search.php'; self.formulaire.target='_self'; submit();">
					-->
					<br>
						<!--<select name="species" size="1" onChange="javascript: document.forms[0].action='biometry-search.php'; document.forms[0].target='_self'; submit();">-->


<select name="species" size="1" onChange="javascript: document.formulaire.action='embryo-biometry-search.php?species='+this.options[this.selectedIndex].value; document.formulaire.target='_self'; submit();">
						<option></option>
						<?php
							$species="";
							if (isset($_POST["species"])) $species=$_POST["species"];
							
							$requete="Select \"NAME\" from \"SPECIES\" order by \"NAME\"";
							$stmt = pg_query($c,$requete);
							while( $row=pg_fetch_array($stmt) ){
								$name=$row["NAME"];
								print "<option";
								if($species==$name)
								    print " selected";
								print ">$name</option>";
							}
						?>
				    </select>
				</td>
                <td align="center" valign="top">
		            <font color="#456898" size="2"><b>Developmental stage</b></font><br>
                    <select name="devstage" onChange="javascript: document.formulaire.action='embryo-biometry-search.php?species='+document.formulaire.species.options[document.formulaire.species.selectedIndex].value+'&devstage='+this.options[this.selectedIndex].value; document.formulaire.target='_self'; submit();" size="10" style="width:200">
                    
<!-- <select name="devstage" onChange="javascript:alert(document.formulaire.species.options[document.formulaire.species.selectedIndex].value);" size="10" style="width:200"> -->

                    <?php

						$devid="";
						if (isset($_GET["devstage"])) $devid=$_GET["devstage"];
						
						
						if(strlen($species)>0){
							 $query="SELECT \"NAME\", \"DEV_STAGE_ID\" FROM \"DEV_STAGE\" WHERE \"SPECIES\"='$species' ORDER BY \"DEV_PERCENT\"";
							 $stmt = pg_query($c,$query);
	
							 while($row=pg_fetch_array($stmt)){
								print "<option value=\"".$row["DEV_STAGE_ID"]."\""; 
								if ($row["DEV_STAGE_ID"]==$devid) print "selected";
								print ">";
								print $row["NAME"]."</option>\n";
								
							 }
						}
					 ?>
                  </select>
				</td>
				<td>
		            <center><font color="#456898" size="2"><b>Embryo</b></font></center>
                    <select name="embryo[]" size="10" multiple style="width:400px;" >
		    <?
			
						$embryo="";
						if (strlen($devid)>0)
							{
							$requete="SELECT \"NAME\",\"EMBRYO_ID\" from \"EMBRYO\" where \"DEV_STAGE_ID\"='$devid' order by \"NAME\"";
							$stmt=pg_query($c,$requete);
							while ($row=pg_fetch_array($stmt))
							{
								print "<option style=\"text-align:center;\" value=\"".$row["EMBRYO_ID"]."\">";

								$embryo_name=$row["NAME"];

								$embryo_name=str_replace("@"," ",$embryo_name);
								print $embryo_name."</option>\n";
							}



							}




		    ?>
		    </select>
				</td>
              </tr>
			  



              <tr> 
                <td><hr size="1" color="#505F70"></td>
                <td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>

              </tr>
			  
              <tr> 
                <td align="right">
				    &nbsp;<font color="#456898" size="2"><b>Volume</b></font>
					<select name="mvol" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="vol" type="text" value="0" size="10">&micro;3
		</td>
		<td  align="right">
				    &nbsp;<font color="#456898" size="2"><b>Surface</b></font>
					<select name="msurf" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="surf" type="text" value="0" size="10">&micro;<font size="-1">2</font>
		</td>
                <td  align="right">
					&nbsp;<font color="#456898" size="2"><b>S/V </b></font>
					<select name="msv" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="sv" type="text" value="0" size="10">&micro;<font size="-1">-1</font>

		</td>
		<td align="right">
					&nbsp;<font color="#456898" size="2"><b>v/V </b></font>
					<select name="mvv" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="vv" type="text" value="0" size="10">&micro;<font size="-1">-1</font>

		</td>
	      </tr>
			  
              <tr> 
                <td><hr size="1" color="#505F70"></td>
                <td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
              </tr>
			  
              <tr> 
                		<td align="right">
					&nbsp;<font color="#456898" size="2"><b>Sphericity </b></font>
					<select name="msphe" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="sphe" type="text" value="0" size="10">%
				</td>
				<td  align="right">
					&nbsp;<font color="#456898" size="2"><b>Entropy </b></font>
					<select name="ment" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="ent" type="text" value="0" size="10">%
				</td>
		                <td  align="right">
					&nbsp;<font color="#456898" size="2"><b>Squareness</b></font>
					<select name="mocup" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="ocup" type="text" value="0" size="10">%					

				</td>
				<td  align="right">
					&nbsp;<font color="#456898" size="2"><b>Convexity</b></font>
					<select name="mconv" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="conv" type="text" value="0" size="10">%
				</td>
		</tr>
			  
              <tr> 
                <td><hr size="1" color="#505F70"></td>
                <td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
              </tr>
			  
              <tr> 
                <td align="right">
					&nbsp;<font color="#456898" size="2"><b>Elongation </b></font>
					<select name="melong" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="elong" type="text" value="0" size="10">%
		</td>
		<td  align="right">
					&nbsp;<font color="#456898" size="2"><b>Flatness </b></font>
					<select name="mflat" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="flat" type="text" value="0" size="10">%
		</td>
                <td  align="right">&nbsp;
					<!--&nbsp;<strong>Complexity </strong>
					<select name="mcomp" size="1"><option value="0">></option><option value="1"><</option></select>&nbsp;<input name="comp" type="text" value="0" size="10">%-->
		</td>
		<td> &nbsp; </td>
			  </tr>
			  
              
			  
              <tr> 
                <td align="right">
					&nbsp;
				</td>
				<td  align="LEFT">&nbsp;
				</td>
                <td>&nbsp;</td>
		<td>&nbsp;</td>
			  </tr>
			  
              <tr> 
                <td><hr size="1" color="#505F70"></td>
                <td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
		<td><hr size="1" color="#505F70"></td>
              </tr>
			  
              <tr>
                <td>&nbsp;</td>
				<td>&nbsp;</td>
                <td align="right">
				    <input name="submit" type="image" src="pictures/button-submit.jpg" onClick="submit">
					&nbsp;&nbsp;
				    <br>
				</td>
		<td>&nbsp;</td>
              </tr>
            </table>
</form>

</center>


<?php
    include("frames_footer.php");
?>
