NYMU Taipei/phptest

From 2007.igem.org

(Difference between revisions)
 
(52 intermediate revisions not shown)
Line 2: Line 2:
<body>
<body>
-
<php?
+
<script language="javascript">
-
echo "test";
+
function CheckId(SI,SV,CI,CV,VI,L,R){
-
?>
+
var SI = SI;
-
<form method="GET" action="https://2007.igem.org/wiki/index.php?title=NYMU_Taipei/phptest">
+
var SV = SV;
-
    <INPUT type="text" name="insert_size" > (bp) size of insert part<BR>
+
var CI = CI;
-
    <INPUT type="text" name="vector_size" > (bp) size of vector part<BR>
+
var CV = CV;
-
    <INPUT type="text" name="I" > (ug/uL) concentration of part concentration<BR>
+
var VI = VI;
-
    <INPUT type="text" name="V" > (ug/uL) concentration of part concentration<BR>
+
var L  = L;
-
    <INPUT type="text" name="X" > volume (uL) of insert for gel separation<BR>
+
var R  = R;
-
    <INPUT type="text" name="L" > volume (uL) of insert for  ligation<BR>
+
var DVV = 3/CV;
-
    <INPUT type="submit" value="Send"> <INPUT type="reset">
+
var MI = R * (SI/SV);
-
</form>
+
 +
//document.write("insert is v1, and vector is v2");
 +
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");
-
<body bgcolor="#FFFFFF" <table border="0" background="jpg/01_bkg1.jpg">
 
-
 
-
<p align="center"><script language="JavaScript">
 
-
<!--Hide JavaScript from Java-Impaired Browsers
 
-
function test_it(entry) {
 
-
if (entry.value!=null && entry.value.length!=0) {
 
-
entry.value=""+ eval(entry.value);
 
-
}
 
-
computeForm(entry.form);
 
}
}
-
function computeForm(form) {
+
</script>
-
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) {
+
<form name=form1>
-
prompt=prompt+" 你所輸入數值: "+entry.value;
+
    <INPUT type="text" name="SI"> size (bp) of insert part (SI)<BR>
-
var scratch=entry.value;
+
    <INPUT type="text" name="SV"> size (bp) of vector part (SV)<BR>
-
for (var i=0;i<scratch.length;i++) {
+
    <INPUT type="text" name="CI"> concentration (ug/uL) of insert (CI)<BR>
-
var letter=scratch.substring(i,i+1);
+
    <INPUT type="text" name="CV"> concentration (ug/uL) of vector (CV)<BR>
-
if ((letter<"0" || "9"<letter) && letter!='.') {
+
    <INPUT type="text" name="VI"> volume (uL) of insert for gel separation (VI)<BR>
-
alert(prompt);
+
    <INPUT type="text" name="L">  volume (uL) of insert for ligation (L)<BR>
-
return false;
+
    <INPUT type="text" name="R"> ligation ratio<BR>
-
}
+
    <input type=button value="送出" Onclick="CheckId(SI.value, SV.value, CI.value, CV.value, VI.value, L.value, R.value);">
-
}
+
-
var errtst=parseFloat(scratch)
+
-
if (errtst<low || high<errtst) {
+
-
alert("對不起. "+prompt+ " 不在計算範圍內"
+
-
+" 從 "+low+" 到 "+high+"!");
+
-
return false;
+
-
}
+
-
entry.value=scratch;
+
-
return true;
+
-
}
+
-
//-->
+
-
</script></p>
+
-
 
+
-
<hr>
+
-
 
+
-
<form method="POST">
+
-
<div align="center"><center><table border="1" cellpadding="0"
+
-
width="350" bordercolor="#0000FF" bgcolor="#00FFFF">
+
-
<tr>
+
-
<td align="center" valign="top" colspan="3"
+
-
bgcolor="#DEBD21">請填寫下面表格:</td>
+
-
<td align="center" valign="top" bgcolor="#DEBD21">每月應付金額</td>
+
-
<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