<html>
<head>
<title>ANISEED - Transcript model sequence (Ciona intestinalis, Halocynthia roretzi)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="You will find on this page the nucleotide sequence and the amino-acid sequence of Halocynthia or Ciona transcript model. For more info, contact aniseed@ibdm.univ-mrs.fr">
<meta name="keywords" content="Ciona intestinalis trancript model, Halocynthia roretzi transcript model, nucleotide sequence sequence, amino acid sequence, 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");
//Title before frames_header

include("frames_header.php");
?>


<?php
        $id=$_GET["id"];





		$requete="select \"SPECIES\" from \"MOL_ENTITY\" where \"MOL_ID\"='$id'";
		$stmt=pg_query($c,$requete);
		$row=pg_fetch_array($stmt);
		$species=$row["SPECIES"];


		$requete="select \"NAME\" from \"GENE\" where \"GENE_ID\"='$id'";
		$stmt = pg_query($c,$requete);
        if($row=pg_fetch_array($stmt)){
        $name=$row["NAME"];


print '<title>ANISEED - Transcript model sequence: '.$name.'</title>';

$clustid=$id;

if ($row["NAME"]{0}=="K") //KYOTO
{
//AJOUT POUR L'ABSTRACT de KYOTO

$qu="SELECT \"NAME\" from \"MOL_ENTITY\" where \"MOL_ID\"='$id'";
$st=pg_query($c,$qu);
$ro=pg_fetch_array($st);

$temp=explode(".",$ro["NAME"]);
$abstract=$temp[0].".".$temp[1].".".$temp[2];
$qu="SELECT \"MOL_ID\" from \"MOL_ENTITY\" where \"NAME\"='$abstract' and \"TYPE\"='abstract'";
$st=pg_query($c,$qu);
$ro=pg_fetch_array($st);

	$clustid=$ro["MOL_ID"];
		//print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Corresponding cluster: </b></font></td><td>";
		//print "<a href=\"ESTcluster.php?name=".$ro["MOL_ID"]."\"><font color=\"#000000\" size=\"-1\">".$ro["MOL_ID"]."</font></a></td></tr>";
//FIN AJOUT
}

if ($row["NAME"]{0}=="E")
	{
	//POUR ENSEMBL

	$qu="SELECT \"ABSTRACT_ID\" from \"TRANSCRIPT\" where \"TRANSCRIPT_ID\"='$id'";
	$st=pg_query($c,$qu);
	$ro=pg_fetch_array($st);

 	$clustid=$ro["ABSTRACT_ID"];
//	print "<tr valign=\"top\" align=\"left\"><td><font color=\"#656565\" size=\"-1\"><b>Corresponding cluster: </b></font></td><td>";
//	print "<a href=\"ESTcluster.php?name=".$ro["ABSTRACT_ID"]."\"><font color=\"#000000\" size=\"-1\">".$ro["ABSTRACT_ID"]."</font></a></td></tr>";
	}
?>


<!-- Header pour l'onglet -->
<link rel="stylesheet" type="text/css" media="screen" href="ongletv1.css" title="Version 1" />
<div id="header">
  <ul>
    <li><a href="molecule-gene.php?name=<?print $name?>">Transcript model card</a></li>
    <li id="current"><a href="molecule-sequence.php?id=<? print $id; ?>">Sequence</a></li>
    <li><a href="ESTcluster.php?name=<? print $clustid; ?>&base=<?print $id;?>">ESTs cluster</a></li>
    <li><a href="est-expression.php?name=<?print $clustid;?>&base=<? print $id; ?>&species=<?print $species;?>">EST count</a></li>
<!--    <li><a href="expression-curve.php?name=<? print $name;?>">Expression profile</a></li>-->
    <li><a href="insitu-result.php?target=<? print $name;?>&MOLtype=2&Order=DEV_STAGE_ID">InSitu data</a></li>
    <!--<li><a href="moltool.php?target=<? print $name; ?>">Molecular tool</a></li>-->
    <!--<li><a href="#" style="color:white;">Microarray probe</a></li>-->
    <li><a href="FLATexport-molecule-gene.php?name=<? print $name; ?>">Export</a></li>

  </ul>
</div>
<!-- EOF Onglet -->
<br><br>

<?


		    print "<br><br><font color=\"#D64242\" size=\"3\"><b>".$row["NAME"]."</b></font></h2>";
		}
print '<br />';

//////////////////////////////////////////PROTEIC SEQUENCE/////////////////////////////////////////////
		$requete="select \"SEQUENCE\", \"LENGTH\", \"MOL_ID\" from \"PROT_SEQUENCE\" where \"MOL_ID\"=$id";
		$stmt = pg_query($c,$requete);
		
		if($row=pg_fetch_array($stmt)){
		    $lob = $row["SEQUENCE"];
		
			/* DEBUT DE L'AFFICHAGE DU CLOB */

		pg_query ($c, "begin");	/*Debut de la transaction*/
		
		$handle_lo = pg_lo_open($c,$lob,"r");
		$seq=pg_lo_read($handle_lo);

		pg_query($c,"end"); /*fin de la Transaction*/

		/* FIN DE L'AFFICHAGE DU LOB */



			$seq=ereg_replace("<br>","",$seq);
			$seq=ereg_replace("\n","",$seq);
			$seq = chunk_split($seq, 70, "\n");
			

		    print "<br><u><font color=\"#456898\" size=\"3\"><b>Amino acid sequence</b></font></u><br><strong>Length: </strong>".$row["LENGTH"]."<br><br><pre><font color=\"#000000\" face=\"Courier New, Courier, mono\" size=\"2\">&gt;$name<br>$seq</font></pre>";
		}

//////////////////////////////////////////SEQUENCE/////////////////////////////////////////////
		$requete="select \"SEQUENCE\", \"LENGTH\", \"COMMENTS\", \"MOL_ID\" from \"SEQUENCE\" where \"MOL_ID\"=$id";
		$stmt = pg_query($c,$requete);
		
		if($row=pg_fetch_array($stmt)){
		    $lob = $row["SEQUENCE"];
		
			/* DEBUT DE L'AFFICHAGE DU CLOB */

		pg_query ($c, "begin");	/*Debut de la transaction*/
		
		$handle_lo = pg_lo_open($c,$lob,"r");
		$seq=pg_lo_read($handle_lo);

		pg_query($c,"end"); /*fin de la Transaction*/

		/* FIN DE L'AFFICHAGE DU LOB */



			$seq=ereg_replace("<br>","",$seq);
			$seq=ereg_replace("\n","",$seq);
			$seq = chunk_split($seq, 70, "\n");
			

//AJOUT
/*		
		$requete="select \"BEGIN\",\"END\",\"INTRON_EXON\" from \"GENE\" where \"GENE_ID\"='$id'";
		$stmt=pg_query($c,$requete);
		$row2=pg_fetch_array($stmt);

		$tab=explode(";",$row2["INTRON_EXON"]);
		$begin=$row2["BEGIN"];
		$end=$row2["END"];

		//Conversion position globale en locale
		for ($i=0;$i<count($tab)-1;$i++)
		{
		$tmp=$tab[$i];
		$tmp1=explode("-",$tmp);
		$tmp1[0]-=$begin;
		$tmp1[1]-=$begin;
		$tmp=implode("-",$tmp1);
		$tab[$i]=$tmp;
		}

		//Colorization du premier exons

		
		$tmp=$tab[0];
		$tmp1=explode("-",$tmp);

		$seq1=substr($seq,0,$tmp1[0]);
		$seq2=substr($seq,$tmp1[0],$tmp1[1]-($tmp1[0]+1));
		$seq3=substr($seq,$tmp1[1]-($tmp1[0]+1)+$tmp1[0],strlen($seq)-($tmp1[1]-($tmp1[0]+1)+$tmp1[0]));
		$seq=$seq1."<span STYLE=\"background: #0000FF;font: bold;\">$seq2</span>".$seq3;
*/	
//




		    print "<br><br><u><font color=\"#456898\" size=\"3\"><b>Nucleotide sequence</b></font></u><br><br><strong>Length: </strong>".$row["LENGTH"]."<br>".strtoupper($row["COMMENTS"])."<br><br><pre><font color=\"#000000\"face=\"Courier New, Courier, mono\" size=\"2\">&gt;$name<br>$seq</font></pre>";
		}

?>

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