Australian DNA Profile Database, full alleles , 9 loci

Australian DNA Profile Database, full alleles , 9 loci




Visual basic macros and Word macros are 
between the horizontal rules. 
Before going into Visual Basic Editor go into ordinary 
Word and call up anything in the directory you want 
the VB files to go into as this is not designated in the 
following code.
Using plain text handling Notepad with no line wrap 
copy to between Sub / End Sub ,Reset and Run.
Some long conditional statements may break 
and would need reconcattenating before running.

If using straight VB6 then designate the directory 
for files by "replace all" occurances of jun07 to 
c:\vb\jun07 or whatever, also add a sound progress 
indicator before the [ next x ] line 
 
If x/1000 = Int (x/1000 ) Then Beep
 
before highlighting and copying.

In VB6 open New Project
In Form1 open up a Command1 button
Double click this button to open command 
code window and copy and paste the 'DNA' VB code 
between the Private Sub Command1_click ()
and the End Sub
Then Run/Start
Press command1
Wait until Beep/ clicks cease


' Generating 9 loci x2 profiles for Australian capital Caucasian ' directing pairs and first divider Dim ph(18) Dim pb(18) ' change xxxx for different total number of profiles xxxx = 5000 xxxx = xxxx - 1 ' initialising Random Number Generator - RNG count9 = 0 count8 = 0 Randomize a = 214013 c = 2531011 x0 = Timer z = 2 ^ 24 ' 1 file 'jun07-g' for original, un-directed pairs, source data. ' This file is necessary to check on the performance of the RNG ' when a matched pair is found then it is highly unlikely that ' both sequences as generated, before pair directing, would ' be the same - more likely a manifest of repeat within the RNG ' (reason for adopting the 214013 / 2531011 RNG ) ' Use 'Word' find function on part of the sequences, including pair reversals, ' with luck would include a 'homozygotic' pair eg (3,3) say ,so no reversal ' on that pair Open "jun07-g" For Output As #1 ' outputs directed and divided by first digit Open "jun07-0" For Output As #10 Open "jun07-1" For Output As #11 Open "jun07-2" For Output As #12 Open "jun07-3" For Output As #13 Open "jun07-4" For Output As #14 Open "jun07-5" For Output As #15 Open "jun07-6" For Output As #16 Open "jun07-7" For Output As #17 Open "jun07-8" For Output As #18 Open "jun07-9" For Output As #19 For x = 0 To xxxx For j = 0 To 1 ' D3 ,first locus ' RNG random number generator temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0037 Then ph(j) = 11 If ph(j) < 0.0111 Then ph(j) = 1 If ph(j) < 0.1318 Then ph(j) = 2 If ph(j) < 0.3966 Then ph(j) = 3 If ph(j) < 0.6466 Then ph(j) = 4 If ph(j) < 0.8313 Then ph(j) = 5 If ph(j) < 0.9865 Then ph(j) = 6 If ph(j) < 0.9976 Then ph(j) = 7 If ph(j) < 1 Then ph(j) = 8 If ph(j) > 10 Then ph(j) = 0 Next j For j = 2 To 3 ' vWA ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.1268 Then ph(j) = 11 If ph(j) < 0.2263 Then ph(j) = 1 If ph(j) < 0.4618 Then ph(j) = 2 If ph(j) < 0.7192 Then ph(j) = 3 If ph(j) < 0.9138 Then ph(j) = 4 If ph(j) < 0.984 Then ph(j) = 5 If ph(j) < 0.9982 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 Next j For j = 4 To 5 ' D5 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0049 Then ph(j) = 11 If ph(j) < 0.0357 Then ph(j) = 1 If ph(j) < 0.096 Then ph(j) = 2 If ph(j) < 0.4876 Then ph(j) = 3 If ph(j) < 0.8312 Then ph(j) = 4 If ph(j) < 0.9876 Then ph(j) = 5 If ph(j) < 0.9987 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 Next j For j = 6 To 7 ' D8 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0198 Then ph(j) = 11 If ph(j) < 0.026 Then ph(j) = 1 If ph(j) < 0.105 Then ph(j) = 2 If ph(j) < 0.1927 Then ph(j) = 3 If ph(j) < 0.3384 Then ph(j) = 4 If ph(j) < 0.6631 Then ph(j) = 5 If ph(j) < 0.8804 Then ph(j) = 6 If ph(j) < 0.9705 Then ph(j) = 7 If ph(j) < 0.9977 Then ph(j) = 8 If ph(j) < 1 Then ph(j) = 9 If ph(j) > 10 Then ph(j) = 0 Next j For j = 8 To 9 ' D18 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.01 Then ph(j) = 11 If ph(j) < 0.0238 Then ph(j) = 1 If ph(j) < 0.1742 Then ph(j) = 2 If ph(j) < 0.3033 Then ph(j) = 3 If ph(j) < 0.4462 Then ph(j) = 4 If ph(j) < 0.584 Then ph(j) = 5 If ph(j) < 0.7168 Then ph(j) = 6 If ph(j) < 0.8421 Then ph(j) = 7 If ph(j) < 0.916 Then ph(j) = 8 If ph(j) < 0.9626 Then ph(j) = 9 If ph(j) < 0.9824 And ph(j) >= 0.9626 Then pb(j) = "A" If ph(j) < 0.9924 And ph(j) >= 0.9824 Then pb(j) = "B" If ph(j) < 0.9962 And ph(j) >= 0.9924 Then pb(j) = "C" If ph(j) < 0.9977 And ph(j) >= 0.9962 Then pb(j) = "D" If ph(j) < 1 And ph(j) >= 0.9977 Then pb(j) = "E" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) Next j For j = 10 To 11 ' FGA ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0173 Then ph(j) = 11 If ph(j) < 0.0767 Then ph(j) = 1 If ph(j) < 0.2227 Then ph(j) = 2 If ph(j) < 0.2239 Then ph(j) = 3 If ph(j) < 0.4021 Then ph(j) = 4 If ph(j) < 0.4046 Then ph(j) = 5 If ph(j) < 0.5927 Then ph(j) = 6 If ph(j) < 0.5989 Then ph(j) = 7 If ph(j) < 0.7437 Then ph(j) = 8 If ph(j) < 0.7487 Then ph(j) = 9 If ph(j) < 0.8985 And ph(j) >= 0.7487 Then pb(j) = "A" If ph(j) < 0.974 And ph(j) >= 0.8985 Then pb(j) = "B" If ph(j) < 0.995 And ph(j) >= 0.974 Then pb(j) = "C" If ph(j) < 1 And ph(j) >= 0.995 Then pb(j) = "D" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) Next j For j = 12 To 13 ' D21 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0012 Then ph(j) = 11 If ph(j) < 0.0024 Then ph(j) = 1 If ph(j) < 0.0036 Then ph(j) = 2 If ph(j) < 0.0482 Then ph(j) = 3 If ph(j) < 0.2029 Then ph(j) = 4 If ph(j) < 0.4133 Then ph(j) = 5 If ph(j) < 0.4158 Then ph(j) = 6 If ph(j) < 0.6708 Then ph(j) = 7 If ph(j) < 0.698 Then ph(j) = 8 If ph(j) < 0.776 Then ph(j) = 9 If ph(j) < 0.8713 And ph(j) >= 0.776 Then pb(j) = "A" If ph(j) < 0.8849 And ph(j) >= 0.8713 Then pb(j) = "B" If ph(j) < 0.9616 And ph(j) >= 0.8849 Then pb(j) = "C" If ph(j) < 0.9975 And ph(j) >= 0.9616 Then pb(j) = "D" If ph(j) < 0.9987 And ph(j) >= 0.9975 Then pb(j) = "E" If ph(j) < 1 And ph(j) >= 0.9987 Then pb(j) = "F" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) Next j For j = 14 To 15 ' D13 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.1361 Then ph(j) = 11 If ph(j) < 0.2079 Then ph(j) = 1 If ph(j) < 0.2574 Then ph(j) = 2 If ph(j) < 0.5458 Then ph(j) = 3 If ph(j) < 0.8577 Then ph(j) = 4 If ph(j) < 0.9456 Then ph(j) = 5 If ph(j) < 0.9976 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 Next j For j = 16 To 17 ' D7 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0241 Then ph(j) = 11 If ph(j) < 0.1735 Then ph(j) = 1 If ph(j) < 0.3672 Then ph(j) = 2 If ph(j) < 0.6014 Then ph(j) = 3 If ph(j) < 0.7875 Then ph(j) = 4 If ph(j) < 0.9419 Then ph(j) = 5 If ph(j) < 0.9925 Then ph(j) = 6 If ph(j) < 0.9988 Then ph(j) = 7 If ph(j) < 1 Then ph(j) = 8 If ph(j) > 10 Then ph(j) = 0 Next j ' output the original generated file Write #1, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) ' Because in real DNA profiles without further info ,no one ' knows which allele in each pair came from the mother or father ' by convention they are written smaller ,larger (or equal). ' The following directs each pair For j = 0 To 16 Step 2 If ph(j + 1) < ph(j) Then jjj = ph(j) ph(j) = ph(j + 1) ph(j + 1) = jjj End If Next j ' put extra conditional statements here to reduce ' the number of files or just delete some of the following ' ' dividing on first column, file by file If ph(0) = 0 Then Write #10, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count0 = count0 + 1 End If If ph(0) = 1 Then Write #11, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count1 = count1 + 1 End If If ph(0) = 2 Then Write #12, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count2 = count2 + 1 End If If ph(0) = 3 Then Write #13, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count3 = count3 + 1 End If If ph(0) = 4 Then Write #14, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count4 = count4 + 1 End If If ph(0) = 5 Then Write #15, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count5 = count5 + 1 End If If ph(0) = 6 Then Write #16, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count6 = count6 + 1 End If If ph(0) = 7 Then Write #17, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count7 = count7 + 1 End If If ph(0) = 8 Then Write #18, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count8 = count8 + 1 End If If ph(0) = 9 Then Write #19, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count9 = count9 + 1 End If Next x Close #10 Close #11 Close #12 Close #13 Close #14 Close #15 Close #16 Close #17 Close #18 Close #19 Close #1 ' count file for data to fix for - next loops in sucessive dividings Open "jun07-c" For Output As #20 Write #20, 0, count0, 1, count1, 2, count2, 3, count3, 4, count4, 5, count5, 6, count6, 7, count7, 8, count8, 9, count9 Close #20
Capital Caucasian data with absolutely no relatedness built in . Doing a 500,000 run produced one 9 loci match so at this stage baseline false match population between about 300,000 and 500,000. Match was string 364434576668453434 which started as 634434576686453443 and 364443576686544343 so random number generator OK. Converting back to loci - alleles this match corresponds to D3 15,18 vWA 18,18 D5 11,12 D8 13,15 D18 16,16 FGA 22,23 D21 28,29 D13 11,12 D7 10,11 the minimum allele frequency being 9 per cent. I will next do a run excluding all allele frequencies less than 3 percent.

' Generating 9 loci x2 profiles for Australian capital Caucasian excluding allele frequencies less than 3 per cent ' directing pairs and first divider Dim ph(18) Dim pb(18) ' change xxxx for different total number of profiles xxxx = 5000 xxxx = xxxx - 1 ' initialising Random Number Generator - RNG count9 = 0 count8 = 0 countf = 0 Randomize a = 214013 c = 2531011 x0 = Timer z = 2 ^ 24 ' 1 file 'jun07-g' for original, un-directed pairs, source data. ' This file is necessary to check on the performance of the RNG ' when a matched pair is found then it is highly unlikely that ' both sequences as generated, before pair directing, would ' be the same - more likely a manifest of repeat within the RNG ' (reason for adopting the 214013 / 2531011 RNG ) ' Use 'Word' find function on part of the sequences, including pair reversals, ' with luck would include a 'homozygotic' pair eg (3,3) say ,so no reversal ' on that pair Open "jun07-g" For Output As #1 ' outputs directed and divided by first digit Open "jun07-0" For Output As #10 Open "jun07-1" For Output As #11 Open "jun07-2" For Output As #12 Open "jun07-3" For Output As #13 Open "jun07-4" For Output As #14 Open "jun07-5" For Output As #15 Open "jun07-6" For Output As #16 Open "jun07-7" For Output As #17 Open "jun07-8" For Output As #18 Open "jun07-9" For Output As #19 For x = 0 To xxxx flag = 0 For j = 0 To 1 ' D3 ,first locus ' RNG random number generator temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0037 Then ph(j) = 11 If ph(j) < 0.0111 Then ph(j) = 1 If ph(j) < 0.1318 Then ph(j) = 2 If ph(j) < 0.3966 Then ph(j) = 3 If ph(j) < 0.6466 Then ph(j) = 4 If ph(j) < 0.8313 Then ph(j) = 5 If ph(j) < 0.9865 Then ph(j) = 6 If ph(j) < 0.9976 Then ph(j) = 7 If ph(j) < 1 Then ph(j) = 8 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "0" Then flag = 1 If ph(j) = "1" Then flag = 1 If ph(j) = "7" Then flag = 1 If ph(j) = "8" Then flag = 1 Next j For j = 2 To 3 ' vWA ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.1268 Then ph(j) = 11 If ph(j) < 0.2263 Then ph(j) = 1 If ph(j) < 0.4618 Then ph(j) = 2 If ph(j) < 0.7192 Then ph(j) = 3 If ph(j) < 0.9138 Then ph(j) = 4 If ph(j) < 0.984 Then ph(j) = 5 If ph(j) < 0.9982 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "6" Then flag = 1 If ph(j) = "7" Then flag = 1 Next j For j = 4 To 5 ' D5 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0049 Then ph(j) = 11 If ph(j) < 0.0357 Then ph(j) = 1 If ph(j) < 0.096 Then ph(j) = 2 If ph(j) < 0.4876 Then ph(j) = 3 If ph(j) < 0.8312 Then ph(j) = 4 If ph(j) < 0.9876 Then ph(j) = 5 If ph(j) < 0.9987 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "0" Then flag = 1 If ph(j) = "6" Then flag = 1 If ph(j) = "7" Then flag = 1 Next j For j = 6 To 7 ' D8 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0198 Then ph(j) = 11 If ph(j) < 0.026 Then ph(j) = 1 If ph(j) < 0.105 Then ph(j) = 2 If ph(j) < 0.1927 Then ph(j) = 3 If ph(j) < 0.3384 Then ph(j) = 4 If ph(j) < 0.6631 Then ph(j) = 5 If ph(j) < 0.8804 Then ph(j) = 6 If ph(j) < 0.9705 Then ph(j) = 7 If ph(j) < 0.9977 Then ph(j) = 8 If ph(j) < 1 Then ph(j) = 9 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "0" Then flag = 1 If ph(j) = "1" Then flag = 1 If ph(j) = "8" Then flag = 1 If ph(j) = "9" Then flag = 1 Next j For j = 8 To 9 ' D18 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.01 Then ph(j) = 11 If ph(j) < 0.0238 Then ph(j) = 1 If ph(j) < 0.1742 Then ph(j) = 2 If ph(j) < 0.3033 Then ph(j) = 3 If ph(j) < 0.4462 Then ph(j) = 4 If ph(j) < 0.584 Then ph(j) = 5 If ph(j) < 0.7168 Then ph(j) = 6 If ph(j) < 0.8421 Then ph(j) = 7 If ph(j) < 0.916 Then ph(j) = 8 If ph(j) < 0.9626 Then ph(j) = 9 If ph(j) < 0.9824 And ph(j) >= 0.9626 Then pb(j) = "A" If ph(j) < 0.9924 And ph(j) >= 0.9824 Then pb(j) = "B" If ph(j) < 0.9962 And ph(j) >= 0.9924 Then pb(j) = "C" If ph(j) < 0.9977 And ph(j) >= 0.9962 Then pb(j) = "D" If ph(j) < 1 And ph(j) >= 0.9977 Then pb(j) = "E" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) If ph(j) = "0" Then flag = 1 If ph(j) = "1" Then flag = 1 If pb(j) = "A" Then flag = 1 If pb(j) = "B" Then flag = 1 If pb(j) = "C" Then flag = 1 If pb(j) = "D" Then flag = 1 If pb(j) = "E" Then flag = 1 Next j For j = 10 To 11 ' FGA ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0173 Then ph(j) = 11 If ph(j) < 0.0767 Then ph(j) = 1 If ph(j) < 0.2227 Then ph(j) = 2 If ph(j) < 0.2239 Then ph(j) = 3 If ph(j) < 0.4021 Then ph(j) = 4 If ph(j) < 0.4046 Then ph(j) = 5 If ph(j) < 0.5927 Then ph(j) = 6 If ph(j) < 0.5989 Then ph(j) = 7 If ph(j) < 0.7437 Then ph(j) = 8 If ph(j) < 0.7487 Then ph(j) = 9 If ph(j) < 0.8985 And ph(j) >= 0.7487 Then pb(j) = "A" If ph(j) < 0.974 And ph(j) >= 0.8985 Then pb(j) = "B" If ph(j) < 0.995 And ph(j) >= 0.974 Then pb(j) = "C" If ph(j) < 1 And ph(j) >= 0.995 Then pb(j) = "D" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) If ph(j) = "0" Then flag = 1 If ph(j) = "3" Then flag = 1 If ph(j) = "5" Then flag = 1 If ph(j) = "7" Then flag = 1 If ph(j) = "9" Then flag = 1 If pb(j) = "C" Then flag = 1 If pb(j) = "D" Then flag = 1 Next j For j = 12 To 13 ' D21 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj pb(j) = "Z" If ph(j) < 0.0012 Then ph(j) = 11 If ph(j) < 0.0024 Then ph(j) = 1 If ph(j) < 0.0036 Then ph(j) = 2 If ph(j) < 0.0482 Then ph(j) = 3 If ph(j) < 0.2029 Then ph(j) = 4 If ph(j) < 0.4133 Then ph(j) = 5 If ph(j) < 0.4158 Then ph(j) = 6 If ph(j) < 0.6708 Then ph(j) = 7 If ph(j) < 0.698 Then ph(j) = 8 If ph(j) < 0.776 Then ph(j) = 9 If ph(j) < 0.8713 And ph(j) >= 0.776 Then pb(j) = "A" If ph(j) < 0.8849 And ph(j) >= 0.8713 Then pb(j) = "B" If ph(j) < 0.9616 And ph(j) >= 0.8849 Then pb(j) = "C" If ph(j) < 0.9975 And ph(j) >= 0.9616 Then pb(j) = "D" If ph(j) < 0.9987 And ph(j) >= 0.9975 Then pb(j) = "E" If ph(j) < 1 And ph(j) >= 0.9987 Then pb(j) = "F" If ph(j) > 10 Then ph(j) = 0 If pb(j) <> "Z" Then ph(j) = pb(j) If ph(j) = "0" Then flag = 1 If ph(j) = "1" Then flag = 1 If ph(j) = "2" Then flag = 1 If ph(j) = "6" Then flag = 1 If ph(j) = "8" Then flag = 1 If pb(j) = "B" Then flag = 1 If pb(j) = "E" Then flag = 1 If pb(j) = "F" Then flag = 1 Next j For j = 14 To 15 ' D13 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.1361 Then ph(j) = 11 If ph(j) < 0.2079 Then ph(j) = 1 If ph(j) < 0.2574 Then ph(j) = 2 If ph(j) < 0.5458 Then ph(j) = 3 If ph(j) < 0.8577 Then ph(j) = 4 If ph(j) < 0.9456 Then ph(j) = 5 If ph(j) < 0.9976 Then ph(j) = 6 If ph(j) < 1 Then ph(j) = 7 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "7" Then flag = 1 Next j For j = 16 To 17 ' D7 ' RNG temp = x0 * a + c temp = temp / z x1 = (temp - Fix(temp)) * z x0 = x1 phj = x1 / z ph(j) = phj If ph(j) < 0.0241 Then ph(j) = 11 If ph(j) < 0.1735 Then ph(j) = 1 If ph(j) < 0.3672 Then ph(j) = 2 If ph(j) < 0.6014 Then ph(j) = 3 If ph(j) < 0.7875 Then ph(j) = 4 If ph(j) < 0.9419 Then ph(j) = 5 If ph(j) < 0.9925 Then ph(j) = 6 If ph(j) < 0.9988 Then ph(j) = 7 If ph(j) < 1 Then ph(j) = 8 If ph(j) > 10 Then ph(j) = 0 If ph(j) = "0" Then flag = 1 If ph(j) = "7" Then flag = 1 If ph(j) = "8" Then flag = 1 Next j If flag = 1 Then countf = countf + 1 If flag = 0 Then ' output the original generated file Write #1, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) ' Because in real DNA profiles without further info ,no one ' knows which allele in each pair came from the mother or father ' by convention they are written smaller ,larger (or equal). ' The following directs each pair For j = 0 To 16 Step 2 If ph(j + 1) < ph(j) Then jjj = ph(j) ph(j) = ph(j + 1) ph(j + 1) = jjj End If Next j ' put extra conditional statements here to reduce ' the number of files or just delete some of the following ' ' dividing on first column, file by file If ph(0) = 0 Then Write #10, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count0 = count0 + 1 End If If ph(0) = 1 Then Write #11, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count1 = count1 + 1 End If If ph(0) = 2 Then Write #12, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count2 = count2 + 1 End If If ph(0) = 3 Then Write #13, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count3 = count3 + 1 End If If ph(0) = 4 Then Write #14, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count4 = count4 + 1 End If If ph(0) = 5 Then Write #15, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count5 = count5 + 1 End If If ph(0) = 6 Then Write #16, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count6 = count6 + 1 End If If ph(0) = 7 Then Write #17, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count7 = count7 + 1 End If If ph(0) = 8 Then Write #18, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count8 = count8 + 1 End If If ph(0) = 9 Then Write #19, ph(0) & ph(1) & ph(2) & ph(3) & ph(4) & ph(5) & ph(6) & ph(7) & ph(8) & ph(9) & ph(10) & ph(11) & ph(12) & ph(13) & ph(14) & ph(15) & ph(16) & ph(17) count9 = count9 + 1 End If End If Next x Close #10 Close #11 Close #12 Close #13 Close #14 Close #15 Close #16 Close #17 Close #18 Close #19 Close #1 ' count file for data to fix for - next loops in sucessive dividings Open "jun07-c" For Output As #20 Write #20, 0, count0, 1, count1, 2, count2, 3, count3, 4, count4, 5, count5, 6, count6, 7, count7, 8, count8, 9, count9, "countflag ", countf Close #20
Did a 477,141 run for Oz capital Caucasian data for 3 per cent or more allele frequencies using the above macro. Produced 3 , 9 loci matches representing D3,vWA,D5,D8,D18,FGA,D21,D13,D7 (15,16)(16,18)(12,13)(12,13)(16,17)(20,23)(30,31.2)(11,12)(9,10) (15,16)(15,18)(12,12)(10,13)(16,17)(21,23)(30,30)(11,12)(8,10) (16,18)(16,18)(12,12)(11,13)(12,14)(23,24)(28,30)(11,13)(10,10) lowest allele frequency of these 3 is 8 per cent Each pair derived from 2 different 'profiles' before directing pairs so random function good. So between 3 and 4 matches in 477,141 implies baseline single match in 3 percent sub-population of 1 in 240,000 to 1 in 275,000 Taking ' average ' of these 3 matches and the previous full alleles match then the Australian Caucasian 'Average Joe' on D3,vWA,D5,D8,D18,FGA,D21,D13,D7 is (15,16)(16,18)(12,12)(13,13)(16,17)(21,23)(30,30)(11.12)(10,10) Other matches - pairs 6 loci - 12,718 7 - 732 8 - 59 Triples 6 loci - 749 7 - 2 Quadruples 6 - 53 7 - 0
Using this generator to simulate the Chaseling 7 loci match in 9 loci. There are 36 ways of picking 7 from 9. Generating 5,500 >=3% profiles and selecting all 36 possibles then the results were 15 pairs of matches. Pair matching on just the first 7 of 9 loci produced 1 match.

Email Paul Nutteing by removing 4 of the 5 dots
or email Paul Nutteing ,remove all but one dot
Or a message on usenet group uk.legal has got to me recenently a couple of times.
A lot of the contents of this file plus other material 'peer reviewed' on the main forensic science usergroup

Background
A simulation of a large DNA profile database
A simulation of DNA profile 'families'
A simulation of DNA profile families with consanguinity
A simulation of DNA profile 'families' for 6 generations
dnas.htm revisited with all alleles represented
dnas.htm revisited for >8 percent allele frequency subset (similar ancestry )
Simulation of Taiwanese Tao and Rukai populations to explore the effect of within and without ancestral clusters
Basques autochthonous DNA profiles simulation, 9 loci
Australian Capital Caucasian 9 loci simulation
Australian Capital Caucasian 9 loci simulation, >= 5% allele frequency
CODIS, 13 Loci Caucasian Simulation
Automating the macros
Exploring other DNA profile match scenarios
Suspect familial matching
Return to co-ancestry factor in the NDNAD simulations
144 random matches in 65,000 -- ONLY?


Powered by counter.bloke.com