<html>
<head>
<title>ANISEED - Clone features (Ciona intestinalis, Halocynthia roretzi)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="This page will show you the different features corresponding to Halocynthia roretzi or Ciona intestinalis clone in addition to a link to JGI cluster, Kyoto cluster and Ensembl cluster.">
<meta name="keywords" content="Ciona intestinalis clone, Halocynthia roretzi clone, clone sequence, transcript model, Ciona intestinalis, Halocynthia roretzi, ascidian database, ciona intestinalis database, Ensembl, JGI, Kyoto.">
<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");
?>

<SCRIPT>
function CheckALL() {
	
	for(a=0; a<document.form.length; ++a){
		//if (document.form[a].checked==false) document.form[a].checked=true;
		//else document.form[a].checked=false;
		document.form[a].checked=!(document.form[a].checked);
	
}
</SCRIPT>


<?php
	$name = $_GET["name"];
	
	
	$requete="select B.\"SPECIES\", A.* from \"CLONE\" A, \"MOL_ENTITY\" B where (A.\"CLONE_NAME\"='$name') and (B.\"MOL_ID\"=A.\"CLONE_ID\")";
	$stmt = pg_query($c,$requete);
	if( $row=pg_fetch_array($stmt) ){
	
	
	    $nameClone=$row["CLONE_NAME"];
	    $libid=$row["LIBRARY_ID"];
	
	    $plate=$row["PLATE"];


	    $requete2="select * from \"LIBRARY\" where \"LIBRARY_ID\"='$libid'";
	    $stmt2 = pg_query($c,$requete2);
	
	$species=$row["SPECIES"];
	
        print "<font color=\"#D64242\" size=\"3\"><b>Clone ".$row["CLONE_NAME"]."</b></font><br><br>";
    
	
	    print "<u><font color=\"#456898\" size=\"3\"><b>Features</b></font></u><br>";
	    print "<table width=\"100%\">";
        print "<tr><td  width=\"20%\"><font color=\"#656565\" size=\"-1\"><b>Name: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row["CLONE_NAME"]."</font></td></tr>";
        print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Species: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row["SPECIES"]."</font></td></tr>";
		if( $row2=pg_fetch_array($stmt2) ){
            print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Library: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row2["TITLE"]."&nbsp;&nbsp;(".$row2["LIB_SIZE"]." clones)</font></td></tr>";
			print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Tissue: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row2["TISSUE"]."</font></td></tr>";
			print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Organ: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row2["ORGAN"]."</font></td></tr>";
			print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Vector: </b></font></td><td><font color=\"#656565\" size=\"-1\">".$row2["VECTOR"]."</font></td></tr>";
			print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Plate (Gene Collection v1 or Gateway full ORF collection 1): </b></font></td><td><font color=\"#656565\" size=\"-1\">$plate</font></td></tr>";


			//Ghost link
			if (strlen($plate)>0) 
				{				 
				if ($plate{0}=="R")
				{
				print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Ghost Genome Browser: </b></font></td><td><font color=\"#656565\" size=\"-1\"><a href=\"http://hoya.zool.kyoto-u.ac.jp/cgi-bin/gbrowse/ci/?name=GC%3A$plate\" target=\"_blank\" >View in Ghost Browser</a></font></td></tr>";

				$tmplate=str_replace("R1Ci","",$plate);

				print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Ghost Clone Card: </b></font></td><td><font color=\"#656565\" size=\"-1\">
				<form name=\"linkformu\" action=\"http://ghost.zool.kyoto-u.ac.jp/cgi-bin3/clusterr1.cgi\" method=\"POST\" target=\"_blank\">

				<input type=\"hidden\" name=\"keytype\" value=\"gcid\">
				<input type=\"hidden\" name=\"inkey\" value=\"$tmplate\">
				<input type=\"submit\" value=\"View Ghost Card\">

				</form>
				</font></td></tr>";

				}
				}
		



		}
		print "</table>";
	    
	    print "<br><br><br><center><a href=\"insitu-result.php?target=$name\"><img src=\"pictures/button-getPics.jpg\" border=\"0\"></a></center>";
	    
        print "<br><br><u><font color=\"#456898\" size=\"3\"><b>Sequences</b></font></u><br><br>";
        $requete="select \"GENBANK_ID\", \"CLONE_NAME\", \"END\", \"ANISEED_CLUSTER_ID\",\"ANISEED_KYOTO_CLUSTER_ID\",\"ANISEED_ENSEMBL_CLUSTER_ID\" from \"CLONE_SEQ\" where \"CLONE_NAME\"='$name' order by \"NAME\"";

        $stmt = pg_query($c,$requete);
		
        print '<form name="form" action="AllClonesFASTA.php" target="_BLANK" method="POST"><table width="80%" border="0" cellspacing="0" cellpadding="0">';
        print '<tr align="center" valign="middle">
	<td>&nbsp;</td>
	<td><font color=\"#456898\" size=\"2\"><b>Clone name</b></font></td>
	<td><font color=\"#456898\" size=\"2\"><b>Genbank ID</b></font></td>
	<td><font color=\"#456898\" size=\"2\"><b>End</b></font></td>';

	if ($row["SPECIES"]=="Ciona intestinalis")
	{
	print '
	<td><font color=\"#456898\" size=\"2\"><b>JGI Cluster</b></font></td>
	<td><font color=\"#456898\" size=\"2\"><b>KYOTO Cluster</b></font></td>
	<td><font color=\"#456898\" size=\"2\"><b>ENSEMBL Cluster</b></font></td>';
	}
	if ($row["SPECIES"]=="Halocynthia roretzi")
	{
	print '
	<td><font color=\"#456898\" size=\"2\"><b>Aniseed Cluster ID</b></font></td>';
	}


	print '</tr>';
        $count=0;
	    while($row=pg_fetch_array($stmt)){
	        ++$count;
	        print "
	<tr align=\"center\">
	<td><input name=\"id[]\" type=\"checkbox\" value=\"".$row["GENBANK_ID"]."\"></td>
	<td ><font color=\"#000000\" size=\"-1\">".$row["CLONE_NAME"]."</font></td>
	<td><a href=\"molecule-clone.php?name=".$row["GENBANK_ID"]."\"><font color=\"#000000\" size=\"-1\">".$row["GENBANK_ID"]."</font></a></td><td width=\"25%\"><font color=\"#656565\" size=\"-1\">".$row["END"]."</font></td>";
	if ($species=="Ciona intestinalis")
	{
	print "
	<td><a href=\"ESTcluster.php?name=".$row["ANISEED_CLUSTER_ID"]."\"><font color=\"#000000\"size=\"-1\">".$row["ANISEED_CLUSTER_ID"]."</font></a></td>
	<td><a href=\"ESTcluster.php?name=".$row["ANISEED_KYOTO_CLUSTER_ID"]."\"><font color=\"#000000\"size=\"-1\">".$row["ANISEED_KYOTO_CLUSTER_ID"]."</font></a></td>
	<td><a href=\"ESTcluster.php?name=".$row["ANISEED_ENSEMBL_CLUSTER_ID"]."\"><font color=\"#000000\"size=\"-1\">".$row["ANISEED_ENSEMBL_CLUSTER_ID"]."</font></a></td>
	";
	}
	else
	{
	print "<td><a href=\"ESTcluster.php?name=".$row["ANISEED_CLUSTER_ID"]."\"><font color=\"#000000\"size=\"-1\">".$row["ANISEED_CLUSTER_ID"]."</font></a></td>";
	}
	print "</tr>";


	    }
	    print "</table></form>";
	
	    if($count==0){
	        print "<br><br><center><h2><strong>No match</strong></h2></center><br><br>";
	    }
		
		print "<br>&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"pictures/button-selectALL.jpg\" onClick=\"CheckALL();\">";
		//print "&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"pictures/button-download.jpg\" onClick=\"self.getSelected();\">";
		print "&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"pictures/button-download.jpg\" onClick=\"document.form.submit();\">";
		
	}else{print "<br><br><center><h2><strong>No match</strong></h2></center><br><br>";}
?>

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