├── spec ├── uncleSpec.js ├── SpecRunnerForITO.html ├── SpecRunnerForParents.html ├── SpecRunnerForSingleParent.html ├── itoSpec.js ├── piSingleParentSpec.js └── piParentsSpec.js ├── js ├── calculator │ ├── uncle.js │ ├── xmlUtil.js │ ├── CookieUtil.js │ ├── calculatorHelper.js │ ├── AGCU_EX22 │ │ ├── piSingleParent.js │ │ ├── newphw-ito.js │ │ ├── grand-ito.js │ │ └── piParents.js │ ├── GlobalFiler │ │ ├── piSingleParent.js │ │ ├── newphw-ito.js │ │ ├── grand-ito.js │ │ └── piParents.js │ ├── AGCU211 │ │ ├── piSingleParent.js │ │ ├── nephew-ito.js │ │ ├── grand-ito.js │ │ └── piParents.js │ ├── ito.js │ └── piSingleParent.js ├── validator │ └── jquery-validate.min.js └── jasmine-1.3.1 │ └── jasmine.css ├── README.md ├── img ├── bottle.png ├── step_1.bmp ├── step_2.bmp ├── step_3.bmp ├── step_4.bmp ├── step_5.bmp ├── relations-icon.ico ├── glyphicons-halflings.png └── glyphicons-halflings-white.png ├── xml ├── AGCU_EX22 │ ├── TPOX.xml │ ├── D3S1358.xml │ ├── TH01.xml │ ├── CSF1PO.xml │ ├── D10S1248.xml │ ├── D13S317.xml │ ├── D16S539.xml │ ├── D7S820.xml │ ├── vWA.xml │ ├── D5S818.xml │ ├── PentaD.xml │ ├── D8S1179.xml │ ├── D12S391.xml │ ├── D2S1338.xml │ ├── D2S441.xml │ ├── D19S433.xml │ ├── D21S11.xml │ ├── D6S1043.xml │ ├── D18S51.xml │ ├── FGA.xml │ └── PentaE.xml ├── GlobalFiler │ ├── TPOX.xml │ ├── D3S1358.xml │ ├── TH01.xml │ ├── CSF1PO.xml │ ├── D13S317.xml │ ├── D16S539.xml │ ├── D7S820.xml │ ├── vWA.xml │ ├── D10S1248.xml │ ├── D22S1045.xml │ ├── D5S818.xml │ ├── D8S1179.xml │ ├── D12S391.xml │ ├── D2S1338.xml │ ├── D2S441.xml │ ├── D19S433.xml │ ├── D21S11.xml │ ├── D1S1656.xml │ ├── D18S51.xml │ ├── FGA.xml │ └── SE33.xml └── AGCU211 │ ├── D1GATA113.xml │ ├── D4S2408.xml │ ├── D6S474.xml │ ├── D18S853.xml │ ├── D9S1122.xml │ ├── D14S1434.xml │ ├── D17S1301.xml │ ├── D2S1776.xml │ ├── D11S4463.xml │ ├── D1S1627.xml │ ├── D5S2500.xml │ ├── D6S1017.xml │ ├── D10S1248.xml │ ├── D1S1677.xml │ ├── D22S1045.xml │ ├── D3S4529.xml │ ├── D10S1435.xml │ ├── D12ATA63.xml │ ├── D20S482.xml │ ├── D2S441.xml │ └── D19S433.xml ├── exp ├── AGCU211 │ ├── grand-ito-template.html │ ├── pi-single-parent-template.html │ └── pi-parents-template.html ├── AGCU_EX22 │ ├── grand-ito-template.html │ ├── pi-single-parent-template.html │ └── pi-parents-template.html └── GlobalFiler │ ├── grand-ito-template.html │ ├── pi-single-parent-template.html │ └── pi-parents-template.html ├── help ├── developer.html ├── how-to-copy-data-to-word.html └── formula.html └── index.html /spec/uncleSpec.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/calculator/uncle.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | relations-in-development 2 | ======================== 3 | 4 | repo for development 5 | -------------------------------------------------------------------------------- /img/bottle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/bottle.png -------------------------------------------------------------------------------- /img/step_1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/step_1.bmp -------------------------------------------------------------------------------- /img/step_2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/step_2.bmp -------------------------------------------------------------------------------- /img/step_3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/step_3.bmp -------------------------------------------------------------------------------- /img/step_4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/step_4.bmp -------------------------------------------------------------------------------- /img/step_5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/step_5.bmp -------------------------------------------------------------------------------- /img/relations-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/relations-icon.ico -------------------------------------------------------------------------------- /img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/relations/relations-in-development/master/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /xml/AGCU_EX22/TPOX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.5311 4 | 0.1344 5 | 0.023 6 | 0.2885 7 | 0.023 8 | -------------------------------------------------------------------------------- /xml/GlobalFiler/TPOX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.5311 4 | 0.1344 5 | 0.023 6 | 0.2885 7 | 0.023 8 | -------------------------------------------------------------------------------- /xml/AGCU211/D1GATA113.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.4867 4 | 0.4867 5 | 0.1244 6 | 0.3511 7 | 0.0289 8 | -------------------------------------------------------------------------------- /xml/AGCU211/D4S2408.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0023 4 | 0.1822 5 | 0.2956 6 | 0.3355 7 | 0.0266 8 | 0.0023 9 | -------------------------------------------------------------------------------- /xml/AGCU211/D6S474.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0022 4 | 0.3466 5 | 0.3556 6 | 0.1356 7 | 0.1156 8 | 0.0444 9 | -------------------------------------------------------------------------------- /xml/AGCU211/D18S853.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0044 4 | 0.4111 5 | 0.0556 6 | 0.2356 7 | 0.2311 8 | 0.0622 9 | -------------------------------------------------------------------------------- /xml/AGCU211/D9S1122.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0489 4 | 0.1778 5 | 0.3244 6 | 0.4022 7 | 0.0378 8 | 0.0089 9 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D3S1358.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0393 4 | 0.3541 5 | 0.3410 6 | 0.1934 7 | 0.0636 8 | 0.0082 9 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D3S1358.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0393 4 | 0.3541 5 | 0.3410 6 | 0.1934 7 | 0.0636 8 | 0.0082 9 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/TH01.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1131 4 | 0.259 5 | 0.0738 6 | 0.4738 7 | 0.0377 8 | 0.041 9 | 0.0016 10 | -------------------------------------------------------------------------------- /xml/GlobalFiler/TH01.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1131 4 | 0.259 5 | 0.0738 6 | 0.4738 7 | 0.0377 8 | 0.041 9 | 0.0016 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D14S1434.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0821 4 | 0.1555 5 | 0.0334 6 | 0.2555 7 | 0.4465 8 | 0.02 9 | 0.007 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D17S1301.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0444 4 | 0.0489 5 | 0.16 6 | 0.4534 7 | 0.2445 8 | 0.0444 9 | 0.0044 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D2S1776.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0044 4 | 0.1489 5 | 0.0533 6 | 0.2623 7 | 0.3933 8 | 0.1222 9 | 0.0156 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D11S4463.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0024 4 | 0.0287 5 | 0.2287 6 | 0.3068 7 | 0.3044 8 | 0.1179 9 | 0.0111 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D1S1627.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0356 4 | 0.0022 5 | 0.1178 6 | 0.6022 7 | 0.2244 8 | 0.0156 9 | 0.0022 10 | -------------------------------------------------------------------------------- /xml/AGCU211/D5S2500.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0098 5 | 0.0475 6 | 0.2361 7 | 0.2328 8 | 0.3689 9 | 0.0918 10 | 0.0115 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D6S1017.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0024 4 | 0.1889 5 | 0.42 6 | 0.0222 7 | 0.2756 8 | 0.0822 9 | 0.0043 10 | 0.0044 11 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/CSF1PO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0098 5 | 0.0475 6 | 0.2361 7 | 0.2328 8 | 0.3689 9 | 0.0918 10 | 0.0115 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D10S1248.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0089 4 | 0.0844 5 | 0.3667 6 | 0.2289 7 | 0.2178 8 | 0.0756 9 | 0.0133 10 | 0.0044 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D1S1677.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0022 4 | 0.02 5 | 0.1134 6 | 0.4733 7 | 0.3133 8 | 0.0689 9 | 0.0067 10 | 0.0022 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D22S1045.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1755 4 | 0.04 5 | 0.0111 6 | 0.0067 7 | 0.2356 8 | 0.28 9 | 0.1978 10 | 0.0533 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D3S4529.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0024 4 | 0.0024 5 | 0.1577 6 | 0.28 7 | 0.3688 8 | 0.1532 9 | 0.0333 10 | 0.0022 11 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D10S1248.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0089 4 | 0.0844 5 | 0.3667 6 | 0.2289 7 | 0.2178 8 | 0.0756 9 | 0.0133 10 | 0.0044 11 | 12 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D13S317.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.2852 4 | 0.1410 5 | 0.1344 6 | 0.2377 7 | 0.1541 8 | 0.0033 9 | 0.0098 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D16S539.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0098 4 | 0.2885 5 | 0.1213 6 | 0.2574 7 | 0.2164 8 | 0.0934 9 | 0.0115 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D7S820.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1262 4 | 0.0541 5 | 0.1672 6 | 0.3787 7 | 0.2197 8 | 0.0459 9 | 0.0066 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/vWA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.2639 5 | 0.0279 6 | 0.1689 7 | 0.2525 8 | 0.1902 9 | 0.082 10 | 0.0131 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/CSF1PO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0098 5 | 0.0475 6 | 0.2361 7 | 0.2328 8 | 0.3689 9 | 0.0918 10 | 0.0115 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D13S317.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.2852 4 | 0.1410 5 | 0.1344 6 | 0.2377 7 | 0.1541 8 | 0.0033 9 | 0.0098 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D16S539.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0098 4 | 0.2885 5 | 0.1213 6 | 0.2574 7 | 0.2164 8 | 0.0934 9 | 0.0115 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D7S820.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1262 4 | 0.0541 5 | 0.1672 6 | 0.3787 7 | 0.2197 8 | 0.0459 9 | 0.0066 10 | 0.0016 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/vWA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.2639 5 | 0.0279 6 | 0.1689 7 | 0.2525 8 | 0.1902 9 | 0.082 10 | 0.0131 11 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D10S1248.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0089 4 | 0.0844 5 | 0.3667 6 | 0.2289 7 | 0.2178 8 | 0.0756 9 | 0.0133 10 | 0.0044 11 | 12 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D22S1045.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.1755 4 | 0.0400 5 | 0.0111 6 | 0.0067 7 | 0.2356 8 | 0.2800 9 | 0.1978 10 | 0.0533 11 | -------------------------------------------------------------------------------- /xml/AGCU211/D10S1435.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.031 4 | 0.0044 5 | 0.04 6 | 0.16 7 | 0.34 8 | 0.2468 9 | 0.1467 10 | 0.0222 11 | 0.0089 12 | -------------------------------------------------------------------------------- /xml/AGCU211/D12ATA63.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0022 4 | 0.0156 5 | 0.3267 6 | 0.0311 7 | 0.0244 8 | 0.22 9 | 0.3044 10 | 0.0667 11 | 0.0089 12 | -------------------------------------------------------------------------------- /xml/AGCU211/D20S482.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.007 4 | 0.0132 5 | 0.0356 6 | 0.2821 7 | 0.411 8 | 0.1689 9 | 0.0755 10 | 0.0043 11 | 0.0024 12 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D5S818.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0311 4 | 0.0639 5 | 0.2049 6 | 0.3164 7 | 0.2443 8 | 0.123 9 | 0.0115 10 | 0.0016 11 | 0.0016 12 | 0.0016 13 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/PentaD.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0065 4 | 0.0696 5 | 0.3587 6 | 0.1130 7 | 0.1261 8 | 0.1826 9 | 0.1087 10 | 0.0261 11 | 0.0065 12 | 0.0022 13 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D8S1179.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.1115 5 | 0.0951 6 | 0.1262 7 | 0.2033 8 | 0.2082 9 | 0.1705 10 | 0.0721 11 | 0.0082 12 | 0.0033 13 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D5S818.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0311 4 | 0.0639 5 | 0.2049 6 | 0.3164 7 | 0.2443 8 | 0.123 9 | 0.0115 10 | 0.0016 11 | 0.0016 12 | 0.0016 13 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D8S1179.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.1115 5 | 0.0951 6 | 0.1262 7 | 0.2033 8 | 0.2082 9 | 0.1705 10 | 0.0721 11 | 0.0082 12 | 0.0033 13 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D12S391.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0168 4 | 0.0024 5 | 0.0697 6 | 0.2236 7 | 0.2212 8 | 0.1755 9 | 0.113 10 | 0.0938 11 | 0.0433 12 | 0.024 13 | 0.012 14 | 0.0048 15 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D2S1338.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0164 4 | 0.0705 5 | 0.1213 6 | 0.1262 7 | 0.1426 8 | 0.0230 9 | 0.0295 10 | 0.2131 11 | 0.1754 12 | 0.0738 13 | 0.0066 14 | 0.0016 15 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D12S391.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0168 4 | 0.0024 5 | 0.0697 6 | 0.2236 7 | 0.2212 8 | 0.1755 9 | 0.113 10 | 0.0938 11 | 0.0433 12 | 0.024 13 | 0.012 14 | 0.0048 15 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D2S1338.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0164 4 | 0.0705 5 | 0.1213 6 | 0.1262 7 | 0.1426 8 | 0.0230 9 | 0.0295 10 | 0.2131 11 | 0.1754 12 | 0.0738 13 | 0.0066 14 | 0.0016 15 | -------------------------------------------------------------------------------- /xml/AGCU211/D2S441.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0311 4 | 0.0044 5 | 0.0044 6 | 0.1933 7 | 0.0022 8 | 0.3756 9 | 0.0444 10 | 0.0244 11 | 0.0244 12 | 0.1379 13 | 0.0068 14 | 0.0022 15 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D2S441.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0044 4 | 0.0311 5 | 0.1933 6 | 0.0022 7 | 0.3756 8 | 0.0444 9 | 0.1733 10 | 0.0244 11 | 0.1379 12 | 0.0044 13 | 0.0068 14 | 0.0022 15 | 16 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D2S441.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0044 4 | 0.0311 5 | 0.1933 6 | 0.0022 7 | 0.3756 8 | 0.0444 9 | 0.1733 10 | 0.0244 11 | 0.1379 12 | 0.0044 13 | 0.0068 14 | 0.0022 15 | 16 | -------------------------------------------------------------------------------- /xml/AGCU211/D19S433.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0022 4 | 0.0468 5 | 0.0044 6 | 0.2511 7 | 0.0533 8 | 0.2422 9 | 0.1067 10 | 0.08 11 | 0.16 12 | 0.0133 13 | 0.0378 14 | 0.0022 15 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D19S433.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0049 5 | 0.0459 6 | 0.3049 7 | 0.0311 8 | 0.2525 9 | 0.0869 10 | 0.0656 11 | 0.1443 12 | 0.0197 13 | 0.0361 14 | 0.0066 15 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D21S11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0393 4 | 0.0115 5 | 0.3016 6 | 0.2377 7 | 0.0131 8 | 0.1098 9 | 0.0574 10 | 0.0279 11 | 0.1590 12 | 0.0049 13 | 0.0361 14 | 0.0016 15 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D19S433.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0049 5 | 0.0459 6 | 0.3049 7 | 0.0311 8 | 0.2525 9 | 0.0869 10 | 0.0656 11 | 0.1443 12 | 0.0197 13 | 0.0361 14 | 0.0066 15 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D21S11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0393 4 | 0.0115 5 | 0.3016 6 | 0.2377 7 | 0.0131 8 | 0.1098 9 | 0.0574 10 | 0.0279 11 | 0.1590 12 | 0.0049 13 | 0.0361 14 | 0.0016 15 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D6S1043.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0023 4 | 0.0023 5 | 0.0327 6 | 0.1005 7 | 0.1636 8 | 0.1121 9 | 0.1729 10 | 0.0117 11 | 0.007 12 | 0.0327 13 | 0.1776 14 | 0.1425 15 | 0.0374 16 | 0.0047 17 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D1S1656.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.069 4 | 0.042 5 | 0.092 6 | 0.076 7 | 0.001 8 | 0.321 9 | 0.226 10 | 0.007 11 | 0.080 12 | 0.051 13 | 0.010 14 | 0.022 15 | 0.002 16 | 17 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/D18S51.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0033 4 | 0.0049 5 | 0.0475 6 | 0.1738 7 | 0.2115 8 | 0.1738 9 | 0.1475 10 | 0.0656 11 | 0.0475 12 | 0.0426 13 | 0.0311 14 | 0.0295 15 | 0.0115 16 | 0.0049 17 | 0.0033 18 | 0.0016 19 | -------------------------------------------------------------------------------- /xml/GlobalFiler/D18S51.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0033 4 | 0.0049 5 | 0.0475 6 | 0.1738 7 | 0.2115 8 | 0.1738 9 | 0.1475 10 | 0.0656 11 | 0.0475 12 | 0.0426 13 | 0.0311 14 | 0.0295 15 | 0.0115 16 | 0.0049 17 | 0.0033 18 | 0.0016 19 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/FGA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0295 5 | 0.0393 6 | 0.0443 7 | 0.1377 8 | 0.0016 9 | 0.1525 10 | 0.0049 11 | 0.2295 12 | 0.0049 13 | 0.1885 14 | 0.0066 15 | 0.1033 16 | 0.1033 17 | 0.0377 18 | 0.0131 19 | -------------------------------------------------------------------------------- /xml/GlobalFiler/FGA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0016 4 | 0.0295 5 | 0.0393 6 | 0.0443 7 | 0.1377 8 | 0.0016 9 | 0.1525 10 | 0.0049 11 | 0.2295 12 | 0.0049 13 | 0.1885 14 | 0.0066 15 | 0.1033 16 | 0.1033 17 | 0.0377 18 | 0.0131 19 | -------------------------------------------------------------------------------- /xml/AGCU_EX22/PentaE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0516 4 | 0.0018 5 | 0.0089 6 | 0.0124 7 | 0.0552 8 | 0.1139 9 | 0.1263 10 | 0.048 11 | 0.0783 12 | 0.1068 13 | 0.0694 14 | 0.0658 15 | 0.0676 16 | 0.0712 17 | 0.0498 18 | 0.0338 19 | 0.0196 20 | 0.0107 21 | 0.0036 22 | 0.0018 23 | 0.0036 24 | -------------------------------------------------------------------------------- /js/calculator/xmlUtil.js: -------------------------------------------------------------------------------- 1 | function getAllete(xmlfile, allete) { 2 | var xmlhttp; 3 | if (window.XMLHttpRequest) { 4 | xmlhttp = new XMLHttpRequest(); 5 | } else { 6 | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 7 | } 8 | xmlhttp.open("GET", xmlfile, false); 9 | xmlhttp.send(); 10 | var xmlDoc = xmlhttp.responseXML; 11 | allete = allete.replace(".", "_"); 12 | if (allete == "a999") { 13 | alleteValue = Number(1 / 611); 14 | } else { 15 | try { 16 | alleteValue = xmlDoc.getElementsByTagName(allete)[0].childNodes[0].nodeValue; 17 | } catch (e) { 18 | alert("等位基因 [" + allete.replace("a", "") + "] 不存在"); 19 | } 20 | } 21 | return alleteValue; 22 | } -------------------------------------------------------------------------------- /js/calculator/CookieUtil.js: -------------------------------------------------------------------------------- 1 | function addCookie(objName, objValue, objHours) { //添加cookie 2 | var str = objName + "=" + escape(objValue); 3 | if (objHours > 0) { //为时不设定过期时间,浏览器关闭时cookie自动消失 4 | var date = new Date(); 5 | var ms = objHours * 3600 * 1000; 6 | date.setTime(date.getTime() + ms); 7 | str += "; expires=" + date.toGMTString(); 8 | } 9 | document.cookie = str; 10 | } 11 | 12 | function getCookie(name) { 13 | var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)")); 14 | if (arr != null) return unescape(arr[2]); 15 | return null; 16 | } 17 | 18 | function delCookie(name) { 19 | var exp = new Date(); 20 | exp.setTime(exp.getTime() - 1); 21 | var cval = getCookie(name); 22 | if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString(); 23 | } -------------------------------------------------------------------------------- /xml/GlobalFiler/SE33.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.001 4 | 0.003 5 | 0.007 6 | 0.001 7 | 0.025 8 | 0.044 9 | 0.001 10 | 0.059 11 | 0.002 12 | 0.058 13 | 0.050 14 | 0.010 15 | 0.041 16 | 0.002 17 | 0.017 18 | 0.019 19 | 0.031 20 | 0.009 21 | 0.044 22 | 0.003 23 | 0.047 24 | 0.073 25 | 0.067 26 | 0.001 27 | 0.102 28 | 0.001 29 | 0.083 30 | 0.001 31 | 0.075 32 | 0.001 33 | 0.060 34 | 0.023 35 | 0.001 36 | 0.022 37 | 0.003 38 | 0.003 39 | 0.003 40 | 0.001 41 | 42 | -------------------------------------------------------------------------------- /js/calculator/calculatorHelper.js: -------------------------------------------------------------------------------- 1 | function findObject(theObj, theDoc) { 2 | var p, i, foundObj; 3 | if (!theDoc) theDoc = document; 4 | if ((p = theObj.indexOf("?")) > 0 && parent.frames.length) { 5 | theDoc = parent.frames[theObj.substring(p + 1)].document; 6 | theObj = theObj.substring(0, p); 7 | } 8 | if (!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; 9 | for (i = 0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; 10 | for (i = 0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObject(theObj, theDoc.layers[i].document); 11 | if (!foundObj && document.getElementById) foundObj = document.getElementById(theObj); 12 | return foundObj; 13 | } 14 | 15 | function reloadValidate() { 16 | $('form').validate({ 17 | onBlur: true, 18 | eachValidField: function () { 19 | $(this).closest('div').removeClass('error').addClass('success'); 20 | }, 21 | eachInvalidField: function () { 22 | $(this).closest('div').removeClass('success').addClass('error'); 23 | } 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /spec/SpecRunnerForITO.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Jasmine Spec Runner 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /spec/SpecRunnerForParents.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Jasmine Spec Runner 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /spec/SpecRunnerForSingleParent.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Jasmine Spec Runner 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /js/calculator/AGCU_EX22/piSingleParent.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var C1 = findObject("C1_" + (rowID), document).value; 33 | var C2 = findObject("C2_" + (rowID), document).value; 34 | var AF1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + AF1); 35 | var AF2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + AF2); 36 | var C1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + C1); 37 | var C2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + C2); 38 | var pi = 0; 39 | 40 | if (condition_qq_qq(C1, C2, AF1, AF2)) { 41 | pi = 1 / Number(C1value); 42 | } else if (condition_pq_qq(C1, C2, AF1, AF2)) { 43 | pi = 1 / (Number(AF1value) * 2); 44 | } else if (condition_qq_qr(C1, C2, AF1, AF2)) { 45 | pi = 1 / (Number(C1value) * 2); 46 | } else if (condition_pq_pq(C1, C2, AF1, AF2)) { 47 | pi = (Number(C1value) + Number(C2value)) / (4 * Number(C1value) * Number(C2value)); 48 | } else if (condition_pq_qr(C1, C2, AF1, AF2)) { 49 | if (C1 == AF1 || C1 == AF2) { 50 | pi = 1 / (4 * Number(C1value)); 51 | } else if (C2 == AF1 || C2 == AF2) { 52 | pi = 1 / (4 * Number(C2value)); 53 | } 54 | } 55 | 56 | var PI = findObject("PI_" + rowID, document); 57 | PI.innerHTML = pi.toFixed(6); 58 | 59 | addCookie("piSingleParentPI_" + rowID, pi.toFixed(6), 1); 60 | 61 | return(pi); 62 | } -------------------------------------------------------------------------------- /js/calculator/GlobalFiler/piSingleParent.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var C1 = findObject("C1_" + (rowID), document).value; 33 | var C2 = findObject("C2_" + (rowID), document).value; 34 | var AF1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + AF1); 35 | var AF2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + AF2); 36 | var C1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + C1); 37 | var C2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + C2); 38 | var pi = 0; 39 | 40 | if (condition_qq_qq(C1, C2, AF1, AF2)) { 41 | pi = 1 / Number(C1value); 42 | } else if (condition_pq_qq(C1, C2, AF1, AF2)) { 43 | pi = 1 / (Number(AF1value) * 2); 44 | } else if (condition_qq_qr(C1, C2, AF1, AF2)) { 45 | pi = 1 / (Number(C1value) * 2); 46 | } else if (condition_pq_pq(C1, C2, AF1, AF2)) { 47 | pi = (Number(C1value) + Number(C2value)) / (4 * Number(C1value) * Number(C2value)); 48 | } else if (condition_pq_qr(C1, C2, AF1, AF2)) { 49 | if (C1 == AF1 || C1 == AF2) { 50 | pi = 1 / (4 * Number(C1value)); 51 | } else if (C2 == AF1 || C2 == AF2) { 52 | pi = 1 / (4 * Number(C2value)); 53 | } 54 | } 55 | 56 | var PI = findObject("PI_" + rowID, document); 57 | PI.innerHTML = pi.toFixed(6); 58 | 59 | addCookie("piSingleParentPI_" + rowID, pi.toFixed(6), 1); 60 | 61 | return(pi); 62 | } -------------------------------------------------------------------------------- /js/calculator/AGCU211/piSingleParent.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var C1 = findObject("C1_" + (rowID), document).value; 33 | var C2 = findObject("C2_" + (rowID), document).value; 34 | var AF1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + AF1); 35 | var AF2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + AF2); 36 | var C1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + C1); 37 | var C2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + C2); 38 | var pi = 0; 39 | 40 | if (condition_qq_qq(C1, C2, AF1, AF2)) { 41 | pi = 1 / Number(C1value); 42 | } else if (condition_pq_qq(C1, C2, AF1, AF2)) { 43 | pi = 1 / (Number(AF1value) * 2); 44 | } else if (condition_qq_qr(C1, C2, AF1, AF2)) { 45 | pi = 1 / (Number(C1value) * 2); 46 | } else if (condition_pq_pq(C1, C2, AF1, AF2)) { 47 | pi = (Number(C1value) + Number(C2value)) / (4 * Number(C1value) * Number(C2value)); 48 | } else if (condition_pq_qr(C1, C2, AF1, AF2)) { 49 | if (C1 == AF1 || C1 == AF2) { 50 | pi = 1 / (4 * Number(C1value)); 51 | } else if (C2 == AF1 || C2 == AF2) { 52 | pi = 1 / (4 * Number(C2value)); 53 | } 54 | } 55 | 56 | var PI = findObject("PI_" + rowID, document); 57 | PI.innerHTML = pi.toFixed(6); 58 | 59 | addCookie("piSingleParentPI_" + rowID, pi.toFixed(6), 1); 60 | 61 | return(pi); 62 | } -------------------------------------------------------------------------------- /js/calculator/AGCU_EX22/newphw-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (1 / 2) + 1 / (2 * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 2; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 2; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 2) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 2) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 2) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 2) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 2; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 2; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/calculator/GlobalFiler/newphw-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (1 / 2) + 1 / (2 * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 2; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 2; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 2) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 2) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 2) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 2) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 2; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 2; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/calculator/AGCU211/nephew-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (1 / 2) + 1 / (2 * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 2; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 2; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 2) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 2) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 2) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 2) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 2) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 2; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 2; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/calculator/AGCU_EX22/grand-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (Number(A1value) + 1) * (Number(A1value) + 1) / (4 * Number(A1value) * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 4; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 4; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 4) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 4) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 4) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 4) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 4; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 4; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/calculator/GlobalFiler/grand-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (Number(A1value) + 1) * (Number(A1value) + 1) / (4 * Number(A1value) * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 4; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 4; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 4) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 4) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 4) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 4) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 4; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 4; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/calculator/AGCU211/grand-ito.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var A1 = findObject("A1_" + (rowID), document).value; 31 | var A2 = findObject("A2_" + (rowID), document).value; 32 | var B1 = findObject("B1_" + (rowID), document).value; 33 | var B2 = findObject("B2_" + (rowID), document).value; 34 | var A1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + A1); 35 | var A2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + A2); 36 | var B1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + B1); 37 | var B2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + B2); 38 | var pi = 0; 39 | 40 | if (condition_pp_pp(A1, A2, B1, B2)) { 41 | pi = (Number(A1value) + 1) * (Number(A1value) + 1) / (4 * Number(A1value) * Number(A1value)); 42 | } 43 | 44 | if (condition_pp_pq(A1, A2, B1, B2)) { 45 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 46 | } 47 | 48 | if (condition_pp_qq(A1, A2, B1, B2)) { 49 | pi = 1 / 4; 50 | } 51 | 52 | if (condition_pp_qr(A1, A2, B1, B2)) { 53 | pi = 1 / 4; 54 | } 55 | 56 | if (condition_pq_pp_or_qq(A1, A2, B1, B2)) { 57 | if (A1 == B1) { 58 | pi = (1 / 4) + 1 / (4 * Number(A1value)); 59 | } else { 60 | pi = (1 / 4) + 1 / (4 * Number(A2value)); 61 | } 62 | } 63 | 64 | if (condition_pq_pq(A1, A2, B1, B2)) { 65 | pi = (1 / 4) + (1 / (8 * Number(A1value))) + (1 / (8 * Number(A2value))) + (1 / (8 * Number(A1value)) * Number(A2value)); 66 | } 67 | 68 | if (condition_pq_pr_or_qr(A1, A2, B1, B2)) { 69 | if (A1 == B1 || A2 == B2) { 70 | pi = (1 / 4) + 1 / (8 * Number(A1value)); 71 | } else { 72 | pi = (1 / 4) + 1 / (8 * Number(A2value)); 73 | } 74 | } 75 | 76 | if (condition_pq_rr(A1, A2, B1, B2)) { 77 | pi = 1 / 4; 78 | } 79 | 80 | if (condition_pq_rs(A2, A2, B1, B2)) { 81 | pi = 1 / 4; 82 | } 83 | 84 | var PI = findObject("PI_" + rowID, document); 85 | PI.innerHTML = pi.toFixed(6); 86 | 87 | addCookie("itoPI_" + rowID, pi.toFixed(6), 1); 88 | 89 | return(pi); 90 | } -------------------------------------------------------------------------------- /js/validator/jquery-validate.min.js: -------------------------------------------------------------------------------- 1 | /* http://plugins.jquery.com/validate */ 2 | ;(function(a,b,c,d){var e=['input:not([type]),input[type="color"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="email"],input[type="file"],input[type="hidden"],input[type="month"],input[type="number"],input[type="password"],input[type="range"],input[type="search"],input[type="tel"],input[type="text"],input[type="time"],input[type="url"],input[type="week"],textarea',"select",'input[type="checkbox"],input[type="radio"]'],f=e.join(","),g={},h=function(a,c){var f={pattern:!0,conditional:!0,required:!0},h=b(this),i=h.val()||"",j=h.data("validate"),k=j!==d?g[j]:{},l=h.data("prepare")||k.prepare,m=h.data("pattern")||("regexp"==b.type(k.pattern)?k.pattern:/(?:)/),n=h.attr("data-ignore-case")||h.data("ignoreCase")||k.ignoreCase,o=h.data("mask")||k.mask,p=h.data("conditional")||k.conditional,q=h.data("required"),r=h.data("describedby")||k.describedby,s=h.data("description")||k.description,t=h.data("trim"),u=/^(true|)$/i,v=/^false$/i,s=b.isPlainObject(s)?s:c.description[s]||{};if(q=""!=q?q||!!k.required:!0,t=""!=t?t||!!k.trim:!0,u.test(t)&&(i=b.trim(i)),b.isFunction(l)?i=l.call(h,i)+"":b.isFunction(c.prepare[l])&&(i=c.prepare[l].call(h,i)+""),"regexp"!=b.type(m)&&(n=!v.test(n),m=n?RegExp(m,"i"):RegExp(m)),p!=d)if(b.isFunction(p))f.conditional=!!p.call(h,i,c);else for(var x=p.split(/[\s\t]+/),y=0,z=x.length;z>y;y++)c.conditional.hasOwnProperty(x[y])&&!c.conditional[x[y]].call(h,i,c)&&(f.conditional=!1);if(q=u.test(q),q&&(h.is(e[0]+","+e[1])?!i.length>0&&(f.required=!1):h.is(e[2])&&(h.is("[name]")?0==b('[name="'+h.prop("name")+'"]:checked').length&&(f.required=!1):f.required=h.is(":checked"))),h.is(e[0]))if(m.test(i)){if("keyup"!=a.type&&o!==d){for(var A=i.match(m),B=0,z=A.length;z>B;B++)o=o.replace(RegExp("\\$\\{"+B+"(?::`([^`]*)`)?\\}","g"),A[B]!==d?A[B]:"$1");o=o.replace(/\$\{\d+(?::`([^`]*)`)?\}/g,"$1"),m.test(o)&&h.val(o)}}else q?f.pattern=!1:i.length>0&&(f.pattern=!1);var C=b('[id="'+r+'"]'),D=s.valid;return C.length>0&&"keyup"!=a.type&&(f.required?f.pattern?f.conditional||(D=s.conditional):D=s.pattern:D=s.required,C.html(D||"")),"function"==typeof k.each&&k.each.call(h,a,f,c),c.eachField.call(h,a,f,c),f.required&&f.pattern&&f.conditional?(c.waiAria&&h.prop("aria-invalid",!1),"function"==typeof k.valid&&k.valid.call(h,a,f,c),c.eachValidField.call(h,a,f,c)):(c.waiAria&&h.prop("aria-invalid",!0),"function"==typeof k.invalid&&k.invalid.call(h,a,f,c),c.eachInvalidField.call(h,a,f,c)),f};b.extend({validateExtend:function(a){return b.extend(g,a)},validateSetup:function(c){return b.extend(a,c)}}).fn.extend({validate:function(c){return c=b.extend({},a,c),b(this).validateDestroy().each(function(){var a=b(this);if(a.is("form")){a.data(name,{options:c});var d=a.find(f),g=c.namespace;a.is("[id]")&&(d=d.add('[form="'+a.prop("id")+'"]').filter(f)),d=d.filter(c.filter),c.onKeyup&&d.filter(e[0]).on("keyup."+g,function(a){h.call(this,a,c)}),c.onBlur&&d.on("blur."+g,function(a){h.call(this,a,c)}),c.onChange&&d.on("change."+g,function(a){h.call(this,a,c)}),c.onSubmit&&a.on("submit."+g,function(e){var f=!0;d.each(function(){var a=h.call(this,e,c);a.pattern&&a.conditional&&a.required||(f=!1)}),f?(c.sendForm||e.preventDefault(),b.isFunction(c.valid)&&c.valid.call(a,e,c)):(e.preventDefault(),b.isFunction(c.invalid)&&c.invalid.call(a,e,c))})}})},validateDestroy:function(){var a=b(this),c=a.data(name);if(a.is("form")&&b.isPlainObject(c)&&"string"==typeof c.options.nameSpace){var d=a.removeData(name).find(f).add(a);a.is("[id]")&&(d=d.add(b('[form="'+a.prop("id")+'"]').filter(f))),d.off("."+c.options.nameSpace)}return a}})})({sendForm:!0,waiAria:!0,onSubmit:!0,onKeyup:!1,onBlur:!1,onChange:!1,nameSpace:"validate",conditional:{},prepare:{},description:{},eachField:$.noop,eachInvalidField:$.noop,eachValidField:$.noop,invalid:$.noop,valid:$.noop,filter:"*"},jQuery,window); -------------------------------------------------------------------------------- /spec/itoSpec.js: -------------------------------------------------------------------------------- 1 | describe("condition pp pp", function () { 2 | it("should return true when input is 10 10 10 10", function () { 3 | expect(condition_pp_pp(10, 10, 10, 10)).toBe(true); 4 | }); 5 | it("should return false when input is 10 10 10 11", function () { 6 | expect(condition_pp_pp(10, 10, 10, 11)).toBe(false); 7 | }); 8 | }); 9 | 10 | describe("condtion pp pq", function () { 11 | it("should return true when input is 10 10 10 12", function () { 12 | expect(condition_pp_pq(10, 10, 10, 12)).toBe(true); 13 | }); 14 | it("should return true when input is 10 10 12 10", function () { 15 | expect(condition_pp_pq(10, 10, 12, 10)).toBe(true); 16 | }); 17 | it("should return true when input is 10 10 10 10", function () { 18 | expect(condition_pp_pq(10, 10, 10, 10)).toBe(false); 19 | }); 20 | }); 21 | 22 | describe("condition pp qq", function () { 23 | it("should return true when input 10 10 12 12", function () { 24 | expect(condition_pp_qq(10, 10, 12, 12)).toBe(true); 25 | }); 26 | it("should return false when input 10 10 10 12", function () { 27 | expect(condition_pp_qq(10, 10, 10, 12)).toBe(false); 28 | }); 29 | it("should return false when input 10 10 11 12", function () { 30 | expect(condition_pp_qq(10, 10, 11, 12)).toBe(false); 31 | }); 32 | }); 33 | 34 | describe("condition pp qr", function () { 35 | it("should return true when input 10 10 12 13", function () { 36 | expect(condition_pp_qr(10, 10, 12, 13)).toBe(true); 37 | }); 38 | it("should return false when input 10 10 12 12", function () { 39 | expect(condition_pp_qr(10, 10, 12, 12)).toBe(false); 40 | }); 41 | it("should return false when input 10 10 10 12", function () { 42 | expect(condition_pp_qr(10, 10, 10, 12)).toBe(false); 43 | }); 44 | }); 45 | 46 | describe("condtion pq pp/qq", function () { 47 | it("should return true when input is 10 11 10 10", function () { 48 | expect(condition_pq_pp_or_qq(10, 11, 10, 10)).toBe(true); 49 | }); 50 | it("should return true when input is 11 10 10 10", function () { 51 | expect(condition_pq_pp_or_qq(11, 10, 10, 10)).toBe(true); 52 | }); 53 | it("should return false when input is 11 11 10 10", function () { 54 | expect(condition_pq_pp_or_qq(11, 11, 10, 10)).toBe(false); 55 | }); 56 | }) 57 | 58 | describe("condition pq pq", function () { 59 | it("should return true when input is 10 11 10 11", function () { 60 | expect(condition_pq_pq(10, 11, 10, 11)).toBe(true); 61 | }); 62 | it("should return true when input is 11 10 10 11", function () { 63 | expect(condition_pq_pq(11, 10, 10, 11)).toBe(true); 64 | }); 65 | it("should return false when input is 10 10 10 11", function () { 66 | expect(condition_pq_pq(10, 10, 10, 11)).toBe(false); 67 | }); 68 | it("should return false when input is 10 10 10 10", function () { 69 | expect(condition_pq_pq(10, 10, 10, 10)).toBe(false); 70 | }); 71 | }); 72 | 73 | describe("condition pq pr", function () { 74 | it("should return true when input is 10 11 10 12", function () { 75 | expect(condition_pq_pr_or_qr(10, 11, 10, 12)).toBe(true); 76 | }); 77 | it("should return true when input is 11 10 10 12", function () { 78 | expect(condition_pq_pr_or_qr(11, 10, 10, 12)).toBe(true); 79 | }); 80 | it("should return false when input is 10 10 10 12", function () { 81 | expect(condition_pq_pr_or_qr(10, 10, 10, 12)).toBe(false); 82 | }); 83 | }); 84 | 85 | describe("condition pq rr", function () { 86 | it("should return true when input is 10 12 13 13", function () { 87 | expect(condition_pq_rr(10, 12, 13, 13)).toBe(true); 88 | }); 89 | }); 90 | 91 | describe("condition pq rs", function () { 92 | it("should return true when input is 10 12 13 14", function () { 93 | expect(condition_pq_rs(10, 12, 13, 14)).toBe(true); 94 | }); 95 | }); -------------------------------------------------------------------------------- /js/calculator/AGCU_EX22/piParents.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var M1 = findObject("M1_" + (rowID), document).value; 33 | var M2 = findObject("M2_" + (rowID), document).value; 34 | var C1 = findObject("C1_" + (rowID), document).value; 35 | var C2 = findObject("C2_" + (rowID), document).value; 36 | 37 | var AF1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + AF1); 38 | var AF2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + AF2); 39 | var M1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + M1); 40 | var M2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + M2); 41 | var C1value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + C1); 42 | var C2value = getAllete("../../../xml/AGCU_EX22/" + locus + ".xml", "a" + C2); 43 | var pi = 0; 44 | 45 | if (condition_qq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 46 | pi = 1 / Number(C1value); 47 | } 48 | 49 | if (condition_qq_qq_qq(C1, C2, M1, M2, AF1, AF2)) { 50 | pi = 1 / Number(C1value); 51 | } 52 | 53 | if (condition_qq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 54 | pi = 1 / (2 * Number(C1value)); 55 | } 56 | 57 | if (condition_qq_qq_qr(C1, C2, M1, M2, AF1, AF2)) { 58 | pi = 1 / (2 * Number(C1value)); 59 | } 60 | 61 | if (condition_pq_pp_qq(C1, C2, M1, M2, AF1, AF2)) { 62 | pi = 1 / Number(AF1value); 63 | } 64 | 65 | if (condition_pq_pr_qq(C1, C2, M1, M2, AF1, AF2)) { 66 | pi = 1 / Number(AF1value); 67 | } 68 | 69 | if (condition_pq_pp_pq(C1, C2, M1, M2, AF1, AF2)) { 70 | if (C1 == M1) { 71 | pi = 1 / (2 * Number(C2value)); 72 | } else { 73 | pi = 1 / (2 * Number(C1value)); 74 | } 75 | } 76 | 77 | if (condition_pq_pr_or_ps_pq(C1, C2, M1, M2, AF1, AF2)) { 78 | if (M1 == C1 || M1 == C2) { 79 | pi = 1 / (2 * Number(M1value)); 80 | } else { 81 | pi = 1 / (2 * Number(M2value)); 82 | } 83 | } 84 | 85 | if (condition_pq_pp_qr(C1, C2, M1, M2, AF1, AF2)) { 86 | if (C1 == M1) { 87 | pi = 1 / (2 * Number(C2value)); 88 | } else { 89 | pi = 1 / (2 * Number(C1value)); 90 | } 91 | } 92 | 93 | if (condition_pq_pr_or_ps_qr(C1, C2, M1, M2, AF1, AF2)) { 94 | if (C1 == AF1 || C1 == AF2) { 95 | pi = 1 / (2 * Number(C1value)); 96 | } else { 97 | pi = 1 / (2 * Number(C2value)); 98 | } 99 | } 100 | 101 | if (condition_pq_pq_pq(C1, C2, M1, M2, AF1, AF2)) { 102 | pi = 1 / (Number(C1value) + Number(C2value)); 103 | } 104 | 105 | if (condition_pq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 106 | pi = 1 / (Number(C1value) + Number(C2value)); 107 | } 108 | 109 | if (condition_pq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 110 | pi = 1 / (2 * (Number(C1value) + Number(C2value))); 111 | } 112 | 113 | var PI = findObject("PI_" + rowID, document); 114 | PI.innerHTML = pi.toFixed(6); 115 | 116 | addCookie("piParentsPI_" + rowID, pi.toFixed(6), 1); 117 | 118 | return(pi); 119 | } -------------------------------------------------------------------------------- /js/calculator/GlobalFiler/piParents.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var M1 = findObject("M1_" + (rowID), document).value; 33 | var M2 = findObject("M2_" + (rowID), document).value; 34 | var C1 = findObject("C1_" + (rowID), document).value; 35 | var C2 = findObject("C2_" + (rowID), document).value; 36 | 37 | var AF1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + AF1); 38 | var AF2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + AF2); 39 | var M1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + M1); 40 | var M2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + M2); 41 | var C1value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + C1); 42 | var C2value = getAllete("../../../xml/GlobalFiler/" + locus + ".xml", "a" + C2); 43 | var pi = 0; 44 | 45 | if (condition_qq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 46 | pi = 1 / Number(C1value); 47 | } 48 | 49 | if (condition_qq_qq_qq(C1, C2, M1, M2, AF1, AF2)) { 50 | pi = 1 / Number(C1value); 51 | } 52 | 53 | if (condition_qq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 54 | pi = 1 / (2 * Number(C1value)); 55 | } 56 | 57 | if (condition_qq_qq_qr(C1, C2, M1, M2, AF1, AF2)) { 58 | pi = 1 / (2 * Number(C1value)); 59 | } 60 | 61 | if (condition_pq_pp_qq(C1, C2, M1, M2, AF1, AF2)) { 62 | pi = 1 / Number(AF1value); 63 | } 64 | 65 | if (condition_pq_pr_qq(C1, C2, M1, M2, AF1, AF2)) { 66 | pi = 1 / Number(AF1value); 67 | } 68 | 69 | if (condition_pq_pp_pq(C1, C2, M1, M2, AF1, AF2)) { 70 | if (C1 == M1) { 71 | pi = 1 / (2 * Number(C2value)); 72 | } else { 73 | pi = 1 / (2 * Number(C1value)); 74 | } 75 | } 76 | 77 | if (condition_pq_pr_or_ps_pq(C1, C2, M1, M2, AF1, AF2)) { 78 | if (M1 == C1 || M1 == C2) { 79 | pi = 1 / (2 * Number(M1value)); 80 | } else { 81 | pi = 1 / (2 * Number(M2value)); 82 | } 83 | } 84 | 85 | if (condition_pq_pp_qr(C1, C2, M1, M2, AF1, AF2)) { 86 | if (C1 == M1) { 87 | pi = 1 / (2 * Number(C2value)); 88 | } else { 89 | pi = 1 / (2 * Number(C1value)); 90 | } 91 | } 92 | 93 | if (condition_pq_pr_or_ps_qr(C1, C2, M1, M2, AF1, AF2)) { 94 | if (C1 == AF1 || C1 == AF2) { 95 | pi = 1 / (2 * Number(C1value)); 96 | } else { 97 | pi = 1 / (2 * Number(C2value)); 98 | } 99 | } 100 | 101 | if (condition_pq_pq_pq(C1, C2, M1, M2, AF1, AF2)) { 102 | pi = 1 / (Number(C1value) + Number(C2value)); 103 | } 104 | 105 | if (condition_pq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 106 | pi = 1 / (Number(C1value) + Number(C2value)); 107 | } 108 | 109 | if (condition_pq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 110 | pi = 1 / (2 * (Number(C1value) + Number(C2value))); 111 | } 112 | 113 | var PI = findObject("PI_" + rowID, document); 114 | PI.innerHTML = pi.toFixed(6); 115 | 116 | addCookie("piParentsPI_" + rowID, pi.toFixed(6), 1); 117 | 118 | return(pi); 119 | } -------------------------------------------------------------------------------- /js/calculator/AGCU211/piParents.js: -------------------------------------------------------------------------------- 1 | function generateSelectCode(rowID) { 2 | var code = ""; 25 | return(code); 26 | } 27 | 28 | function calculatePi(rowID) { 29 | var locus = findObject("locus_" + (rowID), document).value; 30 | var AF1 = findObject("AF1_" + (rowID), document).value; 31 | var AF2 = findObject("AF2_" + (rowID), document).value; 32 | var M1 = findObject("M1_" + (rowID), document).value; 33 | var M2 = findObject("M2_" + (rowID), document).value; 34 | var C1 = findObject("C1_" + (rowID), document).value; 35 | var C2 = findObject("C2_" + (rowID), document).value; 36 | 37 | var AF1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + AF1); 38 | var AF2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + AF2); 39 | var M1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + M1); 40 | var M2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + M2); 41 | var C1value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + C1); 42 | var C2value = getAllete("../../../xml/AGCU211/" + locus + ".xml", "a" + C2); 43 | var pi = 0; 44 | 45 | if (condition_qq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 46 | pi = 1 / Number(C1value); 47 | } 48 | 49 | if (condition_qq_qq_qq(C1, C2, M1, M2, AF1, AF2)) { 50 | pi = 1 / Number(C1value); 51 | } 52 | 53 | if (condition_qq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 54 | pi = 1 / (2 * Number(C1value)); 55 | } 56 | 57 | if (condition_qq_qq_qr(C1, C2, M1, M2, AF1, AF2)) { 58 | pi = 1 / (2 * Number(C1value)); 59 | } 60 | 61 | if (condition_pq_pp_qq(C1, C2, M1, M2, AF1, AF2)) { 62 | pi = 1 / Number(AF1value); 63 | } 64 | 65 | if (condition_pq_pr_qq(C1, C2, M1, M2, AF1, AF2)) { 66 | pi = 1 / Number(AF1value); 67 | } 68 | 69 | if (condition_pq_pp_pq(C1, C2, M1, M2, AF1, AF2)) { 70 | if (C1 == M1) { 71 | pi = 1 / (2 * Number(C2value)); 72 | } else { 73 | pi = 1 / (2 * Number(C1value)); 74 | } 75 | } 76 | 77 | if (condition_pq_pr_or_ps_pq(C1, C2, M1, M2, AF1, AF2)) { 78 | if (M1 == C1 || M1 == C2) { 79 | pi = 1 / (2 * Number(M1value)); 80 | } else { 81 | pi = 1 / (2 * Number(M2value)); 82 | } 83 | } 84 | 85 | if (condition_pq_pp_qr(C1, C2, M1, M2, AF1, AF2)) { 86 | if (C1 == M1) { 87 | pi = 1 / (2 * Number(C2value)); 88 | } else { 89 | pi = 1 / (2 * Number(C1value)); 90 | } 91 | } 92 | 93 | if (condition_pq_pr_or_ps_qr(C1, C2, M1, M2, AF1, AF2)) { 94 | if (C1 == AF1 || C1 == AF2) { 95 | pi = 1 / (2 * Number(C1value)); 96 | } else { 97 | pi = 1 / (2 * Number(C2value)); 98 | } 99 | } 100 | 101 | if (condition_pq_pq_pq(C1, C2, M1, M2, AF1, AF2)) { 102 | pi = 1 / (Number(C1value) + Number(C2value)); 103 | } 104 | 105 | if (condition_pq_pq_qq(C1, C2, M1, M2, AF1, AF2)) { 106 | pi = 1 / (Number(C1value) + Number(C2value)); 107 | } 108 | 109 | if (condition_pq_pq_qr(C1, C2, M1, M2, AF1, AF2)) { 110 | pi = 1 / (2 * (Number(C1value) + Number(C2value))); 111 | } 112 | 113 | var PI = findObject("PI_" + rowID, document); 114 | PI.innerHTML = pi.toFixed(6); 115 | 116 | addCookie("piParentsPI_" + rowID, pi.toFixed(6), 1); 117 | 118 | return(pi); 119 | } -------------------------------------------------------------------------------- /spec/piSingleParentSpec.js: -------------------------------------------------------------------------------- 1 | describe("For condition qq and qq", function () { 2 | it("it should return true when input is 12 12 12 12", function () { 3 | expect(condition_qq_qq(12, 12, 12, 12)).toBe(true); 4 | }); 5 | it("it should return false when input is 12 13 12 12", function () { 6 | expect(condition_qq_qq(12, 12, 12, 13)).toBe(false); 7 | }); 8 | }); 9 | 10 | describe("For condition pq and qq", function () { 11 | it("it should return true when input is 11 12 12 12", function () { 12 | expect(condition_pq_qq(11, 12, 12, 12)).toBe(true); 13 | }); 14 | it("it should return true when input is 12 11 12 12", function () { 15 | expect(condition_pq_qq(12, 11, 12, 12)).toBe(true); 16 | }); 17 | it("it should return false when input is 12 12 12 12", function () { 18 | expect(condition_pq_qq(12, 12, 12, 12)).toBe(false); 19 | }); 20 | it("it should return false when input is 11 12 11 12", function () { 21 | expect(condition_pq_qq(11, 12, 11, 12)).toBe(false); 22 | }); 23 | it("it should return false when input is 12 11 11 12", function () { 24 | expect(condition_pq_qq(12, 11, 11, 12)).toBe(false); 25 | }); 26 | it("it should return false when input is 11 12 11 13", function () { 27 | expect(condition_pq_qq(11, 12, 11, 13)).toBe(false); 28 | }); 29 | it("it should return false when input is 11 12 12 13", function () { 30 | expect(condition_pq_qq(11, 12, 12, 13)).toBe(false); 31 | }); 32 | }); 33 | 34 | describe("For condition qq and qr", function () { 35 | it("it should return true when input is 12 12 12 11", function () { 36 | expect(condition_qq_qr(12, 12, 12, 1)).toBe(true); 37 | }); 38 | it("it should return true when input is 12 12 11 12", function () { 39 | expect(condition_qq_qr(12, 12, 11, 12)).toBe(true); 40 | }); 41 | it("it should return false when input is 12 12 12 12", function () { 42 | expect(condition_qq_qr(12, 12, 12, 12)).toBe(false); 43 | }); 44 | it("it should return false when input is 11 12 11 12", function () { 45 | expect(condition_qq_qr(11, 12, 11, 12)).toBe(false); 46 | }); 47 | it("it should return false when input is 12 11 11 12", function () { 48 | expect(condition_qq_qr(12, 11, 11, 12)).toBe(false); 49 | }); 50 | it("it should return false when input is 11 12 11 13", function () { 51 | expect(condition_qq_qr(11, 12, 11, 13)).toBe(false); 52 | }); 53 | it("it should return false when input is 11 12 12 13", function () { 54 | expect(condition_qq_qr(11, 12, 12, 13)).toBe(false); 55 | }); 56 | }); 57 | 58 | describe("For condition pq and pq", function () { 59 | it("it should return true when input is 11 12 11 12", function () { 60 | expect(condition_pq_pq(11, 12, 11, 12)).toBe(true); 61 | }); 62 | it("it should return true when input is 12 11 11 12", function () { 63 | expect(condition_pq_pq(12, 11, 11, 12)).toBe(true); 64 | }); 65 | it("it should return false when input is 12 12 11 12", function () { 66 | expect(condition_pq_pq(12, 12, 11, 12)).toBe(false); 67 | }); 68 | it("it should return false when input is 11 12 12 12", function () { 69 | expect(condition_pq_pq(11, 12, 12, 12)).toBe(false); 70 | }); 71 | it("it should return false when input is 11 12 11 13", function () { 72 | expect(condition_pq_pq(11, 12, 11, 13)).toBe(false); 73 | }); 74 | it("it should return false when input is 11 12 12 13", function () { 75 | expect(condition_pq_pq(11, 12, 12, 13)).toBe(false); 76 | }); 77 | it("it should return false when input is 12 12 12 12", function () { 78 | expect(condition_pq_pq(12, 12, 12, 12)).toBe(false); 79 | }); 80 | }); 81 | 82 | describe("For condition pq and qr", function () { 83 | it("it should return true when input is 11 12 12 13", function () { 84 | expect(condition_pq_qr(11, 12, 12, 13)).toBe(true); 85 | }); 86 | it("it should return true when input is 11 12 11 13", function () { 87 | expect(condition_pq_qr(11, 12, 11, 13)).toBe(true); 88 | }); 89 | it("it should return true when input is 11 12 13 11", function () { 90 | expect(condition_pq_qr(11, 12, 13, 11)).toBe(true); 91 | }); 92 | it("it should return true when input is 11 12 13 12", function () { 93 | expect(condition_pq_qr(11, 12, 13, 12)).toBe(true); 94 | }); 95 | it("it should return false when input is 11 12 11 12", function () { 96 | expect(condition_pq_qr(11, 12, 11, 12)).toBe(false); 97 | }); 98 | it("it should return false when input is 12 11 11 12", function () { 99 | expect(condition_pq_qr(12, 11, 11, 12)).toBe(false); 100 | }); 101 | it("it should return false when input is 12 12 11 12", function () { 102 | expect(condition_pq_qr(12, 12, 11, 12)).toBe(false); 103 | }); 104 | it("it should return false when input is 11 12 12 12", function () { 105 | expect(condition_pq_qr(11, 12, 12, 12)).toBe(false); 106 | }); 107 | it("it should return false when input is 12 12 12 12", function () { 108 | expect(condition_pq_qr(12, 12, 12, 12)).toBe(false); 109 | }); 110 | }); -------------------------------------------------------------------------------- /exp/AGCU211/grand-ito-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 单个STR基因座常见血缘关系PI计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

单个STR基因座常见血缘关系PI计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座A1A2B1B2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/AGCU_EX22/grand-ito-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 单个STR基因座常见血缘关系PI计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

单个STR基因座常见血缘关系PI计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座A1A2B1B2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/GlobalFiler/grand-ito-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 单个STR基因座常见血缘关系PI计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

单个STR基因座常见血缘关系PI计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座A1A2B1B2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/AGCU211/pi-single-parent-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 没有检测母亲的共显性遗传标记计算父权指数计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

没有检测母亲的共显性遗传标记计算父权指数计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座AF1AF2C1C2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/AGCU_EX22/pi-single-parent-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 没有检测母亲的共显性遗传标记计算父权指数计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

没有检测母亲的共显性遗传标记计算父权指数计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座AF1AF2C1C2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/GlobalFiler/pi-single-parent-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 没有检测母亲的共显性遗传标记计算父权指数计算 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 | 29 |
30 |

没有检测母亲的共显性遗传标记计算父权指数计算

31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
基因座AF1AF2C1C2PI
51 |
52 |
53 | 基因座的个数: 54 | 0 55 | CPI: 56 | 0 57 | RCP: 58 | 0 59 |
60 | 帮助:如何拷贝数据到Word中? 61 |
62 | 150 | 151 | -------------------------------------------------------------------------------- /exp/AGCU211/pi-parents-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 共显性遗传标记计算父权指数 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 |
29 |

共显性遗传标记计算父权指数

30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
基因座AF1AF2M1M2C1C2PI
52 |
53 |
54 | 基因座的个数: 55 | 0 56 | CPI: 57 | 0 58 | RCP: 59 | 0 60 |
61 | 帮助:如何拷贝数据到Word中? 62 |
63 | 160 | 161 | -------------------------------------------------------------------------------- /exp/GlobalFiler/pi-parents-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 共显性遗传标记计算父权指数 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 |
29 |

共显性遗传标记计算父权指数

30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
基因座AF1AF2M1M2C1C2PI
52 |
53 |
54 | 基因座的个数: 55 | 0 56 | CPI: 57 | 0 58 | RCP: 59 | 0 60 |
61 | 帮助:如何拷贝数据到Word中? 62 |
63 | 160 | 161 | -------------------------------------------------------------------------------- /exp/AGCU_EX22/pi-parents-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 共显性遗传标记计算父权指数 5 | 6 | 7 | 8 | 9 | 10 | 26 | 27 |
28 |
29 |

共显性遗传标记计算父权指数

30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
基因座AF1AF2M1M2C1C2PI
52 |
53 |
54 | 基因座的个数: 55 | 0 56 | CPI: 57 | 0 58 | RCP: 59 | 0 60 |
61 | 帮助:如何拷贝数据到Word中? 62 |
63 | 163 | 164 | -------------------------------------------------------------------------------- /js/jasmine-1.3.1/jasmine.css: -------------------------------------------------------------------------------- 1 | body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; } 2 | 3 | #HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; } 4 | #HTMLReporter a { text-decoration: none; } 5 | #HTMLReporter a:hover { text-decoration: underline; } 6 | #HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; } 7 | #HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; } 8 | #HTMLReporter #jasmine_content { position: fixed; right: 100%; } 9 | #HTMLReporter .version { color: #aaaaaa; } 10 | #HTMLReporter .banner { margin-top: 14px; } 11 | #HTMLReporter .duration { color: #aaaaaa; float: right; } 12 | #HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; } 13 | #HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; } 14 | #HTMLReporter .symbolSummary li.passed { font-size: 14px; } 15 | #HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; } 16 | #HTMLReporter .symbolSummary li.failed { line-height: 9px; } 17 | #HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; } 18 | #HTMLReporter .symbolSummary li.skipped { font-size: 14px; } 19 | #HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; } 20 | #HTMLReporter .symbolSummary li.pending { line-height: 11px; } 21 | #HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; } 22 | #HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; } 23 | #HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } 24 | #HTMLReporter .runningAlert { background-color: #666666; } 25 | #HTMLReporter .skippedAlert { background-color: #aaaaaa; } 26 | #HTMLReporter .skippedAlert:first-child { background-color: #333333; } 27 | #HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; } 28 | #HTMLReporter .passingAlert { background-color: #a6b779; } 29 | #HTMLReporter .passingAlert:first-child { background-color: #5e7d00; } 30 | #HTMLReporter .failingAlert { background-color: #cf867e; } 31 | #HTMLReporter .failingAlert:first-child { background-color: #b03911; } 32 | #HTMLReporter .results { margin-top: 14px; } 33 | #HTMLReporter #details { display: none; } 34 | #HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; } 35 | #HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; } 36 | #HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } 37 | #HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; } 38 | #HTMLReporter.showDetails .summary { display: none; } 39 | #HTMLReporter.showDetails #details { display: block; } 40 | #HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; } 41 | #HTMLReporter .summary { margin-top: 14px; } 42 | #HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; } 43 | #HTMLReporter .summary .specSummary.passed a { color: #5e7d00; } 44 | #HTMLReporter .summary .specSummary.failed a { color: #b03911; } 45 | #HTMLReporter .description + .suite { margin-top: 0; } 46 | #HTMLReporter .suite { margin-top: 14px; } 47 | #HTMLReporter .suite a { color: #333333; } 48 | #HTMLReporter #details .specDetail { margin-bottom: 28px; } 49 | #HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; } 50 | #HTMLReporter .resultMessage { padding-top: 14px; color: #333333; } 51 | #HTMLReporter .resultMessage span.result { display: block; } 52 | #HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; } 53 | 54 | #TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ } 55 | #TrivialReporter a:visited, #TrivialReporter a { color: #303; } 56 | #TrivialReporter a:hover, #TrivialReporter a:active { color: blue; } 57 | #TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; } 58 | #TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; } 59 | #TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; } 60 | #TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; } 61 | #TrivialReporter .runner.running { background-color: yellow; } 62 | #TrivialReporter .options { text-align: right; font-size: .8em; } 63 | #TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; } 64 | #TrivialReporter .suite .suite { margin: 5px; } 65 | #TrivialReporter .suite.passed { background-color: #dfd; } 66 | #TrivialReporter .suite.failed { background-color: #fdd; } 67 | #TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; } 68 | #TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; } 69 | #TrivialReporter .spec.failed { background-color: #fbb; border-color: red; } 70 | #TrivialReporter .spec.passed { background-color: #bfb; border-color: green; } 71 | #TrivialReporter .spec.skipped { background-color: #bbb; } 72 | #TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; } 73 | #TrivialReporter .passed { background-color: #cfc; display: none; } 74 | #TrivialReporter .failed { background-color: #fbb; } 75 | #TrivialReporter .skipped { color: #777; background-color: #eee; display: none; } 76 | #TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; } 77 | #TrivialReporter .resultMessage .mismatch { color: black; } 78 | #TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; } 79 | #TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; } 80 | #TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; } 81 | #TrivialReporter #jasmine_content { position: fixed; right: 100%; } 82 | #TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; } 83 | -------------------------------------------------------------------------------- /help/developer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Relations - Blood relation between you and another person 5 | 6 | 7 | 8 | 9 | 10 | 11 | 46 | 47 | 48 |
49 | 154 |
155 |
156 |
157 |
158 |
159 | 160 |
161 |

朱本威 Java软件开发工程师 就职于ThoughtWorks中国 个人博客

163 |
164 |
165 | 166 |
167 | 168 |
169 | 171 | 172 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /help/how-to-copy-data-to-word.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Relations - Blood relation between you and another person 5 | 6 | 7 | 8 | 9 | 10 | 11 | 46 | 47 | 48 |
49 | 154 |
155 |
156 |
157 |
158 |
159 | 160 |

1.得到计算结果

161 | 162 | 163 |

2.全选计算结果

164 | 165 | 166 |

3.拷贝到文本文档中

167 | 168 | 169 |

4.拷贝文本文档中的数据到word中

170 | 171 | 172 |

5.选中word中的内容,点击插入表格

173 | 174 |
175 |
176 |
177 | 179 | 180 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Relations - Blood relation between you and another person 5 | 6 | 7 | 8 | 9 | 10 | 11 | 46 | 47 |
48 | 156 |
157 | 158 | 159 | 161 | 162 | 163 | 164 | 165 | 166 |

167 | 如何使用 168 |

169 |
170 |
171 |
172 | 174 | 175 | 176 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /js/calculator/ito.js: -------------------------------------------------------------------------------- 1 | function loadTableFromCookie() { 2 | var linesCount = getCookie("itoLinesCount"); 3 | for (var i = 1; i <= Number(linesCount); i++) { 4 | var locus = getCookie("itoLocus_" + i); 5 | var A1 = getCookie("itoA1_" + i); 6 | var A2 = getCookie("itoA2_" + i); 7 | var B1 = getCookie("itoB1_" + i); 8 | var B2 = getCookie("itoB2_" + i); 9 | if (!(A1 == null && A2 == null && B1 == null && B2 == null)) { 10 | itoLoadRow(i, locus, A1, A2, B1, B2); 11 | } 12 | } 13 | } 14 | 15 | function itoLoadRow(rowID, locus, A1, A2, B1, B2) { 16 | var regularExpression = "^[0-9]+(\\.[0-9]+)?$"; 17 | var itoTrLastIndex = findObject("itoTrLastIndex", document); 18 | var itoCurrentCount = findObject("itoCurrentCount", document); 19 | var itoTable = findObject("itoTable", document); 20 | var newTR = itoTable.insertRow(itoTable.rows.length); 21 | 22 | newTR.id = "row" + rowID; 23 | var newAllele = newTR.insertCell(0); 24 | newAllele.innerHTML = generateSelectCode(rowID); 25 | var newA1 = newTR.insertCell(1); 26 | newA1.innerHTML = "
"; 27 | var newA2 = newTR.insertCell(2); 28 | newA2.innerHTML = "
"; 29 | var newB1 = newTR.insertCell(3); 30 | newB1.innerHTML = "
"; 31 | var newB2 = newTR.insertCell(4); 32 | newB2.innerHTML = "
"; 33 | var newPi = newTR.insertCell(5); 34 | newPi.innerHTML = ""; 35 | var newDeleteTD = newTR.insertCell(6); 36 | newDeleteTD.innerHTML = ""; 37 | 38 | var selectLocus = findObject("locus_" + rowID); 39 | selectLocus.selectedIndex = locus; 40 | 41 | itoTrLastIndex.value = (rowID + 1).toString(); 42 | itoCurrentCount.value = (rowID).toString(); 43 | 44 | var linesCount = document.getElementById("itoRowCount"); 45 | linesCount.innerHTML = (itoTable.rows.length - 1); 46 | 47 | reloadValidate(); 48 | } 49 | 50 | function itoAddRow() { 51 | var regularExpression = "^[0-9]+(\\.[0-9]+)?$"; 52 | var itoTrLastIndex = findObject("itoTrLastIndex", document); 53 | var itoCurrentCount = findObject("itoCurrentCount", document); 54 | var rowID = parseInt(itoTrLastIndex.value); 55 | var itoTable = findObject("itoTable", document); 56 | var newTR = itoTable.insertRow(itoTable.rows.length); 57 | 58 | newTR.id = "row" + rowID; 59 | var newAllele = newTR.insertCell(0); 60 | newAllele.innerHTML = generateSelectCode(rowID); 61 | var newA1 = newTR.insertCell(1); 62 | newA1.innerHTML = "
"; 63 | var newA2 = newTR.insertCell(2); 64 | newA2.innerHTML = "
"; 65 | var newB1 = newTR.insertCell(3); 66 | newB1.innerHTML = "
"; 67 | var newB2 = newTR.insertCell(4); 68 | newB2.innerHTML = "
"; 69 | var newPi = newTR.insertCell(5); 70 | newPi.innerHTML = ""; 71 | var newDeleteTD = newTR.insertCell(6); 72 | newDeleteTD.innerHTML = ""; 73 | 74 | itoTrLastIndex.value = (rowID + 1).toString(); 75 | itoCurrentCount.value = (rowID).toString(); 76 | 77 | var linesCount = document.getElementById("itoRowCount"); 78 | linesCount.innerHTML = (itoTable.rows.length - 1); 79 | 80 | reloadValidate(); 81 | 82 | addCookie("itoLinesCount", Number(itoCurrentCount.value), 1); 83 | } 84 | 85 | 86 | function condition_pp_pp(A1, A2, B1, B2) { 87 | return A1 == A2 && B1 == B2 && A1 == B1; 88 | } 89 | 90 | function condition_pp_pq(A1, A2, B1, B2) { 91 | if (A1 == A2) { 92 | if (B1 == A1 && B1 != B2) { 93 | return true; 94 | } else if (B2 == A1 && B1 != B2) { 95 | return true; 96 | } 97 | } 98 | return false; 99 | } 100 | 101 | function condition_pp_qq(A1, A2, B1, B2) { 102 | return A1 == A2 && B1 == B2 && A1 != B1; 103 | } 104 | 105 | function condition_pp_qr(A1, ont_2, B1, B2) { 106 | return A1 == ont_2 && B1 != B2 && A1 != B1 && A1 != B2; 107 | } 108 | 109 | function condition_pq_pp_or_qq(A1, A2, B1, B2) { 110 | if (B1 == B2) { 111 | if (A1 == B1 && A1 != A2) { 112 | return true; 113 | } else if (A2 == B1 && A1 != A2) { 114 | return true; 115 | } 116 | } 117 | return false; 118 | } 119 | 120 | function condition_pq_pq(A1, A2, B1, B2) { 121 | return A1 != A2 && B1 != B2 && (A1 == B1 || A1 == B2) && (A2 == B1 || A2 == B2); 122 | } 123 | 124 | function condition_pq_pr_or_qr(A1, A2, B1, B2) { 125 | return (A1 != A2 && B1 != B2) && (((B1 == A1 || B1 == A2) && (B2 != A1 && B2 != A2)) || ((B2 == A1 || B2 == A2) && (B1 != A1 && B1 != A2))); 126 | } 127 | 128 | function condition_pq_rr(A1, A2, B1, B2) { 129 | return A1 != A2 && B1 == B2 && A1 != B1 && A2 != B1; 130 | } 131 | 132 | function condition_pq_rs(A1, A2, B1, B2) { 133 | return A1 != A2 && A1 != B1 && A1 != B2 && A2 != B1 && A2 != B2 && B1 != B2; 134 | } 135 | 136 | function calculate() { 137 | var cpi = 1; 138 | var rcp; 139 | var linesCount = getCookie("itoLinesCount"); 140 | 141 | for (var i = 1; i <= Number(linesCount); i++) { 142 | var A1 = getCookie("itoA1_" + i); 143 | var A2 = getCookie("itoA2_" + i); 144 | var B1 = getCookie("itoB1_" + i); 145 | var B2 = getCookie("itoB2_" + i); 146 | if (!(A1 == null && A2 == null && B1 == null && B2 == null)) { 147 | cpi = cpi * Number(calculatePi(i)); 148 | } 149 | } 150 | 151 | rcp = cpi / (1 + cpi); 152 | 153 | var CPI = document.getElementById("CPI"); 154 | CPI.innerHTML = cpi.toFixed(6); 155 | var RCP = document.getElementById("RCP"); 156 | RCP.innerHTML = rcp.toFixed(6); 157 | 158 | var itoRowCount = document.getElementById("itoRowCount"); 159 | 160 | addCookie("itoCPI", cpi.toFixed(6), 1); 161 | addCookie("itoRCP", rcp.toFixed(6), 1); 162 | addCookie("itoRowCount", itoRowCount.innerHTML, 1); 163 | } 164 | 165 | function saveDataIntoCookie(rowID, hours) { 166 | var locus = findObject("locus_" + rowID, document).selectedIndex; 167 | var locusValue = findObject("locus_" + rowID, document).value; 168 | var A1 = findObject("A1_" + rowID, document).value; 169 | var A2 = findObject("A2_" + rowID, document).value; 170 | var B1 = findObject("B1_" + rowID, document).value; 171 | var B2 = findObject("B2_" + rowID, document).value; 172 | 173 | addCookie("itoLocus_" + rowID, locus, hours); 174 | addCookie("itoLocusValue_" + rowID, locusValue, hours); 175 | addCookie("itoA1_" + rowID, A1, hours); 176 | addCookie("itoA2_" + rowID, A2, hours); 177 | addCookie("itoB1_" + rowID, B1, hours); 178 | addCookie("itoB2_" + rowID, B2, hours); 179 | } 180 | 181 | function itoDeleteRow(rowID, id) { 182 | var itoTable = findObject("itoTable", document); 183 | var row = findObject(rowID, document); 184 | var rowIndex = row.rowIndex; 185 | itoTable.deleteRow(rowIndex); 186 | var linesCount = document.getElementById("itoRowCount"); 187 | linesCount.innerHTML = (itoTable.rows.length - 1); 188 | deleteRowCookie(Number(id)); 189 | } 190 | 191 | function deleteRowCookie(rowID) { 192 | delCookie("itoLocus_" + rowID); 193 | delCookie("itoA1_" + rowID); 194 | delCookie("itoA2_" + rowID); 195 | delCookie("itoB1_" + rowID); 196 | delCookie("itoB2_" + rowID); 197 | delCookie("itoCPI"); 198 | delCookie("itoRCP"); 199 | delCookie("itoRowCount"); 200 | } 201 | 202 | function itoClearAllRows() { 203 | var itoTable = findObject("itoTable", document); 204 | var itoRowCount = itoTable.rows.length; 205 | for (var i = itoRowCount - 1; i > 0; i--) { 206 | itoTable.deleteRow(i); 207 | } 208 | var itoTrLastIndex = findObject("itoTrLastIndex", document); 209 | itoTrLastIndex.value = "1"; 210 | var linesCount = document.getElementById("itoRowCount"); 211 | linesCount.innerHTML = (itoTable.rows.length - 1); 212 | clearAllCookies(); 213 | var CPI = document.getElementById("CPI"); 214 | CPI.innerHTML = "0"; 215 | var RCP = document.getElementById("RCP"); 216 | RCP.innerHTML = "0"; 217 | } 218 | 219 | function clearAllCookies() { 220 | var linesCount = getCookie("itoLinesCount"); 221 | for (var i = 1; i <= Number(linesCount); i++) { 222 | deleteRowCookie(i); 223 | } 224 | delCookie("itoLinesCount"); 225 | } -------------------------------------------------------------------------------- /js/calculator/piSingleParent.js: -------------------------------------------------------------------------------- 1 | function loadTableFromCookie() { 2 | var linesCount = getCookie("piSingleParentLinesCount"); 3 | for (var i = 1; i <= Number(linesCount); i++) { 4 | var locus = getCookie("piSingleParentLocus_" + i); 5 | var AF1 = getCookie("piSingleParentAF1_" + i); 6 | var AF2 = getCookie("piSingleParentAF2_" + i); 7 | var C1 = getCookie("piSingleParentC1_" + i); 8 | var C2 = getCookie("piSingleParentC2_" + i); 9 | if (!(AF1 == null && AF2 == null && C1 == null && C2 == null)) { 10 | piSingleParentLoadRow(i, locus, AF1, AF2, C1, C2); 11 | } 12 | } 13 | } 14 | 15 | function piSingleParentLoadRow(rowID, locus, AF1, AF2, C1, C2) { 16 | var regularExpression = "^[0-9]+(\\.[0-9]+)?$"; 17 | var piSingleParentTrLastIndex = findObject("piSingleParentTrLastIndex", document); 18 | var piSingleParentCurrentCount = findObject("piSingleParentCurrentCount", document); 19 | var piSingleParentTable = findObject("piSingleParentTable", document); 20 | var newTR = piSingleParentTable.insertRow(piSingleParentTable.rows.length); 21 | 22 | newTR.id = "row" + rowID; 23 | var newAllele = newTR.insertCell(0); 24 | newAllele.innerHTML = generateSelectCode(rowID); 25 | var newAF1 = newTR.insertCell(1); 26 | newAF1.innerHTML = "
"; 27 | var newAF2 = newTR.insertCell(2); 28 | newAF2.innerHTML = "
"; 29 | var newC1 = newTR.insertCell(3); 30 | newC1.innerHTML = "
"; 31 | var newC2 = newTR.insertCell(4); 32 | newC2.innerHTML = "
"; 33 | var newPi = newTR.insertCell(5); 34 | newPi.innerHTML = ""; 35 | var newDeleteTD = newTR.insertCell(6); 36 | newDeleteTD.innerHTML = ""; 37 | 38 | var selectLocus = findObject("locus_" + rowID); 39 | selectLocus.selectedIndex = locus; 40 | 41 | piSingleParentTrLastIndex.value = (rowID + 1).toString(); 42 | piSingleParentCurrentCount.value = (rowID).toString(); 43 | 44 | var linesCount = document.getElementById("piSingleParentRowCount"); 45 | linesCount.innerHTML = (piSingleParentTable.rows.length - 1); 46 | 47 | reloadValidate(); 48 | } 49 | 50 | function piSingleParentAddRow() { 51 | var regularExpression = "^[0-9]+(\\.[0-9]+)?$"; 52 | var piSingleParentTrLastIndex = findObject("piSingleParentTrLastIndex", document); 53 | var piSingleParentCurrentCount = findObject("piSingleParentCurrentCount", document); 54 | var rowID = parseInt(piSingleParentTrLastIndex.value); 55 | var piSingleParentTable = findObject("piSingleParentTable", document); 56 | var newTR = piSingleParentTable.insertRow(piSingleParentTable.rows.length); 57 | 58 | newTR.id = "row" + rowID; 59 | var newAllele = newTR.insertCell(0); 60 | newAllele.innerHTML = generateSelectCode(rowID); 61 | var newAF1 = newTR.insertCell(1); 62 | newAF1.innerHTML = "
"; 63 | var newAF2 = newTR.insertCell(2); 64 | newAF2.innerHTML = "
"; 65 | var newC1 = newTR.insertCell(3); 66 | newC1.innerHTML = "
"; 67 | var newC2 = newTR.insertCell(4); 68 | newC2.innerHTML = "
"; 69 | var newPi = newTR.insertCell(5); 70 | newPi.innerHTML = ""; 71 | var newDeleteTD = newTR.insertCell(6); 72 | newDeleteTD.innerHTML = ""; 73 | 74 | piSingleParentTrLastIndex.value = (rowID + 1).toString(); 75 | piSingleParentCurrentCount.value = (rowID).toString(); 76 | 77 | var linesCount = document.getElementById("piSingleParentRowCount"); 78 | linesCount.innerHTML = (piSingleParentTable.rows.length - 1); 79 | 80 | reloadValidate(); 81 | 82 | addCookie("piSingleParentLinesCount", Number(piSingleParentCurrentCount.value), 1); 83 | } 84 | 85 | function condition_qq_qq(C1, C2, AF1, AF2) { 86 | return AF1 == AF2 && C1 == C2 && AF1 == C1; 87 | } 88 | 89 | function condition_pq_qq(C1, C2, AF1, AF2) { 90 | return C1 != C2 && AF1 == AF2 && (AF1 == C1 || AF1 == C2); 91 | } 92 | 93 | function condition_qq_qr(C1, C2, AF1, AF2) { 94 | return AF1 != AF2 && C1 == C2 && (C1 == AF1 || C1 == AF2); 95 | } 96 | 97 | function condition_pq_pq(C1, C2, AF1, AF2) { 98 | return C1 != C2 && AF1 != AF2 && (C1 == AF1 || C1 == AF2) && (C2 == AF1 || C2 == AF2); 99 | } 100 | 101 | function condition_pq_qr(C1, C2, AF1, AF2) { 102 | return (C1 != C2 && AF1 != AF2) && (((AF1 == C1 || AF1 == C2) && (AF2 != C1 && AF2 != C2)) || ((AF2 == C1 || AF2 == C2) && (AF1 != C1 && AF1 != C2))); 103 | } 104 | 105 | function calculate() { 106 | var cpi = 1; 107 | var rcp; 108 | var linesCount = getCookie("piSingleParentLinesCount"); 109 | 110 | for (var i = 1; i <= Number(linesCount); i++) { 111 | var AF1 = getCookie("piSingleParentAF1_" + i); 112 | var AF2 = getCookie("piSingleParentAF2_" + i); 113 | var C1 = getCookie("piSingleParentC1_" + i); 114 | var C2 = getCookie("piSingleParentC2_" + i); 115 | if (!(AF1 == null && AF2 == null && C1 == null && C2 == null)) { 116 | cpi = cpi * Number(calculatePi(i)); 117 | } 118 | } 119 | 120 | rcp = cpi / (1 + cpi); 121 | 122 | var CPI = document.getElementById("CPI"); 123 | CPI.innerHTML = cpi.toFixed(6); 124 | var RCP = document.getElementById("RCP"); 125 | RCP.innerHTML = rcp.toFixed(6); 126 | 127 | var piSingleParentRowCount = document.getElementById("piSingleParentRowCount"); 128 | 129 | addCookie("piSingleParentCPI", cpi.toFixed(6), 1); 130 | addCookie("piSingleParentRCP", rcp.toFixed(6), 1); 131 | addCookie("piSingleParentRowCount", piSingleParentRowCount.innerHTML, 1); 132 | } 133 | 134 | function saveDataIntoCookie(rowID, hours) { 135 | var locus = findObject("locus_" + rowID, document).selectedIndex; 136 | var locusValue = findObject("locus_" + rowID, document).value; 137 | var AF1 = findObject("AF1_" + rowID, document).value; 138 | var AF2 = findObject("AF2_" + rowID, document).value; 139 | var C1 = findObject("C1_" + rowID, document).value; 140 | var C2 = findObject("C2_" + rowID, document).value; 141 | 142 | addCookie("piSingleParentLocus_" + rowID, locus, hours); 143 | addCookie("piSingleParentLocusValue_" + rowID, locusValue, hours); 144 | addCookie("piSingleParentAF1_" + rowID, AF1, hours); 145 | addCookie("piSingleParentAF2_" + rowID, AF2, hours); 146 | addCookie("piSingleParentC1_" + rowID, C1, hours); 147 | addCookie("piSingleParentC2_" + rowID, C2, hours); 148 | } 149 | 150 | function piSingleParentDeleteRow(rowID, id) { 151 | var piSingleParentTable = findObject("piSingleParentTable", document); 152 | var row = findObject(rowID, document); 153 | var rowIndex = row.rowIndex; 154 | piSingleParentTable.deleteRow(rowIndex); 155 | var linesCount = document.getElementById("piSingleParentRowCount"); 156 | linesCount.innerHTML = (piSingleParentTable.rows.length - 1); 157 | deleteRowCookie(Number(id)); 158 | } 159 | 160 | function deleteRowCookie(rowID) { 161 | delCookie("piSingleParentLocus_" + rowID); 162 | delCookie("piSingleParentAF1_" + rowID); 163 | delCookie("piSingleParentAF2_" + rowID); 164 | delCookie("piSingleParentC1_" + rowID); 165 | delCookie("piSingleParentC2_" + rowID); 166 | delCookie("piSingleParentCPI"); 167 | delCookie("piSingleParentRCP"); 168 | delCookie("piSingleParentRowCount"); 169 | } 170 | 171 | function piSingleParentClearAllRows() { 172 | var piSingleParentTable = findObject("piSingleParentTable", document); 173 | var piSingleParentRowCount = piSingleParentTable.rows.length; 174 | for (var i = piSingleParentRowCount - 1; i > 0; i--) { 175 | piSingleParentTable.deleteRow(i); 176 | } 177 | var piSingleParentTrLastIndex = findObject("piSingleParentTrLastIndex", document); 178 | piSingleParentTrLastIndex.value = "1"; 179 | var linesCount = document.getElementById("piSingleParentRowCount"); 180 | linesCount.innerHTML = (piSingleParentTable.rows.length - 1); 181 | clearAllCookies(); 182 | var CPI = document.getElementById("CPI"); 183 | CPI.innerHTML = "0"; 184 | var RCP = document.getElementById("RCP"); 185 | RCP.innerHTML = "0"; 186 | } 187 | 188 | function clearAllCookies() { 189 | var linesCount = getCookie("piSingleParentLinesCount"); 190 | for (var i = 1; i <= Number(linesCount); i++) { 191 | deleteRowCookie(i); 192 | } 193 | delCookie("piSingleParentLinesCount"); 194 | } -------------------------------------------------------------------------------- /spec/piParentsSpec.js: -------------------------------------------------------------------------------- 1 | describe("For condition qq qq qq", function () { 2 | it("it should return true when input is 12 12 12 12 12 12", function () { 3 | expect(condition_qq_qq_qq(12, 12, 12, 12, 12, 12)).toBe(true); 4 | }); 5 | it("it should return false when input is 12 13 12 12 12 12", function () { 6 | expect(condition_qq_qq_qq(12, 13, 12, 12, 12, 12)).toBe(false); 7 | }); 8 | }); 9 | 10 | describe("For condition qq qq qr", function () { 11 | it("it should return true when input is 11 11 11 11 11 12", function () { 12 | expect(condition_qq_qq_qr(11, 11, 11, 11, 11, 12)).toBe(true); 13 | }); 14 | it("it should return true when input is 11 11 11 11 12 11", function () { 15 | expect(condition_qq_qq_qr(11, 11, 11, 11, 12, 11)).toBe(true); 16 | }); 17 | it("it should return false when input is 11 11 11 11 11 11", function () { 18 | expect(condition_qq_qq_qr(11, 11, 11, 11, 11, 11)).toBe(false); 19 | }); 20 | }); 21 | 22 | describe("For condition qq pq qq", function () { 23 | it("it should return true when input is 11 11 11 12 11 11", function () { 24 | expect(condition_qq_pq_qq(11, 11, 11, 12, 11, 11)).toBe(true); 25 | }); 26 | it("it should return true when input is 11 11 12 11 11 11", function () { 27 | expect(condition_qq_pq_qq(11, 11, 12, 11, 11, 11)).toBe(true); 28 | }); 29 | it("it should return false when input is 11 11 11 11 11 11", function () { 30 | expect(condition_qq_pq_qq(11, 11, 11, 11, 11, 11)).toBe(false); 31 | }); 32 | }); 33 | 34 | describe("For condition qq pq qr", function () { 35 | it("it should return true when input is 11 11 11 12 11 13", function () { 36 | expect(condition_qq_pq_qr(11, 11, 11, 12, 11, 13)).toBe(true); 37 | }); 38 | it("it should return true when input is 11 11 12 11 11 13", function () { 39 | expect(condition_qq_pq_qr(11, 11, 12, 11, 11, 13)).toBe(true); 40 | }); 41 | it("it should return true when input is 11 11 11 12 11 12", function () { 42 | expect(condition_qq_pq_qr(11, 11, 11, 12, 11, 12)).toBe(true); 43 | }); 44 | it("it should return true when input is 11 11 11 12 12 11", function () { 45 | expect(condition_qq_pq_qr(11, 11, 11, 12, 12, 11)).toBe(true); 46 | }); 47 | it("it should return false when input is 11 11 11 11 11 11", function () { 48 | expect(condition_qq_pq_qr(11, 11, 11, 11, 11, 11)).toBe(false); 49 | }); 50 | it("it should return false when input is 11 11 11 11 11 12", function () { 51 | expect(condition_qq_pq_qr(11, 11, 11, 11, 11, 12)).toBe(false); 52 | }); 53 | }); 54 | 55 | describe("For condition pq pp qq", function () { 56 | it("it should return true when input is 11 12 11 11 12 12", function () { 57 | expect(condition_pq_pp_qq(11, 12, 11, 11, 12, 12)).toBe(true); 58 | }); 59 | it("it should return true when input is 12 11 11 11 12 12", function () { 60 | expect(condition_pq_pp_qq(12, 11, 11, 11, 12, 12)).toBe(true); 61 | }); 62 | it("it should return false when input is 12 11 11 12 12 12", function () { 63 | expect(condition_pq_pp_qq(12, 11, 11, 12, 12, 12)).toBe(false); 64 | }); 65 | it("it should return false when input is 11 11 11 12 12 12", function () { 66 | expect(condition_pq_pp_qq(11, 11, 11, 12, 12, 12)).toBe(false); 67 | }); 68 | }); 69 | 70 | describe("For condition pq pr qq", function () { 71 | it("it should return true when input is 11 12 11 13 12 12", function () { 72 | expect(condition_pq_pr_qq(11, 12, 11, 13, 12, 12)).toBe(true); 73 | }); 74 | it("it should return true when input is 11 12 13 11 12 12", function () { 75 | expect(condition_pq_pr_qq(11, 12, 13, 11, 12, 12)).toBe(true); 76 | }); 77 | it("it should return false when input is 11 12 11 11 12 12", function () { 78 | expect(condition_pq_pr_qq(11, 12, 11, 11, 12, 12)).toBe(false); 79 | }); 80 | it("it should return false when input is 11 11 11 11 12 12", function () { 81 | expect(condition_pq_pr_qq(11, 11, 11, 11, 12, 12)).toBe(false); 82 | }); 83 | }); 84 | 85 | describe("For condition pq pp pq", function () { 86 | it("it should return true when input is 11 12 11 11 11 12", function () { 87 | expect(condition_pq_pp_pq(11, 12, 11, 11, 11, 12)).toBe(true); 88 | }); 89 | it("it should return true when input is 11 12 12 12 11 12", function () { 90 | expect(condition_pq_pp_pq(11, 12, 12, 12, 11, 12)).toBe(true); 91 | }); 92 | it("it should return true when input is 11 12 12 12 12 11", function () { 93 | expect(condition_pq_pp_pq(11, 12, 12, 12, 12, 11)).toBe(true); 94 | }); 95 | it("it should return false when input is 11 12 11 12 12 11", function () { 96 | expect(condition_pq_pp_pq(11, 12, 11, 12, 12, 11)).toBe(false); 97 | }); 98 | it("it should return false when input is 11 12 12 12 12 12", function () { 99 | expect(condition_pq_pp_pq(11, 12, 12, 12, 12, 12)).toBe(false); 100 | }); 101 | }); 102 | 103 | describe("For condition pq pp qr", function () { 104 | it("it should return true when input is 11 12 11 11 12 13", function () { 105 | expect(condition_pq_pp_qr(11, 12, 11, 11, 12, 13)).toBe(true); 106 | }); 107 | it("it should return true when input is 11 12 11 11 13 12", function () { 108 | expect(condition_pq_pp_qr(11, 12, 11, 11, 13, 12)).toBe(true); 109 | }); 110 | it("it should return true when input is 11 12 12 12 12 13", function () { 111 | expect(condition_pq_pp_qr(11, 12, 12, 12, 12, 13)).toBe(true); 112 | }); 113 | it("it should return true when input is 11 12 12 12 13 11", function () { 114 | expect(condition_pq_pp_qr(11, 12, 12, 12, 13, 11)).toBe(true); 115 | }); 116 | it("it should return false when input is 11 12 11 12 12 11", function () { 117 | expect(condition_pq_pp_qr(11, 12, 11, 12, 12, 11)).toBe(false); 118 | }); 119 | it("it should return false when input is 11 12 12 12 12 11", function () { 120 | expect(condition_pq_pp_qr(11, 12, 12, 12, 12, 12)).toBe(false); 121 | }); 122 | }); 123 | 124 | describe("For condition pq pr or ps pq", function () { 125 | it("it should return true when input is 11 12 11 13 11 12", function () { 126 | expect(condition_pq_pr_or_ps_pq(11, 12, 11, 13, 11, 12)).toBe(true); 127 | }); 128 | it("it should return true when input is 11 12 11 13 12 11", function () { 129 | expect(condition_pq_pr_or_ps_pq(11, 12, 11, 13, 12, 11)).toBe(true); 130 | }); 131 | it("it should return true when input is 11 12 13 11 11 12", function () { 132 | expect(condition_pq_pr_or_ps_pq(11, 12, 13, 11, 11, 12)).toBe(true); 133 | }); 134 | it("it should return true when input is 11 12 13 11 12 11", function () { 135 | expect(condition_pq_pr_or_ps_pq(11, 12, 13, 11, 12, 11)).toBe(true); 136 | }); 137 | it("it should return false when input is 11 12 11 12 11 12", function () { 138 | expect(condition_pq_pr_or_ps_pq(11, 12, 11, 12, 11, 12)).toBe(false); 139 | }); 140 | it("it should return false when input is 11 12 12 12 12 12", function () { 141 | expect(condition_pq_pr_or_ps_pq(11, 12, 12, 12, 12, 12)).toBe(false); 142 | }); 143 | }); 144 | 145 | describe("For condition pq pr or ps qr", function () { 146 | it("it should return true when input is 11 12 11 13 11 13", function () { 147 | expect(condition_pq_pr_or_ps_qr(11, 12, 11, 13, 11, 13)).toBe(true); 148 | }); 149 | it("it should return true when input is 11 12 11 13 13 11", function () { 150 | expect(condition_pq_pr_or_ps_qr(11, 12, 11, 13, 13, 11)).toBe(true); 151 | }); 152 | it("it should return true when input is 11 12 13 11 11 13", function () { 153 | expect(condition_pq_pr_or_ps_qr(11, 12, 13, 11, 11, 13)).toBe(true); 154 | }); 155 | it("it should return true when input is 11 12 13 11 13 11", function () { 156 | expect(condition_pq_pr_or_ps_qr(11, 12, 13, 11, 13, 11)).toBe(true); 157 | }); 158 | it("it should return false when input is 11 12 11 12 11 12", function () { 159 | expect(condition_pq_pr_or_ps_qr(11, 12, 11, 12, 11, 12)).toBe(false); 160 | }); 161 | it("it should return false when input is 11 12 12 12 12 12", function () { 162 | expect(condition_pq_pr_or_ps_qr(11, 12, 12, 12, 12, 12)).toBe(false); 163 | }); 164 | }); 165 | 166 | describe("For condition pq pq pq",function(){ 167 | it("it should return true when input is 11 12 11 12 11 12",function(){ 168 | expect(condition_pq_pq_pq(11,12,11,12,11,12)).toBe(true); 169 | }); 170 | it("it should return true when input is 12 11 11 12 11 12",function(){ 171 | expect(condition_pq_pq_pq(12,11,11,12,11,12)).toBe(true); 172 | }); 173 | it("it should return true when input is 11 12 12 11 11 12",function(){ 174 | expect(condition_pq_pq_pq(11,12,12,11,11,12)).toBe(true); 175 | }); 176 | it("it should return true when input is 11 12 11 12 12 11",function(){ 177 | expect(condition_pq_pq_pq(11,12,11,12,12,11)).toBe(true); 178 | }); 179 | it("it should return true when input is 11 12 11 12 12 11",function(){ 180 | expect(condition_pq_pq_pq(11,12,11,12,12,11)).toBe(true); 181 | }); 182 | it("it should return false when input is 11 12 12 12 12 11",function(){ 183 | expect(condition_pq_pq_pq(11,12,12,12,12,11)).toBe(false); 184 | }); 185 | it("it should return false when input is 11 12 11 12 12 12",function(){ 186 | expect(condition_pq_pq_pq(11,12,11,12,12,12)).toBe(false); 187 | }); 188 | }); 189 | 190 | describe("For condition pq pq qq",function(){ 191 | it("it should return true when input is 11 12 11 12 12 12",function(){ 192 | expect(condition_pq_pq_qq(11,12,11,12,12,12)).toBe(true); 193 | }); 194 | it("it should return true when input is 11 12 12 11 12 12",function(){ 195 | expect(condition_pq_pq_qq(11,12,12,11,12,12)).toBe(true); 196 | }); 197 | it("it should return true when input is 11 12 11 12 11 11",function(){ 198 | expect(condition_pq_pq_qq(11,12,11,12,11,11)).toBe(true); 199 | }); 200 | it("it should return true when input is 12 11 11 12 11 11",function(){ 201 | expect(condition_pq_pq_qq(12,11,11,12,11,11)).toBe(true); 202 | }); 203 | it("it should return false when input is 12 11 12 12 11 11",function(){ 204 | expect(condition_pq_pq_qq(12,11,12,12,11,11)).toBe(false); 205 | }); 206 | it("it should return false when input is 12 11 12 11 12 11",function(){ 207 | expect(condition_pq_pq_qq(12,11,12,11,12,11)).toBe(false); 208 | }); 209 | }); 210 | 211 | describe("For condition pq pq qr",function(){ 212 | it("it should return ture when input is 11 12 11 12 12 13",function(){ 213 | expect(condition_pq_pq_qr(11,12,11,12,12,13)).toBe(true); 214 | }); 215 | it("it should return ture when input is 11 12 11 12 13 12",function(){ 216 | expect(condition_pq_pq_qr(11,12,11,12,13,12)).toBe(true); 217 | }); 218 | it("it should return false when input is 11 12 11 12 11 12",function(){ 219 | expect(condition_pq_pq_qr(11,12,11,12,11,12)).toBe(false); 220 | }); 221 | it("it should return false when input is 11 12 11 12 12 12",function(){ 222 | expect(condition_pq_pq_qr(11,12,11,12,12,12)).toBe(false); 223 | }); 224 | }); -------------------------------------------------------------------------------- /help/formula.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Relations - Blood relation between you and another person 5 | 6 | 7 | 8 | 9 | 10 | 11 | 46 | 47 | 48 |
49 | 153 |
154 |
155 |
156 |
157 |
158 | 159 | 282 |
283 |
284 |
285 |
286 | 288 | 289 | 294 | 295 | 296 | --------------------------------------------------------------------------------