BioPHP: PHP for Biocomputing


[ Listing of Web Scripts ] [ Parameter Page ] [ Home Page ]

Source Code Listing for trans_res.php

Note: This uses unreleased BioPHP 1.1 code. Attempting to run this with 1.0 may result in some unexplained or unpredictable behavior.

// This code was written by Serge Gregorio, Jr. (serge525@hotmail.com) 
// and is under the General Public License (GPL) 2.0 license.

<html>

<head>
   <title>Charge and Chemgrp Example</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFCC" text="#000000">
   <H1>Protein Translation - Result Page</H1>
   <p><B>TRANSLATION OPTIONS</B> </p>
   <p><b>Output Format:</b> 
   	<?php print ($outformat == 1 ? "Single-letter" : "Three-letter") ?>
   </p>
   <b>Reading Frame:</b> <?php print $rdframe ?><BR>
   <table>
      <tr>
         <td>
            <br>
               <B>INPUT SEQUENCE:</B><BR>
               <textarea name="nucseq" rows=15 cols=80 align=right readonly>
               <?php
                  require_once("seq.inc");
		
                  $amseq = strtoupper($amseq);
                  $fmt_nucseq = preg_replace("/[^ATGCU*X]/", "", $nucseq);
                  $seqo = new Seq();
                  $seqo->sequence = $fmt_nucseq;
                  @$translation = trim($seqo->translate($rdframe, $outformat));	
                  print $fmt_nucseq;
               ?>
               </textarea>	
         </td></tr>
     <tr>
         <td>
            <BR>
            <B>PROTEIN TRANSLATION:</B><BR>
            <textarea name="translation_string" rows=15 cols=80 readonly>
            <?php
               print $translation;
            ?>
            </textarea>
         </td>
      </tr>
   </table>
   <p>Back to <a href='translate_par.html'>Parameter Page</a> </p>
</body>

</html>

[ Listing of Web Scripts ] [ Parameter Page ] [ Home Page ]  

 


Copyright © 2003 by Sergio Gregorio, Jr.
All rights reserved.