NYMU Taipei/phptest

From 2007.igem.org

(Difference between revisions)
 
(49 intermediate revisions not shown)
Line 2: Line 2:
<body>
<body>
-
<script type="text/javascript">
+
<script language="javascript">
-
        document.write("Hello, World!")  //直接在瀏覽器視窗顯示。
+
-
        alert("Hello, World!")      //開啟對話視窗顯示。
+
-
        </script>
+
-
        HTML超連結本文……
+
-
<form method="GET" action="https://2007.igem.org/wiki/index.php?title=NYMU_Taipei/phptest">
+
function CheckId(SI,SV,CI,CV,VI,L,R){
-
    <INPUT type="text" name="insert_size" > (bp) size of insert part<BR>
+
-
    <INPUT type="text" name="vector_size" > (bp) size of vector part<BR>
+
-
    <INPUT type="text" name="I" > (ug/uL) concentration of part concentration<BR>
+
-
    <INPUT type="text" name="V" > (ug/uL) concentration of part concentration<BR>
+
-
    <INPUT type="text" name="X" > volume (uL) of insert for gel separation<BR>
+
-
    <INPUT type="text" name="L" > volume (uL) of insert for  ligation<BR>
+
-
    <INPUT type="submit" value="Send"> <INPUT type="reset">
+
-
</form>
+
-
<body bgcolor="#FFFFFF" <table border="0" background="jpg/01_bkg1.jpg">
+
var SI = SI;
 +
var SV = SV;
 +
var CI = CI;
 +
var CV = CV;
 +
var VI = VI;
 +
var L  = L;
 +
var R  = R;
 +
var DVV = 3/CV;
 +
var MI = R * (SI/SV);
-
<p align="center"><script language="JavaScript">
+
//document.write("insert is v1, and vector is v2");
-
<!--Hide JavaScript from Java-Impaired Browsers
+
alert("insert size = " + SI + "bp\n" + "vector size = " + SV + "bp\n" + "vector concentration = " + CV + "ug/uL\n" + "digested vector volume = " + DVV + "uL\n" + "insert mass = " + MI + "ug");
-
function test_it(entry) {
+
-
if (entry.value!=null && entry.value.length!=0) {
+
-
entry.value=""+ eval(entry.value);
+
-
}
+
-
computeForm(entry.form);
+
-
}
+
-
function computeForm(form) {
 
-
if ((form.months.value==null || form.months.value.length==0) ||
 
-
(form.rate.value==null || form.rate.value.length==0) ||
 
-
(form.financed.value == null || form.financed.value.length==0)) {
 
-
return;
 
-
}
 
-
if (!alrt_msg(form.months,1,480,"你的付款期數") ||
 
-
!alrt_msg(form.rate,.001,99,"你填寫的利率") ||
 
-
!alrt_msg(form.financed,100,10000000,"貸款金額")) {
 
-
form.payment.value="所填數值不在計算範圍內 - 請按重填";
 
-
return;
 
-
}
 
-
var i=form.rate.value;
 
-
ffv=0;
 
-
ffv+=form.financed.value;
 
-
fmv=0;
 
-
fmv+=form.months.value;
 
-
if (i > 1.0) {
 
-
// Hack to mostly correct floating point/binary conversion error
 
-
i=(i/100.0)+.00001;
 
-
var fmt="";
 
-
fmt+=i;
 
-
fmt=fmt.substring(0,6)
 
-
form.rate.value=fmt;
 
-
}
 
-
i/=12;
 
-
var isn=1;
 
-
for (var j=0;j<form.months.value;j++)
 
-
isn=isn*(1+i);
 
-
form.payment.value=(form.financed.value*isn*i)/(isn-1);
 
-
fpv=0;
 
-
fpv+=form.payment.value;
 
-
var fmt="";
 
-
var add=9;
 
-
fmt+=form.payment.value;
 
-
for (var i=0;i<fmt.length;i++) {
 
-
if (fmt.charAt(i)==".") {
 
-
add=i+3;
 
-
i=fmt.length;
 
-
}
 
-
}
 
-
fmt=fmt.substring(0,add);
 
-
fcalc=((fmv*fpv)-ffv);
 
-
var fmtb="";
 
-
var add=9;
 
-
fmtb+=fcalc;
 
-
for (var i=0;i<fmtb.length;i++) {
 
-
if (fmtb.charAt(i)==".") {
 
-
add=i+3;
 
-
i=fmtb.length;
 
-
}
 
-
}
 
-
fmtb=fmtb.substring(0,add);
 
-
form.payment.value=" NT$"+fmt+" NT$"+fmtb;
 
-
}
 
-
function reset_it(form) {
 
-
form.months.value="";
 
-
form.rate.value="";
 
-
form.financed.value="";
 
-
form.payment.value="";
 
}
}
-
function alrt_msg(entry,low,high,prompt) {
+
</script>  
-
prompt=prompt+" 你所輸入數值: "+entry.value;
+
-
var scratch=entry.value;
+
-
for (var i=0;i<scratch.length;i++) {
+
-
var letter=scratch.substring(i,i+1);
+
-
if ((letter<"0" || "9"<letter) && letter!='.') {
+
-
alert(prompt);
+
-
return false;
+
-
}
+
-
}
+
-
var errtst=parseFloat(scratch)
+
-
if (errtst<low || high<errtst) {
+
-
alert("對不起. "+prompt+ " 不在計算範圍內"
+
-
+" 從 "+low+" 到 "+high+"!");
+
-
return false;
+
-
}
+
-
entry.value=scratch;
+
-
return true;
+
-
}
+
-
//-->
+
-
</script></p>
+
-
<hr>
+
<form name=form1>
-
 
+
    <INPUT type="text" name="SI"> size (bp) of insert part (SI)<BR>
-
<form method="GET">
+
    <INPUT type="text" name="SV"> size (bp) of vector part (SV)<BR>
-
<div align="center"><center><table border="1" cellpadding="0"
+
    <INPUT type="text" name="CI"> concentration (ug/uL) of insert (CI)<BR>
-
width="350" bordercolor="#0000FF" bgcolor="#00FFFF">
+
    <INPUT type="text" name="CV"> concentration (ug/uL) of vector (CV)<BR>
-
<tr>
+
    <INPUT type="text" name="VI"> volume (uL) of insert for gel separation (VI)<BR>
-
<td align="center" valign="top" colspan="3"
+
    <INPUT type="text" name="L">  volume (uL) of insert for ligation (L)<BR>
-
bgcolor="#DEBD21">請填寫下面表格:</td>
+
    <INPUT type="text" name="R"> ligation ratio<BR>
-
<td align="center" valign="top" bgcolor="#DEBD21">每月應付金額</td>
+
    <input type=button value="送出" Onclick="CheckId(SI.value, SV.value, CI.value, CV.value, VI.value, L.value, R.value);">
-
<td align="center" valign="top" bgcolor="#DEBD21">你所應付的利息</td>
+
-
</tr>
+
-
<tr>
+
-
<td align="center" bgcolor="#FFFF00">分期付款<br>
+
-
期數()<br>
+
-
</td>
+
-
<td align="center" bgcolor="#FFFF00">年利率(%)<br>
+
-
</td>
+
-
<td align="center" bgcolor="#FFFF00">貸款金額<br>
+
-
</td>
+
-
<td align="center" bgcolor="#FFFF00">你每月<br>
+
-
應付金額為<br>
+
-
</td>
+
-
<td align="center" bgcolor="#FFFF00">你應付出<br>
+
-
利息總金額為<br>
+
-
</td>
+
-
</tr>
+
-
<tr>
+
-
<td align="center"><input type="text" size="3"
+
-
name="months" onchange="test_it(this)"> </td>
+
-
<td align="center"><input type="text" size="5"
+
-
name="rate" onchange="test_it(this)"></td>
+
-
<td align="center">NT$<input type="text" size="8"
+
-
name="financed" onchange="test_it(this)"></td>
+
-
<td align="center" colspan="2"><input type="text"
+
-
size="35" name="payment" onchange="test_it(this)"></td>
+
-
</tr>
+
-
<tr>
+
-
<td align="center" colspan="2" bgcolor="#FFFF75"><input
+
-
type="reset" value="重填金額"
+
-
onclick="reset_it(this.form)"></td>
+
-
<td align="center" colspan="3" bgcolor="#FFFF75"><input
+
-
type="button"
+
-
value="按一下,看每月需付金額與利息總額"
+
-
onclick="computeForm(this.form)"></td>
+
-
</tr>
+
-
</table>
+
-
</center></div>
+
</form>
</form>
-
 
</body>
</body>
</html>
</html>
 +
----
 +
* total digestion volume is 20 uL (typical)
 +
** enzyme 1 and enzyme 2 (1uL * 2)
 +
** 10X buffer (2uL)
 +
** BSA (2uL)
 +
** plasmid + ddH2O (14uL = VI + water, 1 <= VI <= 14)
 +
** for vector
 +
*** we assume 300 ng for digestion and 90% loss
 +
*** thus, amplify 10X from 300 ng to 3,000 ng = 3 mg
 +
*** 3,000 ng = CV (ug/uL) * 1000 (ng/ug) * DVV, DVV (digested vector volume) = 3/CV
 +
----
 +
* total gel separation volume is 50 uL
 +
----
 +
* total ligation volume is 10uL
 +
** (MI/MV) = R * (SI/SV)
 +
** assume mass of vector (MV) is 300 ng
 +
*** MI = R * (SI/SV) * MV = 300R * (SI/SV) (ng)
 +
** 10X buffer (1uL)
 +
** ligase (1uL)
 +
** VV + L + water (8uL)
 +
----
 +
* formula
 +
** '''300''' * SI * 3 (ligation ratio) * 10 (損失因子) / SV = CI * VI * L /50
 +
** mass of vector (MV) is '''300''' ng
 +
** SI (bp) is size of insert
 +
** SV (bp) is size of vector
 +
** VI (uL) is volume of insert
 +
** VV (uL) is volume of vector
 +
** CI (ng/uL) is concentration of insert
 +
** CV (ng/uL) is concentration of vector
 +
** R is ranged from 1 to 10

Latest revision as of 10:07, 16 September 2007

size (bp) of insert part (SI)
size (bp) of vector part (SV)
concentration (ug/uL) of insert (CI)
concentration (ug/uL) of vector (CV)
volume (uL) of insert for gel separation (VI)
volume (uL) of insert for ligation (L)
ligation ratio


  • total digestion volume is 20 uL (typical)
    • enzyme 1 and enzyme 2 (1uL * 2)
    • 10X buffer (2uL)
    • BSA (2uL)
    • plasmid + ddH2O (14uL = VI + water, 1 <= VI <= 14)
    • for vector
      • we assume 300 ng for digestion and 90% loss
      • thus, amplify 10X from 300 ng to 3,000 ng = 3 mg
      • 3,000 ng = CV (ug/uL) * 1000 (ng/ug) * DVV, DVV (digested vector volume) = 3/CV

  • total gel separation volume is 50 uL

  • total ligation volume is 10uL
    • (MI/MV) = R * (SI/SV)
    • assume mass of vector (MV) is 300 ng
      • MI = R * (SI/SV) * MV = 300R * (SI/SV) (ng)
    • 10X buffer (1uL)
    • ligase (1uL)
    • VV + L + water (8uL)

  • formula
    • 300 * SI * 3 (ligation ratio) * 10 (損失因子) / SV = CI * VI * L /50
    • mass of vector (MV) is 300 ng
    • SI (bp) is size of insert
    • SV (bp) is size of vector
    • VI (uL) is volume of insert
    • VV (uL) is volume of vector
    • CI (ng/uL) is concentration of insert
    • CV (ng/uL) is concentration of vector
    • R is ranged from 1 to 10