├── .gitignore ├── README.md ├── bin ├── bayesR └── bayesRv2 ├── doc └── BayesRManual.pdf ├── examples ├── example1 │ ├── simdata.bed │ ├── simdata.bim │ ├── simdata.fam │ ├── simout.frq │ ├── simout.gv │ ├── simout.hyp │ ├── simout.log │ ├── simout.model │ └── simout.param ├── example2 │ ├── mod2 │ ├── seg │ ├── simdata2.bed │ ├── simdata2.bim │ ├── simdata2.fam │ ├── simout2.frq │ ├── simout2.gv │ ├── simout2.hyp │ ├── simout2.log │ ├── simout2.model │ └── simout2.param └── example3 │ ├── mod3 │ ├── seg │ ├── simdata2.bed │ ├── simdata2.bim │ ├── simdata2.fam │ ├── simout3.frq │ ├── simout3.gv │ ├── simout3.hyp │ ├── simout3.log │ ├── simout3.model │ ├── simout3.param │ └── var3 ├── old ├── bin │ ├── bayesR │ └── bayesRv2 ├── doc │ ├── BayesRmanual-0.75.pdf │ └── fast(er)BayesR.pdf ├── example │ ├── .DS_Store │ ├── simdata.bed │ ├── simdata.bim │ ├── simdata.fam │ ├── simout.frq │ ├── simout.gv │ ├── simout.hyp │ ├── simout.log │ ├── simout.model │ └── simout.param └── src │ ├── RandomDistributions.f90 │ ├── bayesR.f90 │ ├── bayesRv2.f90 │ ├── baymods.f90 │ └── baymodsv2.f90 └── src ├── RandomDistributions.f90 ├── bayesR.f90 └── baymods.f90 /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore FORTRAN compile files 2 | src/*.mod 3 | src/bayesR 4 | src/#*# 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | bayesR 2 | ====== 3 | 4 | Bayesian hierarchical model for complex trait analysis 5 | 6 | (https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1004969) 7 | 8 | # Update 01/04/2021 9 | Various new features and improvements: 10 | 11 | * further reduced memory requirements 12 | * inclusion of covariates 13 | * grouped effects models to fit more complex models (e.g. partioning of variance) 14 | * flat input files (not supported in bayesRv2) 15 | * fitted values 16 | * prediction of phenotypes 17 | * unified source code 18 | 19 | 20 | Previous release moved to folder /old 21 | 22 | ### Quick start 23 | 24 | #### Clone: 25 | 26 | ```sh 27 | git clone https://github.com/syntheke/bayesR.git 28 | ``` 29 | 30 | #### Compile: 31 | 32 | in the src folder 33 | ```sh 34 | gfortran -o bayesR -O2 -cpp RandomDistributions.f90 baymods.f90 bayesR.f90 35 | gfortran -o bayesRv2 -O2 -cpp -Dblock -fopenmp RandomDistributions.f90 baymods.f90 bayesR.f90 36 | ifort -o bayesR -O3 -fpp RandomDistributions.f90 baymods.f90 bayesR.f90 37 | ifort -o bayesRv2 -O3 -fpp -Dblock -openmp -static RandomDistributions.f90 baymods.f90 bayesR.f90 38 | ``` 39 | 40 | #### Run: 41 | 42 | ```sh 43 | bayesR -bfile simdata -out simout 44 | ``` 45 | ##### Example1 46 | Example from the [14th QTL-MAS workshop](http://jay.up.poznan.pl/qtlmas2010/index.html). 47 | ```sh 48 | bayesR -bfile example/simdata -out simout -numit 10000 -burnin 5000 -seed 333 49 | ``` 50 | ##### Example2 51 | Genome position specific priors 52 | ```sh 53 | bayesR -bfile simdata2 -out simout2 -numit 10000 -burnin 5000 -seed 333 -n 2 -snpmodel mod2 -segment seg 54 | ``` 55 | ##### Example3 56 | Grouped effects with mixture priors 57 | ```sh 58 | bayesR -bfile simdata2 -out simout3 -numit 10000 -burnin 5000 -seed 333 -n 2 -snpmodel mod3 -segments seg -varcomp var3 59 | ``` 60 | 61 | #### Help: 62 | 63 | ```sh 64 | bayesR -help 65 | ``` 66 | 67 | #### Tell me more: 68 | 69 | [BayesRManual.pdf](https://github.com/syntheke/bayesR/blob/master/doc/BayesRManual.pdf?raw=true) 70 | 71 | -------------------------------------------------------------------------------- /bin/bayesR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/bin/bayesR -------------------------------------------------------------------------------- /bin/bayesRv2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/bin/bayesRv2 -------------------------------------------------------------------------------- /doc/BayesRManual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/doc/BayesRManual.pdf -------------------------------------------------------------------------------- /examples/example1/simdata.bed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/examples/example1/simdata.bed -------------------------------------------------------------------------------- /examples/example1/simout.gv: -------------------------------------------------------------------------------- 1 | 0.6429159E+002 2 | 0.7613910E+002 3 | 0.6977891E+002 4 | 0.6212822E+002 5 | 0.6796411E+002 6 | 0.6377917E+002 7 | 0.7104866E+002 8 | 0.7434408E+002 9 | 0.6944474E+002 10 | 0.6627461E+002 11 | 0.7576371E+002 12 | 0.6203992E+002 13 | 0.7794893E+002 14 | 0.5731496E+002 15 | 0.6974524E+002 16 | 0.6006479E+002 17 | 0.8108292E+002 18 | 0.6307527E+002 19 | 0.7584511E+002 20 | 0.8216117E+002 21 | 0.5988667E+002 22 | 0.6947594E+002 23 | 0.6588777E+002 24 | 0.6698542E+002 25 | 0.6883481E+002 26 | 0.6958630E+002 27 | 0.6824643E+002 28 | 0.6925833E+002 29 | 0.7007099E+002 30 | 0.6949508E+002 31 | 0.6189080E+002 32 | 0.6291571E+002 33 | 0.6406138E+002 34 | 0.6414400E+002 35 | 0.6738393E+002 36 | 0.6995147E+002 37 | 0.6567263E+002 38 | 0.6991494E+002 39 | 0.6684683E+002 40 | 0.6683893E+002 41 | 0.6963994E+002 42 | 0.7071326E+002 43 | 0.6337110E+002 44 | 0.7171489E+002 45 | 0.6207144E+002 46 | 0.6196962E+002 47 | 0.5787954E+002 48 | 0.6037576E+002 49 | 0.6283549E+002 50 | 0.6720526E+002 51 | 0.6911314E+002 52 | 0.7231598E+002 53 | 0.7002878E+002 54 | 0.6898430E+002 55 | 0.6721759E+002 56 | 0.6363235E+002 57 | 0.7086411E+002 58 | 0.6825760E+002 59 | 0.6000682E+002 60 | 0.7112997E+002 61 | 0.6346413E+002 62 | 0.6825155E+002 63 | 0.6139954E+002 64 | 0.7160262E+002 65 | 0.7034883E+002 66 | 0.7169577E+002 67 | 0.7062464E+002 68 | 0.7791366E+002 69 | 0.6530968E+002 70 | 0.6792663E+002 71 | 0.6479152E+002 72 | 0.6736933E+002 73 | 0.7790578E+002 74 | 0.7567232E+002 75 | 0.5927146E+002 76 | 0.7534427E+002 77 | 0.7391277E+002 78 | 0.7257075E+002 79 | 0.6693452E+002 80 | 0.7449512E+002 81 | 0.7029355E+002 82 | 0.7000531E+002 83 | 0.7346205E+002 84 | 0.6715449E+002 85 | 0.7326626E+002 86 | 0.6421640E+002 87 | 0.7544285E+002 88 | 0.7448223E+002 89 | 0.7777631E+002 90 | 0.6618273E+002 91 | 0.7507937E+002 92 | 0.6988146E+002 93 | 0.6602019E+002 94 | 0.7249009E+002 95 | 0.7901700E+002 96 | 0.6319779E+002 97 | 0.7168809E+002 98 | 0.5896366E+002 99 | 0.6709285E+002 100 | 0.7830750E+002 101 | 0.7364480E+002 102 | 0.6948182E+002 103 | 0.6408947E+002 104 | 0.7141723E+002 105 | 0.7334880E+002 106 | 0.6606655E+002 107 | 0.7341185E+002 108 | 0.7378502E+002 109 | 0.7394780E+002 110 | 0.6940737E+002 111 | 0.7445385E+002 112 | 0.6437339E+002 113 | 0.7586194E+002 114 | 0.8117960E+002 115 | 0.6683376E+002 116 | 0.7391032E+002 117 | 0.6675814E+002 118 | 0.7596022E+002 119 | 0.7146385E+002 120 | 0.7637052E+002 121 | 0.7480844E+002 122 | 0.6522108E+002 123 | 0.5975286E+002 124 | 0.7868436E+002 125 | 0.7590253E+002 126 | 0.6754948E+002 127 | 0.6996490E+002 128 | 0.6765215E+002 129 | 0.7414922E+002 130 | 0.6264554E+002 131 | 0.6166692E+002 132 | 0.6820605E+002 133 | 0.6699703E+002 134 | 0.6158630E+002 135 | 0.7041717E+002 136 | 0.5632024E+002 137 | 0.6149122E+002 138 | 0.6269494E+002 139 | 0.7327257E+002 140 | 0.6504164E+002 141 | 0.6970621E+002 142 | 0.5949777E+002 143 | 0.6698339E+002 144 | 0.6761336E+002 145 | 0.5712502E+002 146 | 0.6501287E+002 147 | 0.5900451E+002 148 | 0.7054561E+002 149 | 0.5882683E+002 150 | 0.6830603E+002 151 | 0.6491270E+002 152 | 0.6623390E+002 153 | 0.5881875E+002 154 | 0.6710085E+002 155 | 0.6206289E+002 156 | 0.5900395E+002 157 | 0.6433654E+002 158 | 0.6054417E+002 159 | 0.5577008E+002 160 | 0.6854906E+002 161 | 0.6263303E+002 162 | 0.6656596E+002 163 | 0.6081652E+002 164 | 0.7166952E+002 165 | 0.7307286E+002 166 | 0.5896236E+002 167 | 0.6477358E+002 168 | 0.7267580E+002 169 | 0.6794461E+002 170 | 0.7199720E+002 171 | 0.6784802E+002 172 | 0.7060348E+002 173 | 0.6784297E+002 174 | 0.6961813E+002 175 | 0.7100538E+002 176 | 0.6661730E+002 177 | 0.7472594E+002 178 | 0.6481467E+002 179 | 0.7109735E+002 180 | 0.6982815E+002 181 | 0.6624419E+002 182 | 0.7139086E+002 183 | 0.6146024E+002 184 | 0.6566010E+002 185 | 0.7076279E+002 186 | 0.7264133E+002 187 | 0.7292178E+002 188 | 0.7698116E+002 189 | 0.6655653E+002 190 | 0.7013253E+002 191 | 0.6954484E+002 192 | 0.6920633E+002 193 | 0.7194742E+002 194 | 0.6722062E+002 195 | 0.7005433E+002 196 | 0.6991882E+002 197 | 0.6837551E+002 198 | 0.6742977E+002 199 | 0.6491653E+002 200 | 0.6685035E+002 201 | 0.8016703E+002 202 | 0.7186438E+002 203 | 0.7965240E+002 204 | 0.6622996E+002 205 | 0.7382286E+002 206 | 0.8019086E+002 207 | 0.6796224E+002 208 | 0.7240948E+002 209 | 0.7032096E+002 210 | 0.7512474E+002 211 | 0.7652993E+002 212 | 0.7814174E+002 213 | 0.7074877E+002 214 | 0.7678583E+002 215 | 0.6497942E+002 216 | 0.7823009E+002 217 | 0.7630488E+002 218 | 0.7207888E+002 219 | 0.7177793E+002 220 | 0.7634318E+002 221 | 0.7106122E+002 222 | 0.7583251E+002 223 | 0.6851680E+002 224 | 0.7037242E+002 225 | 0.6382750E+002 226 | 0.8206940E+002 227 | 0.6763367E+002 228 | 0.6914042E+002 229 | 0.7305609E+002 230 | 0.7013935E+002 231 | 0.6154650E+002 232 | 0.6276533E+002 233 | 0.6214849E+002 234 | 0.6261586E+002 235 | 0.5650735E+002 236 | 0.5729529E+002 237 | 0.5660938E+002 238 | 0.5903962E+002 239 | 0.5709413E+002 240 | 0.6708870E+002 241 | 0.5611795E+002 242 | 0.6165779E+002 243 | 0.5989268E+002 244 | 0.6054113E+002 245 | 0.6662579E+002 246 | 0.6187866E+002 247 | 0.5711692E+002 248 | 0.5460270E+002 249 | 0.6553544E+002 250 | 0.6091206E+002 251 | 0.5454966E+002 252 | 0.5993163E+002 253 | 0.5504892E+002 254 | 0.5722645E+002 255 | 0.6355047E+002 256 | 0.6330886E+002 257 | 0.6902391E+002 258 | 0.5685865E+002 259 | 0.5975130E+002 260 | 0.6465302E+002 261 | 0.6136097E+002 262 | 0.6355502E+002 263 | 0.6908651E+002 264 | 0.6836284E+002 265 | 0.5531724E+002 266 | 0.6412446E+002 267 | 0.5748320E+002 268 | 0.5957708E+002 269 | 0.5947619E+002 270 | 0.5763325E+002 271 | 0.6213669E+002 272 | 0.6103659E+002 273 | 0.5217905E+002 274 | 0.5976909E+002 275 | 0.6036373E+002 276 | 0.6595764E+002 277 | 0.6887855E+002 278 | 0.7178499E+002 279 | 0.6605972E+002 280 | 0.7931519E+002 281 | 0.7290814E+002 282 | 0.6594010E+002 283 | 0.6670795E+002 284 | 0.7442103E+002 285 | 0.7354550E+002 286 | 0.6827814E+002 287 | 0.6567481E+002 288 | 0.6960967E+002 289 | 0.6235895E+002 290 | 0.6209907E+002 291 | 0.6245817E+002 292 | 0.6007189E+002 293 | 0.6821409E+002 294 | 0.5676127E+002 295 | 0.6676114E+002 296 | 0.5350471E+002 297 | 0.6942000E+002 298 | 0.6329402E+002 299 | 0.7191816E+002 300 | 0.5539659E+002 301 | 0.5214097E+002 302 | 0.6878674E+002 303 | 0.5252202E+002 304 | 0.6270515E+002 305 | 0.6991714E+002 306 | 0.7056437E+002 307 | 0.5546278E+002 308 | 0.7347416E+002 309 | 0.4656313E+002 310 | 0.6378581E+002 311 | 0.6208890E+002 312 | 0.7583322E+002 313 | 0.7290951E+002 314 | 0.7582401E+002 315 | 0.7716618E+002 316 | 0.7295530E+002 317 | 0.8281264E+002 318 | 0.7661212E+002 319 | 0.8182538E+002 320 | 0.7732518E+002 321 | 0.8551448E+002 322 | 0.7551715E+002 323 | 0.7770779E+002 324 | 0.8238992E+002 325 | 0.7430849E+002 326 | 0.8339156E+002 327 | 0.7612794E+002 328 | 0.7626491E+002 329 | 0.8227010E+002 330 | 0.7636636E+002 331 | 0.8387015E+002 332 | 0.7401398E+002 333 | 0.7771625E+002 334 | 0.8131471E+002 335 | 0.7280054E+002 336 | 0.7331982E+002 337 | 0.7893906E+002 338 | 0.8138721E+002 339 | 0.8015358E+002 340 | 0.7866843E+002 341 | 0.7761167E+002 342 | 0.7792136E+002 343 | 0.7408839E+002 344 | 0.8054321E+002 345 | 0.8475950E+002 346 | 0.8147977E+002 347 | 0.7588222E+002 348 | 0.8065228E+002 349 | 0.8296519E+002 350 | 0.7351627E+002 351 | 0.7210711E+002 352 | 0.8165890E+002 353 | 0.7475646E+002 354 | 0.7199776E+002 355 | 0.7291575E+002 356 | 0.7382935E+002 357 | 0.6030072E+002 358 | 0.6264619E+002 359 | 0.6042244E+002 360 | 0.6574664E+002 361 | 0.7053408E+002 362 | 0.5860121E+002 363 | 0.6845681E+002 364 | 0.5954380E+002 365 | 0.6536588E+002 366 | 0.5815840E+002 367 | 0.5869465E+002 368 | 0.7062675E+002 369 | 0.6967333E+002 370 | 0.6600454E+002 371 | 0.6885023E+002 372 | 0.6987740E+002 373 | 0.7295414E+002 374 | 0.7560538E+002 375 | 0.6902036E+002 376 | 0.7195362E+002 377 | 0.7143265E+002 378 | 0.7439673E+002 379 | 0.7168311E+002 380 | 0.7118305E+002 381 | 0.6939658E+002 382 | 0.7107792E+002 383 | 0.7076152E+002 384 | 0.6993753E+002 385 | 0.7503778E+002 386 | 0.6925779E+002 387 | 0.6794942E+002 388 | 0.7216111E+002 389 | 0.7378000E+002 390 | 0.6867131E+002 391 | 0.7702821E+002 392 | 0.7541996E+002 393 | 0.7862513E+002 394 | 0.7010535E+002 395 | 0.7576713E+002 396 | 0.7341931E+002 397 | 0.7698789E+002 398 | 0.7402735E+002 399 | 0.7463104E+002 400 | 0.7004278E+002 401 | 0.7740498E+002 402 | 0.7117159E+002 403 | 0.7329949E+002 404 | 0.7292085E+002 405 | 0.7340649E+002 406 | 0.6469841E+002 407 | 0.6863424E+002 408 | 0.7374175E+002 409 | 0.7179439E+002 410 | 0.6814733E+002 411 | 0.8398495E+002 412 | 0.7669795E+002 413 | 0.7349234E+002 414 | 0.7176958E+002 415 | 0.7206022E+002 416 | 0.7287661E+002 417 | 0.8315279E+002 418 | 0.8116488E+002 419 | 0.7869918E+002 420 | 0.7225132E+002 421 | 0.7533572E+002 422 | 0.6400823E+002 423 | 0.6474752E+002 424 | 0.6621253E+002 425 | 0.7395786E+002 426 | 0.7166851E+002 427 | 0.6445987E+002 428 | 0.7098263E+002 429 | 0.8113093E+002 430 | 0.7441204E+002 431 | 0.8286913E+002 432 | 0.6616527E+002 433 | 0.7315989E+002 434 | 0.7890851E+002 435 | 0.7268846E+002 436 | 0.7780963E+002 437 | 0.6595595E+002 438 | 0.6843853E+002 439 | 0.5783466E+002 440 | 0.5848555E+002 441 | 0.6281118E+002 442 | 0.5141785E+002 443 | 0.5473070E+002 444 | 0.5961438E+002 445 | 0.6687687E+002 446 | 0.5170316E+002 447 | 0.5436224E+002 448 | 0.6713438E+002 449 | 0.6730980E+002 450 | 0.5816315E+002 451 | 0.5422289E+002 452 | 0.5540077E+002 453 | 0.6377553E+002 454 | 0.6379150E+002 455 | 0.5985850E+002 456 | 0.5906402E+002 457 | 0.6552389E+002 458 | 0.6508957E+002 459 | 0.6463726E+002 460 | 0.6165090E+002 461 | 0.6516121E+002 462 | 0.6167040E+002 463 | 0.6273209E+002 464 | 0.5060535E+002 465 | 0.6267068E+002 466 | 0.5462395E+002 467 | 0.5755093E+002 468 | 0.5906691E+002 469 | 0.5430128E+002 470 | 0.5762930E+002 471 | 0.6046214E+002 472 | 0.5987642E+002 473 | 0.6331047E+002 474 | 0.6689288E+002 475 | 0.6383352E+002 476 | 0.5891777E+002 477 | 0.5834973E+002 478 | 0.6670985E+002 479 | 0.6645271E+002 480 | 0.6536868E+002 481 | 0.6935563E+002 482 | 0.7235332E+002 483 | 0.5417767E+002 484 | 0.5863381E+002 485 | 0.5912675E+002 486 | 0.6936912E+002 487 | 0.6361898E+002 488 | 0.6345073E+002 489 | 0.6985372E+002 490 | 0.6519359E+002 491 | 0.6412290E+002 492 | 0.6574209E+002 493 | 0.6132698E+002 494 | 0.6069124E+002 495 | 0.7251647E+002 496 | 0.6953717E+002 497 | 0.6353911E+002 498 | 0.6958184E+002 499 | 0.6011371E+002 500 | 0.6208307E+002 501 | 0.6649719E+002 502 | 0.7212583E+002 503 | 0.7408509E+002 504 | 0.7335859E+002 505 | 0.8019508E+002 506 | 0.7256425E+002 507 | 0.7297072E+002 508 | 0.6899036E+002 509 | 0.7854602E+002 510 | 0.7396289E+002 511 | 0.7982186E+002 512 | 0.6960541E+002 513 | 0.7160356E+002 514 | 0.7134395E+002 515 | 0.7097288E+002 516 | 0.8157795E+002 517 | 0.7493952E+002 518 | 0.7082716E+002 519 | 0.7132049E+002 520 | 0.8005624E+002 521 | 0.7721473E+002 522 | 0.7215148E+002 523 | 0.6710435E+002 524 | 0.7378890E+002 525 | 0.7652774E+002 526 | 0.7700587E+002 527 | 0.8205399E+002 528 | 0.6551535E+002 529 | 0.6340374E+002 530 | 0.7978935E+002 531 | 0.6769676E+002 532 | 0.7388064E+002 533 | 0.7609113E+002 534 | 0.7808719E+002 535 | 0.6369820E+002 536 | 0.6946352E+002 537 | 0.7110771E+002 538 | 0.7564949E+002 539 | 0.7597371E+002 540 | 0.6787342E+002 541 | 0.6778405E+002 542 | 0.7729858E+002 543 | 0.7495760E+002 544 | 0.6970493E+002 545 | 0.6890495E+002 546 | 0.6976385E+002 547 | 0.7104869E+002 548 | 0.6936989E+002 549 | 0.7250674E+002 550 | 0.6955584E+002 551 | 0.7182568E+002 552 | 0.6778458E+002 553 | 0.7235604E+002 554 | 0.7140034E+002 555 | 0.6361948E+002 556 | 0.7181032E+002 557 | 0.6542169E+002 558 | 0.6844387E+002 559 | 0.7342322E+002 560 | 0.7096399E+002 561 | 0.6921202E+002 562 | 0.6891261E+002 563 | 0.7452503E+002 564 | 0.6997938E+002 565 | 0.7487096E+002 566 | 0.7165293E+002 567 | 0.7182578E+002 568 | 0.7276242E+002 569 | 0.7164956E+002 570 | 0.6951595E+002 571 | 0.7113476E+002 572 | 0.7112325E+002 573 | 0.7362201E+002 574 | 0.6954947E+002 575 | 0.6933816E+002 576 | 0.7166153E+002 577 | 0.7019477E+002 578 | 0.7043233E+002 579 | 0.7277647E+002 580 | 0.7187445E+002 581 | 0.6677998E+002 582 | 0.7246171E+002 583 | 0.7485867E+002 584 | 0.7065259E+002 585 | 0.7163296E+002 586 | 0.6548819E+002 587 | 0.7136441E+002 588 | 0.7040745E+002 589 | 0.7280865E+002 590 | 0.7189771E+002 591 | 0.6577187E+002 592 | 0.6744619E+002 593 | 0.6460319E+002 594 | 0.5948458E+002 595 | 0.6574245E+002 596 | 0.6866403E+002 597 | 0.6308170E+002 598 | 0.7082776E+002 599 | 0.6474261E+002 600 | 0.6727899E+002 601 | 0.6351557E+002 602 | 0.6638021E+002 603 | 0.7031231E+002 604 | 0.6908129E+002 605 | 0.6568704E+002 606 | 0.7613690E+002 607 | 0.6815581E+002 608 | 0.5984180E+002 609 | 0.6831199E+002 610 | 0.6954640E+002 611 | 0.6340591E+002 612 | 0.7449403E+002 613 | 0.6644106E+002 614 | 0.7279250E+002 615 | 0.7014801E+002 616 | 0.6137306E+002 617 | 0.6925034E+002 618 | 0.6633244E+002 619 | 0.7325899E+002 620 | 0.6666183E+002 621 | 0.7608008E+002 622 | 0.6920920E+002 623 | 0.6999427E+002 624 | 0.6776594E+002 625 | 0.6358783E+002 626 | 0.6927757E+002 627 | 0.7109942E+002 628 | 0.6653790E+002 629 | 0.6989574E+002 630 | 0.6896544E+002 631 | 0.7247298E+002 632 | 0.7112977E+002 633 | 0.7012903E+002 634 | 0.7390580E+002 635 | 0.6277057E+002 636 | 0.6387160E+002 637 | 0.6484059E+002 638 | 0.6966677E+002 639 | 0.7550716E+002 640 | 0.7188500E+002 641 | 0.7078810E+002 642 | 0.6957115E+002 643 | 0.7278305E+002 644 | 0.6759926E+002 645 | 0.6631169E+002 646 | 0.7687462E+002 647 | 0.6307108E+002 648 | 0.6901984E+002 649 | 0.7976120E+002 650 | 0.7179079E+002 651 | 0.6935741E+002 652 | 0.6888881E+002 653 | 0.7447431E+002 654 | 0.6747334E+002 655 | 0.7064534E+002 656 | 0.6901327E+002 657 | 0.8232190E+002 658 | 0.7181469E+002 659 | 0.7089466E+002 660 | 0.6338635E+002 661 | 0.7252671E+002 662 | 0.7280134E+002 663 | 0.6944642E+002 664 | 0.6715173E+002 665 | 0.6496139E+002 666 | 0.6404529E+002 667 | 0.7805460E+002 668 | 0.6873764E+002 669 | 0.6261232E+002 670 | 0.6556686E+002 671 | 0.6660022E+002 672 | 0.5961811E+002 673 | 0.6261349E+002 674 | 0.6236103E+002 675 | 0.6258746E+002 676 | 0.5388585E+002 677 | 0.6626665E+002 678 | 0.6491188E+002 679 | 0.6412124E+002 680 | 0.7284428E+002 681 | 0.6332659E+002 682 | 0.6351722E+002 683 | 0.6972327E+002 684 | 0.6537554E+002 685 | 0.6499735E+002 686 | 0.7427010E+002 687 | 0.6020116E+002 688 | 0.7359189E+002 689 | 0.7053078E+002 690 | 0.7663387E+002 691 | 0.6677584E+002 692 | 0.6635302E+002 693 | 0.6669895E+002 694 | 0.5668217E+002 695 | 0.7265610E+002 696 | 0.6901245E+002 697 | 0.6521994E+002 698 | 0.6582547E+002 699 | 0.7892410E+002 700 | 0.5894694E+002 701 | 0.5999872E+002 702 | 0.5973154E+002 703 | 0.6623620E+002 704 | 0.7097345E+002 705 | 0.5373177E+002 706 | 0.6659702E+002 707 | 0.6289706E+002 708 | 0.6355903E+002 709 | 0.7407017E+002 710 | 0.6606806E+002 711 | 0.7989798E+002 712 | 0.7528507E+002 713 | 0.7453691E+002 714 | 0.6929399E+002 715 | 0.6150471E+002 716 | 0.5987225E+002 717 | 0.6902409E+002 718 | 0.6924584E+002 719 | 0.6390906E+002 720 | 0.6939639E+002 721 | 0.6624545E+002 722 | 0.5957610E+002 723 | 0.6879664E+002 724 | 0.6907168E+002 725 | 0.6927783E+002 726 | 0.6113300E+002 727 | 0.7103062E+002 728 | 0.6913316E+002 729 | 0.5884522E+002 730 | 0.6621049E+002 731 | 0.6154643E+002 732 | 0.7303477E+002 733 | 0.6866560E+002 734 | 0.6805069E+002 735 | 0.6634580E+002 736 | 0.7128017E+002 737 | 0.7047833E+002 738 | 0.6935390E+002 739 | 0.6806922E+002 740 | 0.6577190E+002 741 | 0.7172776E+002 742 | 0.6663913E+002 743 | 0.6845988E+002 744 | 0.6143445E+002 745 | 0.7524356E+002 746 | 0.6427996E+002 747 | 0.6463984E+002 748 | 0.6054144E+002 749 | 0.7356259E+002 750 | 0.7619350E+002 751 | 0.7069807E+002 752 | 0.7146644E+002 753 | 0.7215947E+002 754 | 0.7160227E+002 755 | 0.7077292E+002 756 | 0.7631977E+002 757 | 0.7399110E+002 758 | 0.7338174E+002 759 | 0.7354331E+002 760 | 0.7161417E+002 761 | 0.6760739E+002 762 | 0.7501774E+002 763 | 0.7802102E+002 764 | 0.7144899E+002 765 | 0.6929799E+002 766 | 0.7783681E+002 767 | 0.7738667E+002 768 | 0.6875085E+002 769 | 0.7552860E+002 770 | 0.6603469E+002 771 | 0.7424082E+002 772 | 0.7254619E+002 773 | 0.7143060E+002 774 | 0.7338169E+002 775 | 0.6421404E+002 776 | 0.7276205E+002 777 | 0.7118147E+002 778 | 0.7599819E+002 779 | 0.6730076E+002 780 | 0.8175597E+002 781 | 0.7260751E+002 782 | 0.7627641E+002 783 | 0.7340853E+002 784 | 0.6676445E+002 785 | 0.7799333E+002 786 | 0.7044164E+002 787 | 0.7219845E+002 788 | 0.7108429E+002 789 | 0.6217199E+002 790 | 0.6250610E+002 791 | 0.5722790E+002 792 | 0.5647266E+002 793 | 0.6587431E+002 794 | 0.6026175E+002 795 | 0.6378191E+002 796 | 0.6304067E+002 797 | 0.6550662E+002 798 | 0.5941481E+002 799 | 0.6931767E+002 800 | 0.6829113E+002 801 | 0.6801221E+002 802 | 0.6214734E+002 803 | 0.6334975E+002 804 | 0.7175732E+002 805 | 0.6927777E+002 806 | 0.6288354E+002 807 | 0.6618500E+002 808 | 0.6453465E+002 809 | 0.6522979E+002 810 | 0.7288339E+002 811 | 0.6987639E+002 812 | 0.6201180E+002 813 | 0.7345963E+002 814 | 0.6859339E+002 815 | 0.5844717E+002 816 | 0.6938213E+002 817 | 0.7396761E+002 818 | 0.6304211E+002 819 | 0.6497207E+002 820 | 0.7042938E+002 821 | 0.6523557E+002 822 | 0.7653031E+002 823 | 0.6453348E+002 824 | 0.7233442E+002 825 | 0.5619226E+002 826 | 0.7117365E+002 827 | 0.7858614E+002 828 | 0.7287213E+002 829 | 0.7903215E+002 830 | 0.7286618E+002 831 | 0.6264266E+002 832 | 0.6396498E+002 833 | 0.6937727E+002 834 | 0.6422050E+002 835 | 0.6834392E+002 836 | 0.6933557E+002 837 | 0.6997003E+002 838 | 0.6695350E+002 839 | 0.7251201E+002 840 | 0.7053322E+002 841 | 0.7251300E+002 842 | 0.7095585E+002 843 | 0.5998206E+002 844 | 0.7178319E+002 845 | 0.6748575E+002 846 | 0.7275320E+002 847 | 0.6511976E+002 848 | 0.6532442E+002 849 | 0.6709244E+002 850 | 0.6359481E+002 851 | 0.6618296E+002 852 | 0.6731206E+002 853 | 0.7078936E+002 854 | 0.6701225E+002 855 | 0.6395177E+002 856 | 0.7641673E+002 857 | 0.6792470E+002 858 | 0.6599813E+002 859 | 0.6664113E+002 860 | 0.7185273E+002 861 | 0.6735967E+002 862 | 0.6522216E+002 863 | 0.6923640E+002 864 | 0.6854820E+002 865 | 0.6985937E+002 866 | 0.6702818E+002 867 | 0.6391571E+002 868 | 0.7060554E+002 869 | 0.6323496E+002 870 | 0.6246445E+002 871 | 0.6926207E+002 872 | 0.6983486E+002 873 | 0.6483683E+002 874 | 0.6874724E+002 875 | 0.6836530E+002 876 | 0.7082535E+002 877 | 0.6915561E+002 878 | 0.6743096E+002 879 | 0.6843245E+002 880 | 0.6711019E+002 881 | 0.7114306E+002 882 | 0.6433337E+002 883 | 0.6630402E+002 884 | 0.6491423E+002 885 | 0.6327569E+002 886 | 0.6255516E+002 887 | 0.6579920E+002 888 | 0.6546727E+002 889 | 0.6414502E+002 890 | 0.6567939E+002 891 | 0.7206109E+002 892 | 0.7176409E+002 893 | 0.6367119E+002 894 | 0.6727682E+002 895 | 0.6959928E+002 896 | 0.6883588E+002 897 | 0.7672264E+002 898 | 0.7485943E+002 899 | 0.7389258E+002 900 | 0.6586385E+002 901 | 0.8062658E+002 902 | 0.6504733E+002 903 | 0.6526495E+002 904 | 0.7122283E+002 905 | 0.6775144E+002 906 | 0.7762500E+002 907 | 0.6081871E+002 908 | 0.7735101E+002 909 | 0.6886770E+002 910 | 0.6992451E+002 911 | 0.7156659E+002 912 | 0.6855364E+002 913 | 0.7812163E+002 914 | 0.6430529E+002 915 | 0.6178385E+002 916 | 0.6582634E+002 917 | 0.6440843E+002 918 | 0.7237407E+002 919 | 0.6449600E+002 920 | 0.6924991E+002 921 | 0.7428668E+002 922 | 0.6947565E+002 923 | 0.6718821E+002 924 | 0.7196027E+002 925 | 0.6983506E+002 926 | 0.7370959E+002 927 | 0.6285792E+002 928 | 0.7521168E+002 929 | 0.6676231E+002 930 | 0.6459818E+002 931 | 0.7045472E+002 932 | 0.7896260E+002 933 | 0.6972545E+002 934 | 0.5710393E+002 935 | 0.6683237E+002 936 | 0.6935180E+002 937 | 0.7073819E+002 938 | 0.6303465E+002 939 | 0.6452705E+002 940 | 0.6318749E+002 941 | 0.5380957E+002 942 | 0.5625633E+002 943 | 0.5818017E+002 944 | 0.5720405E+002 945 | 0.6760944E+002 946 | 0.6444535E+002 947 | 0.6337877E+002 948 | 0.6449889E+002 949 | 0.7482414E+002 950 | 0.6931343E+002 951 | 0.7792923E+002 952 | 0.8241985E+002 953 | 0.8126313E+002 954 | 0.7733437E+002 955 | 0.6381663E+002 956 | 0.7764616E+002 957 | 0.7723642E+002 958 | 0.7951999E+002 959 | 0.6653917E+002 960 | 0.7652086E+002 961 | 0.7750557E+002 962 | 0.7337189E+002 963 | 0.7542622E+002 964 | 0.7402022E+002 965 | 0.7881708E+002 966 | 0.7855766E+002 967 | 0.7380765E+002 968 | 0.6930579E+002 969 | 0.6831883E+002 970 | 0.7459045E+002 971 | 0.7780515E+002 972 | 0.7211348E+002 973 | 0.7683782E+002 974 | 0.8041842E+002 975 | 0.7456126E+002 976 | 0.7151983E+002 977 | 0.7579431E+002 978 | 0.7653413E+002 979 | 0.7659284E+002 980 | 0.7254478E+002 981 | 0.7369218E+002 982 | 0.6982491E+002 983 | 0.7605573E+002 984 | 0.7680460E+002 985 | 0.7814494E+002 986 | 0.7622122E+002 987 | 0.7582054E+002 988 | 0.7526207E+002 989 | 0.7040150E+002 990 | 0.8104514E+002 991 | 0.7550319E+002 992 | 0.7127948E+002 993 | 0.7469386E+002 994 | 0.7810345E+002 995 | 0.8197628E+002 996 | 0.7984178E+002 997 | 0.7932126E+002 998 | 0.7606521E+002 999 | 0.6812825E+002 1000 | 0.6957416E+002 1001 | 0.6671992E+002 1002 | 0.6782897E+002 1003 | 0.6474015E+002 1004 | 0.7645741E+002 1005 | 0.7513490E+002 1006 | 0.6851335E+002 1007 | 0.6851351E+002 1008 | 0.6717238E+002 1009 | 0.6737683E+002 1010 | 0.7257708E+002 1011 | 0.7226032E+002 1012 | 0.7283671E+002 1013 | 0.6770913E+002 1014 | 0.6891771E+002 1015 | 0.6893891E+002 1016 | 0.6655680E+002 1017 | 0.6127084E+002 1018 | 0.6741756E+002 1019 | 0.6384135E+002 1020 | 0.7256199E+002 1021 | 0.6711812E+002 1022 | 0.7343620E+002 1023 | 0.6380621E+002 1024 | 0.8136131E+002 1025 | 0.6902620E+002 1026 | 0.6712592E+002 1027 | 0.7334297E+002 1028 | 0.6201796E+002 1029 | 0.7598309E+002 1030 | 0.6689079E+002 1031 | 0.7390878E+002 1032 | 0.6549319E+002 1033 | 0.6995585E+002 1034 | 0.6756053E+002 1035 | 0.6903747E+002 1036 | 0.6733022E+002 1037 | 0.6723472E+002 1038 | 0.7423695E+002 1039 | 0.7242955E+002 1040 | 0.6899304E+002 1041 | 0.7252472E+002 1042 | 0.7295731E+002 1043 | 0.6773693E+002 1044 | 0.6864415E+002 1045 | 0.6770304E+002 1046 | 0.6459358E+002 1047 | 0.6604022E+002 1048 | 0.5912493E+002 1049 | 0.6837627E+002 1050 | 0.6354639E+002 1051 | 0.5929884E+002 1052 | 0.6774391E+002 1053 | 0.6239838E+002 1054 | 0.6298744E+002 1055 | 0.6497480E+002 1056 | 0.6275670E+002 1057 | 0.6308555E+002 1058 | 0.6888779E+002 1059 | 0.7385498E+002 1060 | 0.6981246E+002 1061 | 0.6616359E+002 1062 | 0.6965280E+002 1063 | 0.6624971E+002 1064 | 0.6792670E+002 1065 | 0.6895059E+002 1066 | 0.6623198E+002 1067 | 0.6419840E+002 1068 | 0.6050291E+002 1069 | 0.5962119E+002 1070 | 0.6620344E+002 1071 | 0.6969678E+002 1072 | 0.7053943E+002 1073 | 0.7483078E+002 1074 | 0.6444195E+002 1075 | 0.6069872E+002 1076 | 0.7222511E+002 1077 | 0.6338586E+002 1078 | 0.6014050E+002 1079 | 0.6346899E+002 1080 | 0.6635732E+002 1081 | 0.6621746E+002 1082 | 0.5832911E+002 1083 | 0.6776936E+002 1084 | 0.7811531E+002 1085 | 0.7562834E+002 1086 | 0.7395870E+002 1087 | 0.6850838E+002 1088 | 0.7405923E+002 1089 | 0.6735002E+002 1090 | 0.7993096E+002 1091 | 0.8079369E+002 1092 | 0.7662715E+002 1093 | 0.6226299E+002 1094 | 0.8371040E+002 1095 | 0.7498659E+002 1096 | 0.7779014E+002 1097 | 0.6562734E+002 1098 | 0.7712593E+002 1099 | 0.6662030E+002 1100 | 0.7960681E+002 1101 | 0.7548500E+002 1102 | 0.7640911E+002 1103 | 0.7387040E+002 1104 | 0.7810862E+002 1105 | 0.7142311E+002 1106 | 0.7567179E+002 1107 | 0.6770377E+002 1108 | 0.6831285E+002 1109 | 0.7926121E+002 1110 | 0.6933186E+002 1111 | 0.7842621E+002 1112 | 0.7882573E+002 1113 | 0.8045878E+002 1114 | 0.7859391E+002 1115 | 0.7890267E+002 1116 | 0.7435079E+002 1117 | 0.7200485E+002 1118 | 0.7195760E+002 1119 | 0.8194490E+002 1120 | 0.7719788E+002 1121 | 0.7292972E+002 1122 | 0.6289001E+002 1123 | 0.7192188E+002 1124 | 0.7963495E+002 1125 | 0.7130425E+002 1126 | 0.7005283E+002 1127 | 0.7170159E+002 1128 | 0.7144806E+002 1129 | 0.7015170E+002 1130 | 0.5994841E+002 1131 | 0.7141693E+002 1132 | 0.7923035E+002 1133 | 0.7064466E+002 1134 | 0.6961062E+002 1135 | 0.7741739E+002 1136 | 0.7302055E+002 1137 | 0.6448890E+002 1138 | 0.7999320E+002 1139 | 0.7768677E+002 1140 | 0.7931179E+002 1141 | 0.7344815E+002 1142 | 0.6716323E+002 1143 | 0.6331641E+002 1144 | 0.7184267E+002 1145 | 0.6753583E+002 1146 | 0.6426027E+002 1147 | 0.6628118E+002 1148 | 0.6577156E+002 1149 | 0.7293085E+002 1150 | 0.7254957E+002 1151 | 0.6388420E+002 1152 | 0.6622873E+002 1153 | 0.7762715E+002 1154 | 0.7641145E+002 1155 | 0.7213377E+002 1156 | 0.6483092E+002 1157 | 0.7500058E+002 1158 | 0.6429942E+002 1159 | 0.7764899E+002 1160 | 0.7734499E+002 1161 | 0.7903155E+002 1162 | 0.7840439E+002 1163 | 0.8019423E+002 1164 | 0.7799894E+002 1165 | 0.7314180E+002 1166 | 0.8481237E+002 1167 | 0.7417361E+002 1168 | 0.7776976E+002 1169 | 0.8042997E+002 1170 | 0.7342706E+002 1171 | 0.7639801E+002 1172 | 0.7868707E+002 1173 | 0.8061230E+002 1174 | 0.8271364E+002 1175 | 0.8355854E+002 1176 | 0.7849108E+002 1177 | 0.7717725E+002 1178 | 0.8050940E+002 1179 | 0.7746698E+002 1180 | 0.7282343E+002 1181 | 0.8544533E+002 1182 | 0.7601386E+002 1183 | 0.8081790E+002 1184 | 0.7163933E+002 1185 | 0.8001566E+002 1186 | 0.8214906E+002 1187 | 0.7807648E+002 1188 | 0.8209483E+002 1189 | 0.6605386E+002 1190 | 0.6262463E+002 1191 | 0.5832788E+002 1192 | 0.6727784E+002 1193 | 0.6708733E+002 1194 | 0.6616368E+002 1195 | 0.6457284E+002 1196 | 0.6899901E+002 1197 | 0.5537661E+002 1198 | 0.5897963E+002 1199 | 0.6463092E+002 1200 | 0.5683666E+002 1201 | 0.5872576E+002 1202 | 0.5790247E+002 1203 | 0.6462557E+002 1204 | 0.6510455E+002 1205 | 0.7081372E+002 1206 | 0.5796379E+002 1207 | 0.5643982E+002 1208 | 0.6713555E+002 1209 | 0.6740290E+002 1210 | 0.7120035E+002 1211 | 0.6123227E+002 1212 | 0.6006133E+002 1213 | 0.7442467E+002 1214 | 0.6170496E+002 1215 | 0.5716948E+002 1216 | 0.6364714E+002 1217 | 0.5731657E+002 1218 | 0.6332798E+002 1219 | 0.6366212E+002 1220 | 0.6177826E+002 1221 | 0.6410996E+002 1222 | 0.5617719E+002 1223 | 0.6263343E+002 1224 | 0.7349937E+002 1225 | 0.6504702E+002 1226 | 0.6842476E+002 1227 | 0.5650454E+002 1228 | 0.6081972E+002 1229 | 0.6376852E+002 1230 | 0.6555799E+002 1231 | 0.6911963E+002 1232 | 0.8042215E+002 1233 | 0.6947203E+002 1234 | 0.6736524E+002 1235 | 0.6756212E+002 1236 | 0.7307603E+002 1237 | 0.6684128E+002 1238 | 0.7404553E+002 1239 | 0.6433038E+002 1240 | 0.6630553E+002 1241 | 0.7126695E+002 1242 | 0.6933304E+002 1243 | 0.7491087E+002 1244 | 0.7139859E+002 1245 | 0.7080341E+002 1246 | 0.6784983E+002 1247 | 0.7433732E+002 1248 | 0.6975294E+002 1249 | 0.7735343E+002 1250 | 0.6929935E+002 1251 | 0.6828748E+002 1252 | 0.6994832E+002 1253 | 0.7540050E+002 1254 | 0.7098809E+002 1255 | 0.7443562E+002 1256 | 0.6487137E+002 1257 | 0.7316313E+002 1258 | 0.6623350E+002 1259 | 0.6683981E+002 1260 | 0.7172674E+002 1261 | 0.7085310E+002 1262 | 0.7127122E+002 1263 | 0.6501968E+002 1264 | 0.7042195E+002 1265 | 0.7259407E+002 1266 | 0.7165261E+002 1267 | 0.7154409E+002 1268 | 0.7105115E+002 1269 | 0.7885702E+002 1270 | 0.7398888E+002 1271 | 0.7113849E+002 1272 | 0.6926677E+002 1273 | 0.6556459E+002 1274 | 0.7794579E+002 1275 | 0.6095705E+002 1276 | 0.6526395E+002 1277 | 0.6964433E+002 1278 | 0.6972843E+002 1279 | 0.6055162E+002 1280 | 0.6312375E+002 1281 | 0.6301903E+002 1282 | 0.6996683E+002 1283 | 0.6914308E+002 1284 | 0.7119957E+002 1285 | 0.6763039E+002 1286 | 0.6400821E+002 1287 | 0.7432634E+002 1288 | 0.6080158E+002 1289 | 0.6540266E+002 1290 | 0.6388216E+002 1291 | 0.6128588E+002 1292 | 0.6157818E+002 1293 | 0.6406747E+002 1294 | 0.7245524E+002 1295 | 0.7529936E+002 1296 | 0.5629376E+002 1297 | 0.6254724E+002 1298 | 0.6479544E+002 1299 | 0.6800915E+002 1300 | 0.5541727E+002 1301 | 0.6367911E+002 1302 | 0.6485271E+002 1303 | 0.6220997E+002 1304 | 0.6618591E+002 1305 | 0.8105770E+002 1306 | 0.7107345E+002 1307 | 0.7220222E+002 1308 | 0.8143477E+002 1309 | 0.7837840E+002 1310 | 0.7449902E+002 1311 | 0.7317833E+002 1312 | 0.6856489E+002 1313 | 0.6723991E+002 1314 | 0.7927765E+002 1315 | 0.7360437E+002 1316 | 0.7345439E+002 1317 | 0.7185808E+002 1318 | 0.7494640E+002 1319 | 0.7253553E+002 1320 | 0.6838848E+002 1321 | 0.6299325E+002 1322 | 0.5539222E+002 1323 | 0.5500458E+002 1324 | 0.5829876E+002 1325 | 0.5851236E+002 1326 | 0.5772756E+002 1327 | 0.5414367E+002 1328 | 0.5656844E+002 1329 | 0.5833277E+002 1330 | 0.5710800E+002 1331 | 0.6181492E+002 1332 | 0.5735699E+002 1333 | 0.6067762E+002 1334 | 0.5819822E+002 1335 | 0.5862082E+002 1336 | 0.6341719E+002 1337 | 0.6770404E+002 1338 | 0.6427103E+002 1339 | 0.6739829E+002 1340 | 0.6791804E+002 1341 | 0.6801121E+002 1342 | 0.6644962E+002 1343 | 0.6634124E+002 1344 | 0.6890327E+002 1345 | 0.6692772E+002 1346 | 0.6546963E+002 1347 | 0.6699508E+002 1348 | 0.6606735E+002 1349 | 0.6332900E+002 1350 | 0.6716505E+002 1351 | 0.5942330E+002 1352 | 0.6343510E+002 1353 | 0.5788056E+002 1354 | 0.6022093E+002 1355 | 0.6231167E+002 1356 | 0.5696096E+002 1357 | 0.6422285E+002 1358 | 0.6356239E+002 1359 | 0.5500213E+002 1360 | 0.6477217E+002 1361 | 0.6660721E+002 1362 | 0.6219668E+002 1363 | 0.5938832E+002 1364 | 0.6856111E+002 1365 | 0.6540612E+002 1366 | 0.6029200E+002 1367 | 0.6277955E+002 1368 | 0.6061390E+002 1369 | 0.6222657E+002 1370 | 0.7246648E+002 1371 | 0.5974725E+002 1372 | 0.5431554E+002 1373 | 0.6756003E+002 1374 | 0.6079976E+002 1375 | 0.6020619E+002 1376 | 0.6007000E+002 1377 | 0.5542664E+002 1378 | 0.6019405E+002 1379 | 0.6865690E+002 1380 | 0.6004612E+002 1381 | 0.5713811E+002 1382 | 0.5135574E+002 1383 | 0.6800503E+002 1384 | 0.6044281E+002 1385 | 0.6711369E+002 1386 | 0.6482035E+002 1387 | 0.5718909E+002 1388 | 0.6035337E+002 1389 | 0.6591479E+002 1390 | 0.6575306E+002 1391 | 0.6016394E+002 1392 | 0.5662819E+002 1393 | 0.6068970E+002 1394 | 0.6933930E+002 1395 | 0.5359190E+002 1396 | 0.5731982E+002 1397 | 0.6304969E+002 1398 | 0.6442415E+002 1399 | 0.6375464E+002 1400 | 0.5651896E+002 1401 | 0.6225508E+002 1402 | 0.6518015E+002 1403 | 0.5974750E+002 1404 | 0.5682679E+002 1405 | 0.6884350E+002 1406 | 0.5333159E+002 1407 | 0.6758234E+002 1408 | 0.6217347E+002 1409 | 0.6050294E+002 1410 | 0.6227081E+002 1411 | 0.6684870E+002 1412 | 0.6078546E+002 1413 | 0.5477504E+002 1414 | 0.6522386E+002 1415 | 0.6845903E+002 1416 | 0.5204503E+002 1417 | 0.5553537E+002 1418 | 0.6740701E+002 1419 | 0.5223816E+002 1420 | 0.5845295E+002 1421 | 0.5678915E+002 1422 | 0.5110099E+002 1423 | 0.5387698E+002 1424 | 0.5304710E+002 1425 | 0.5208096E+002 1426 | 0.5962597E+002 1427 | 0.5310856E+002 1428 | 0.5544949E+002 1429 | 0.5880933E+002 1430 | 0.5900306E+002 1431 | 0.6002207E+002 1432 | 0.5436532E+002 1433 | 0.5762614E+002 1434 | 0.5954207E+002 1435 | 0.4864210E+002 1436 | 0.5298655E+002 1437 | 0.4987108E+002 1438 | 0.5209739E+002 1439 | 0.5229790E+002 1440 | 0.5552128E+002 1441 | 0.5100252E+002 1442 | 0.5921096E+002 1443 | 0.5554124E+002 1444 | 0.5118750E+002 1445 | 0.6247105E+002 1446 | 0.5764372E+002 1447 | 0.5149703E+002 1448 | 0.5647828E+002 1449 | 0.5692730E+002 1450 | 0.5361070E+002 1451 | 0.5454458E+002 1452 | 0.5516338E+002 1453 | 0.5623916E+002 1454 | 0.5061962E+002 1455 | 0.5695001E+002 1456 | 0.5854119E+002 1457 | 0.6690387E+002 1458 | 0.6466411E+002 1459 | 0.5825246E+002 1460 | 0.7337596E+002 1461 | 0.5952427E+002 1462 | 0.6811400E+002 1463 | 0.6760158E+002 1464 | 0.6283554E+002 1465 | 0.6521733E+002 1466 | 0.6367755E+002 1467 | 0.6459884E+002 1468 | 0.6262340E+002 1469 | 0.7465019E+002 1470 | 0.6373003E+002 1471 | 0.5881487E+002 1472 | 0.7260255E+002 1473 | 0.8209121E+002 1474 | 0.6793647E+002 1475 | 0.6740908E+002 1476 | 0.6964698E+002 1477 | 0.6464569E+002 1478 | 0.7449317E+002 1479 | 0.7247117E+002 1480 | 0.6517121E+002 1481 | 0.6195333E+002 1482 | 0.7490139E+002 1483 | 0.7654536E+002 1484 | 0.6522118E+002 1485 | 0.6870660E+002 1486 | 0.6739197E+002 1487 | 0.7467336E+002 1488 | 0.6917655E+002 1489 | 0.7025010E+002 1490 | 0.6256731E+002 1491 | 0.7481292E+002 1492 | 0.6843509E+002 1493 | 0.6856567E+002 1494 | 0.6601460E+002 1495 | 0.7466940E+002 1496 | 0.6101923E+002 1497 | 0.7641371E+002 1498 | 0.7924387E+002 1499 | 0.7267799E+002 1500 | 0.6941657E+002 1501 | 0.7550247E+002 1502 | 0.7708099E+002 1503 | 0.5830080E+002 1504 | 0.6874093E+002 1505 | 0.7368068E+002 1506 | 0.6989643E+002 1507 | 0.8042086E+002 1508 | 0.7018005E+002 1509 | 0.7296371E+002 1510 | 0.7127169E+002 1511 | 0.7698508E+002 1512 | 0.7345803E+002 1513 | 0.6976413E+002 1514 | 0.6004244E+002 1515 | 0.6692955E+002 1516 | 0.6741864E+002 1517 | 0.6899802E+002 1518 | 0.7923336E+002 1519 | 0.6278488E+002 1520 | 0.6211472E+002 1521 | 0.7476537E+002 1522 | 0.6753924E+002 1523 | 0.8238079E+002 1524 | 0.6851413E+002 1525 | 0.7063817E+002 1526 | 0.7216787E+002 1527 | 0.7912219E+002 1528 | 0.6798502E+002 1529 | 0.6896286E+002 1530 | 0.6478099E+002 1531 | 0.6717405E+002 1532 | 0.6588165E+002 1533 | 0.7522716E+002 1534 | 0.7188652E+002 1535 | 0.7942698E+002 1536 | 0.6694733E+002 1537 | 0.6402158E+002 1538 | 0.7736707E+002 1539 | 0.7310214E+002 1540 | 0.7201379E+002 1541 | 0.6615115E+002 1542 | 0.7576752E+002 1543 | 0.7061041E+002 1544 | 0.6929284E+002 1545 | 0.6727770E+002 1546 | 0.5529081E+002 1547 | 0.7787846E+002 1548 | 0.7968232E+002 1549 | 0.6422071E+002 1550 | 0.6656998E+002 1551 | 0.6798011E+002 1552 | 0.6981379E+002 1553 | 0.6709212E+002 1554 | 0.6509462E+002 1555 | 0.6909492E+002 1556 | 0.8373747E+002 1557 | 0.6206422E+002 1558 | 0.8527161E+002 1559 | 0.6346136E+002 1560 | 0.6599594E+002 1561 | 0.7223482E+002 1562 | 0.7232618E+002 1563 | 0.6706579E+002 1564 | 0.7076355E+002 1565 | 0.6976110E+002 1566 | 0.8208608E+002 1567 | 0.6941736E+002 1568 | 0.7730490E+002 1569 | 0.6801323E+002 1570 | 0.6357519E+002 1571 | 0.7050044E+002 1572 | 0.6992266E+002 1573 | 0.6818120E+002 1574 | 0.6863777E+002 1575 | 0.6922282E+002 1576 | 0.7366477E+002 1577 | 0.7267232E+002 1578 | 0.6815807E+002 1579 | 0.7821661E+002 1580 | 0.6810660E+002 1581 | 0.7563262E+002 1582 | 0.7107826E+002 1583 | 0.7206427E+002 1584 | 0.6783073E+002 1585 | 0.7199952E+002 1586 | 0.6424530E+002 1587 | 0.7241526E+002 1588 | 0.6880565E+002 1589 | 0.7069992E+002 1590 | 0.7236021E+002 1591 | 0.6366862E+002 1592 | 0.6864546E+002 1593 | 0.7194339E+002 1594 | 0.7149620E+002 1595 | 0.7033585E+002 1596 | 0.6828469E+002 1597 | 0.7295620E+002 1598 | 0.7188703E+002 1599 | 0.7108915E+002 1600 | 0.7163632E+002 1601 | 0.6923394E+002 1602 | 0.7469574E+002 1603 | 0.6693985E+002 1604 | 0.7195824E+002 1605 | 0.6841161E+002 1606 | 0.6441470E+002 1607 | 0.7312997E+002 1608 | 0.5985959E+002 1609 | 0.6466750E+002 1610 | 0.7167010E+002 1611 | 0.6931288E+002 1612 | 0.6371164E+002 1613 | 0.6047619E+002 1614 | 0.7136116E+002 1615 | 0.6650379E+002 1616 | 0.7189523E+002 1617 | 0.5948643E+002 1618 | 0.7275655E+002 1619 | 0.6725961E+002 1620 | 0.7381364E+002 1621 | 0.6618444E+002 1622 | 0.6331356E+002 1623 | 0.6789280E+002 1624 | 0.6606693E+002 1625 | 0.6774297E+002 1626 | 0.6594294E+002 1627 | 0.7135830E+002 1628 | 0.5901955E+002 1629 | 0.6667536E+002 1630 | 0.6652800E+002 1631 | 0.6542516E+002 1632 | 0.7007740E+002 1633 | 0.6294267E+002 1634 | 0.6531632E+002 1635 | 0.6193102E+002 1636 | 0.6149057E+002 1637 | 0.7097897E+002 1638 | 0.7054499E+002 1639 | 0.6689542E+002 1640 | 0.6709851E+002 1641 | 0.6680093E+002 1642 | 0.6341917E+002 1643 | 0.6789343E+002 1644 | 0.6506276E+002 1645 | 0.6579632E+002 1646 | 0.6911090E+002 1647 | 0.6421516E+002 1648 | 0.5998188E+002 1649 | 0.5658520E+002 1650 | 0.6482110E+002 1651 | 0.6518332E+002 1652 | 0.6811733E+002 1653 | 0.6817055E+002 1654 | 0.6157478E+002 1655 | 0.6776131E+002 1656 | 0.6137652E+002 1657 | 0.6527263E+002 1658 | 0.6547515E+002 1659 | 0.6765241E+002 1660 | 0.6017628E+002 1661 | 0.6298107E+002 1662 | 0.6913245E+002 1663 | 0.5983971E+002 1664 | 0.6617826E+002 1665 | 0.6549646E+002 1666 | 0.5802141E+002 1667 | 0.6250171E+002 1668 | 0.7120776E+002 1669 | 0.5511835E+002 1670 | 0.7227697E+002 1671 | 0.6296323E+002 1672 | 0.6757477E+002 1673 | 0.6124250E+002 1674 | 0.6243229E+002 1675 | 0.6263131E+002 1676 | 0.6683892E+002 1677 | 0.6254177E+002 1678 | 0.6787936E+002 1679 | 0.6096743E+002 1680 | 0.6772615E+002 1681 | 0.6367488E+002 1682 | 0.5956827E+002 1683 | 0.6700845E+002 1684 | 0.6527082E+002 1685 | 0.6358360E+002 1686 | 0.6292102E+002 1687 | 0.5784797E+002 1688 | 0.6764801E+002 1689 | 0.7141613E+002 1690 | 0.7224330E+002 1691 | 0.6375251E+002 1692 | 0.7080485E+002 1693 | 0.6490997E+002 1694 | 0.6658685E+002 1695 | 0.6357831E+002 1696 | 0.7085574E+002 1697 | 0.7229521E+002 1698 | 0.6359283E+002 1699 | 0.7525056E+002 1700 | 0.6168390E+002 1701 | 0.6585808E+002 1702 | 0.6304619E+002 1703 | 0.6621177E+002 1704 | 0.6740140E+002 1705 | 0.6082682E+002 1706 | 0.6934926E+002 1707 | 0.6540712E+002 1708 | 0.6270383E+002 1709 | 0.6893192E+002 1710 | 0.6991146E+002 1711 | 0.5905616E+002 1712 | 0.7016829E+002 1713 | 0.7133597E+002 1714 | 0.6893903E+002 1715 | 0.6708903E+002 1716 | 0.6842507E+002 1717 | 0.6481972E+002 1718 | 0.6447909E+002 1719 | 0.6953128E+002 1720 | 0.6762308E+002 1721 | 0.5971429E+002 1722 | 0.6592476E+002 1723 | 0.7253104E+002 1724 | 0.7002885E+002 1725 | 0.6303798E+002 1726 | 0.6792271E+002 1727 | 0.6631545E+002 1728 | 0.6801232E+002 1729 | 0.6739959E+002 1730 | 0.6061888E+002 1731 | 0.7310145E+002 1732 | 0.6296046E+002 1733 | 0.6635109E+002 1734 | 0.7105939E+002 1735 | 0.6758664E+002 1736 | 0.6453362E+002 1737 | 0.6705301E+002 1738 | 0.6734965E+002 1739 | 0.7455799E+002 1740 | 0.6852336E+002 1741 | 0.7320939E+002 1742 | 0.7290830E+002 1743 | 0.7325730E+002 1744 | 0.7879812E+002 1745 | 0.8275136E+002 1746 | 0.8053386E+002 1747 | 0.7317995E+002 1748 | 0.6604122E+002 1749 | 0.7324935E+002 1750 | 0.7635324E+002 1751 | 0.8085004E+002 1752 | 0.7766290E+002 1753 | 0.7006362E+002 1754 | 0.7196491E+002 1755 | 0.6948727E+002 1756 | 0.6775172E+002 1757 | 0.8023970E+002 1758 | 0.8081202E+002 1759 | 0.7278282E+002 1760 | 0.7966060E+002 1761 | 0.7380917E+002 1762 | 0.7658877E+002 1763 | 0.7747287E+002 1764 | 0.7911104E+002 1765 | 0.7863616E+002 1766 | 0.7248886E+002 1767 | 0.7234253E+002 1768 | 0.7624902E+002 1769 | 0.6854222E+002 1770 | 0.7571103E+002 1771 | 0.6874633E+002 1772 | 0.7636904E+002 1773 | 0.6809141E+002 1774 | 0.8064816E+002 1775 | 0.7840642E+002 1776 | 0.6965980E+002 1777 | 0.6923217E+002 1778 | 0.7161518E+002 1779 | 0.7420019E+002 1780 | 0.7138725E+002 1781 | 0.6613464E+002 1782 | 0.7096813E+002 1783 | 0.7275316E+002 1784 | 0.7016750E+002 1785 | 0.7627747E+002 1786 | 0.8022983E+002 1787 | 0.6766065E+002 1788 | 0.7122253E+002 1789 | 0.6462434E+002 1790 | 0.6828132E+002 1791 | 0.6875546E+002 1792 | 0.6920400E+002 1793 | 0.7196347E+002 1794 | 0.7099795E+002 1795 | 0.7069600E+002 1796 | 0.7501195E+002 1797 | 0.6264354E+002 1798 | 0.7466484E+002 1799 | 0.7685882E+002 1800 | 0.6746458E+002 1801 | 0.6603801E+002 1802 | 0.7414975E+002 1803 | 0.6504244E+002 1804 | 0.6813321E+002 1805 | 0.6577491E+002 1806 | 0.7537947E+002 1807 | 0.7986850E+002 1808 | 0.7451317E+002 1809 | 0.7266107E+002 1810 | 0.7713847E+002 1811 | 0.6279267E+002 1812 | 0.7160608E+002 1813 | 0.7562407E+002 1814 | 0.6853587E+002 1815 | 0.7320848E+002 1816 | 0.7319512E+002 1817 | 0.6867287E+002 1818 | 0.6583686E+002 1819 | 0.6506386E+002 1820 | 0.7411571E+002 1821 | 0.6882875E+002 1822 | 0.6730481E+002 1823 | 0.6964440E+002 1824 | 0.6592205E+002 1825 | 0.7273306E+002 1826 | 0.6068609E+002 1827 | 0.7172792E+002 1828 | 0.7889808E+002 1829 | 0.7281678E+002 1830 | 0.7092256E+002 1831 | 0.7253313E+002 1832 | 0.6857005E+002 1833 | 0.7521102E+002 1834 | 0.8020300E+002 1835 | 0.7849752E+002 1836 | 0.7427045E+002 1837 | 0.8088739E+002 1838 | 0.7069806E+002 1839 | 0.7602563E+002 1840 | 0.7163027E+002 1841 | 0.6901923E+002 1842 | 0.7235837E+002 1843 | 0.7385478E+002 1844 | 0.7198487E+002 1845 | 0.7077126E+002 1846 | 0.7586244E+002 1847 | 0.7509658E+002 1848 | 0.7918854E+002 1849 | 0.6791477E+002 1850 | 0.7124174E+002 1851 | 0.7716125E+002 1852 | 0.7192953E+002 1853 | 0.6928681E+002 1854 | 0.7317850E+002 1855 | 0.6806548E+002 1856 | 0.7526391E+002 1857 | 0.7106987E+002 1858 | 0.7031298E+002 1859 | 0.7553432E+002 1860 | 0.7010122E+002 1861 | 0.6829336E+002 1862 | 0.7518582E+002 1863 | 0.6821288E+002 1864 | 0.6673820E+002 1865 | 0.6890116E+002 1866 | 0.7227430E+002 1867 | 0.6914995E+002 1868 | 0.6908977E+002 1869 | 0.6838253E+002 1870 | 0.7347698E+002 1871 | 0.7067958E+002 1872 | 0.7506424E+002 1873 | 0.7133818E+002 1874 | 0.6972184E+002 1875 | 0.7260034E+002 1876 | 0.6763335E+002 1877 | 0.6738516E+002 1878 | 0.7148623E+002 1879 | 0.7067280E+002 1880 | 0.7141367E+002 1881 | 0.7377254E+002 1882 | 0.7358549E+002 1883 | 0.6735126E+002 1884 | 0.7376253E+002 1885 | 0.6605733E+002 1886 | 0.6578061E+002 1887 | 0.6710865E+002 1888 | 0.7564085E+002 1889 | 0.6911885E+002 1890 | 0.7279792E+002 1891 | 0.7039179E+002 1892 | 0.7541247E+002 1893 | 0.6420326E+002 1894 | 0.6910387E+002 1895 | 0.7351261E+002 1896 | 0.6587781E+002 1897 | 0.6919970E+002 1898 | 0.7763984E+002 1899 | 0.7040011E+002 1900 | 0.7481631E+002 1901 | 0.7321833E+002 1902 | 0.7311918E+002 1903 | 0.7166950E+002 1904 | 0.7580040E+002 1905 | 0.7156074E+002 1906 | 0.7099363E+002 1907 | 0.7047151E+002 1908 | 0.7066794E+002 1909 | 0.6094673E+002 1910 | 0.6240447E+002 1911 | 0.6122439E+002 1912 | 0.6247014E+002 1913 | 0.6055769E+002 1914 | 0.6419535E+002 1915 | 0.6163673E+002 1916 | 0.6401601E+002 1917 | 0.6481357E+002 1918 | 0.6166571E+002 1919 | 0.6370390E+002 1920 | 0.6761574E+002 1921 | 0.6496952E+002 1922 | 0.6178153E+002 1923 | 0.6374518E+002 1924 | 0.6229128E+002 1925 | 0.6490880E+002 1926 | 0.6093122E+002 1927 | 0.6669544E+002 1928 | 0.7765401E+002 1929 | 0.6528661E+002 1930 | 0.7126474E+002 1931 | 0.7141991E+002 1932 | 0.7236537E+002 1933 | 0.6461761E+002 1934 | 0.7667906E+002 1935 | 0.6423364E+002 1936 | 0.7113920E+002 1937 | 0.6785855E+002 1938 | 0.6995184E+002 1939 | 0.7673699E+002 1940 | 0.6716775E+002 1941 | 0.7582693E+002 1942 | 0.6387300E+002 1943 | 0.6524627E+002 1944 | 0.7210279E+002 1945 | 0.6193722E+002 1946 | 0.6844307E+002 1947 | 0.7429235E+002 1948 | 0.7192172E+002 1949 | 0.7207453E+002 1950 | 0.6086047E+002 1951 | 0.6688226E+002 1952 | 0.7600233E+002 1953 | 0.6825348E+002 1954 | 0.7401792E+002 1955 | 0.7059795E+002 1956 | 0.6866599E+002 1957 | 0.7790500E+002 1958 | 0.6422109E+002 1959 | 0.6790876E+002 1960 | 0.7180434E+002 1961 | 0.7137272E+002 1962 | 0.6767959E+002 1963 | 0.7219612E+002 1964 | 0.7075161E+002 1965 | 0.7277171E+002 1966 | 0.7012118E+002 1967 | 0.7093265E+002 1968 | 0.7721774E+002 1969 | 0.6848984E+002 1970 | 0.7234059E+002 1971 | 0.7400878E+002 1972 | 0.7027427E+002 1973 | 0.7203367E+002 1974 | 0.6838635E+002 1975 | 0.7102740E+002 1976 | 0.7788138E+002 1977 | 0.6986142E+002 1978 | 0.7163478E+002 1979 | 0.6883881E+002 1980 | 0.7883518E+002 1981 | 0.7260066E+002 1982 | 0.7402576E+002 1983 | 0.6447928E+002 1984 | 0.7179175E+002 1985 | 0.6525228E+002 1986 | 0.7416612E+002 1987 | 0.7597621E+002 1988 | 0.7077509E+002 1989 | 0.6839043E+002 1990 | 0.7043648E+002 1991 | 0.6654561E+002 1992 | 0.6309169E+002 1993 | 0.7023510E+002 1994 | 0.6615706E+002 1995 | 0.7196503E+002 1996 | 0.7132652E+002 1997 | 0.7337663E+002 1998 | 0.7131085E+002 1999 | 0.6473818E+002 2000 | 0.7707866E+002 2001 | 0.6796835E+002 2002 | 0.6436741E+002 2003 | 0.7744098E+002 2004 | 0.7580908E+002 2005 | 0.6861082E+002 2006 | 0.7842980E+002 2007 | 0.5975014E+002 2008 | 0.7276222E+002 2009 | 0.5917080E+002 2010 | 0.6808895E+002 2011 | 0.6443316E+002 2012 | 0.7072938E+002 2013 | 0.7083400E+002 2014 | 0.6873838E+002 2015 | 0.7805962E+002 2016 | 0.6852619E+002 2017 | 0.7782572E+002 2018 | 0.7373926E+002 2019 | 0.6498444E+002 2020 | 0.6634148E+002 2021 | 0.7734460E+002 2022 | 0.8071226E+002 2023 | 0.7373745E+002 2024 | 0.7378363E+002 2025 | 0.6785859E+002 2026 | 0.7403683E+002 2027 | 0.6630469E+002 2028 | 0.7496138E+002 2029 | 0.6479578E+002 2030 | 0.7182901E+002 2031 | 0.6969437E+002 2032 | 0.6175287E+002 2033 | 0.6976280E+002 2034 | 0.6394312E+002 2035 | 0.6964294E+002 2036 | 0.6899846E+002 2037 | 0.6437938E+002 2038 | 0.6828199E+002 2039 | 0.5863785E+002 2040 | 0.6614671E+002 2041 | 0.6201162E+002 2042 | 0.6424206E+002 2043 | 0.6167404E+002 2044 | 0.6116836E+002 2045 | 0.6658668E+002 2046 | 0.5710129E+002 2047 | 0.6842280E+002 2048 | 0.6014067E+002 2049 | 0.5850013E+002 2050 | 0.7314007E+002 2051 | 0.6411474E+002 2052 | 0.6252052E+002 2053 | 0.5691655E+002 2054 | 0.6611894E+002 2055 | 0.6826134E+002 2056 | 0.6998114E+002 2057 | 0.6393105E+002 2058 | 0.6331153E+002 2059 | 0.7409499E+002 2060 | 0.6297244E+002 2061 | 0.6854588E+002 2062 | 0.6520125E+002 2063 | 0.6207323E+002 2064 | 0.5722174E+002 2065 | 0.6998662E+002 2066 | 0.7270521E+002 2067 | 0.6817223E+002 2068 | 0.7229948E+002 2069 | 0.6748230E+002 2070 | 0.6694493E+002 2071 | 0.7605931E+002 2072 | 0.6395547E+002 2073 | 0.5350762E+002 2074 | 0.7069514E+002 2075 | 0.7470922E+002 2076 | 0.6381055E+002 2077 | 0.5775831E+002 2078 | 0.7832681E+002 2079 | 0.6985958E+002 2080 | 0.6874514E+002 2081 | 0.6905218E+002 2082 | 0.6568333E+002 2083 | 0.6948403E+002 2084 | 0.6950110E+002 2085 | 0.6695312E+002 2086 | 0.7254930E+002 2087 | 0.7194058E+002 2088 | 0.6306637E+002 2089 | 0.6329445E+002 2090 | 0.6912812E+002 2091 | 0.7863782E+002 2092 | 0.6668807E+002 2093 | 0.7397688E+002 2094 | 0.7438883E+002 2095 | 0.6894509E+002 2096 | 0.6997534E+002 2097 | 0.6467295E+002 2098 | 0.7050889E+002 2099 | 0.7310413E+002 2100 | 0.7207789E+002 2101 | 0.6138606E+002 2102 | 0.7125387E+002 2103 | 0.7889284E+002 2104 | 0.7684438E+002 2105 | 0.6581703E+002 2106 | 0.6815358E+002 2107 | 0.6553498E+002 2108 | 0.7270313E+002 2109 | 0.7908631E+002 2110 | 0.7407480E+002 2111 | 0.7012932E+002 2112 | 0.7022910E+002 2113 | 0.7434298E+002 2114 | 0.7331643E+002 2115 | 0.6761828E+002 2116 | 0.7457440E+002 2117 | 0.7183516E+002 2118 | 0.7368752E+002 2119 | 0.7900326E+002 2120 | 0.7020167E+002 2121 | 0.7817255E+002 2122 | 0.7364392E+002 2123 | 0.7171590E+002 2124 | 0.7841632E+002 2125 | 0.6926265E+002 2126 | 0.7625738E+002 2127 | 0.7250741E+002 2128 | 0.7499492E+002 2129 | 0.6994607E+002 2130 | 0.7376273E+002 2131 | 0.6526333E+002 2132 | 0.7470696E+002 2133 | 0.6556469E+002 2134 | 0.7260142E+002 2135 | 0.7555285E+002 2136 | 0.6688624E+002 2137 | 0.7950568E+002 2138 | 0.7192630E+002 2139 | 0.6694475E+002 2140 | 0.7812490E+002 2141 | 0.6532633E+002 2142 | 0.6459846E+002 2143 | 0.6971379E+002 2144 | 0.7167676E+002 2145 | 0.7234927E+002 2146 | 0.7566308E+002 2147 | 0.7038076E+002 2148 | 0.7309622E+002 2149 | 0.7008641E+002 2150 | 0.6470191E+002 2151 | 0.5947996E+002 2152 | 0.5723693E+002 2153 | 0.5536331E+002 2154 | 0.5870486E+002 2155 | 0.5738519E+002 2156 | 0.5744238E+002 2157 | 0.6010967E+002 2158 | 0.5953681E+002 2159 | 0.5807389E+002 2160 | 0.5687705E+002 2161 | 0.6588540E+002 2162 | 0.6516185E+002 2163 | 0.6069603E+002 2164 | 0.6283466E+002 2165 | 0.5611813E+002 2166 | 0.5642002E+002 2167 | 0.5734934E+002 2168 | 0.6143499E+002 2169 | 0.5834170E+002 2170 | 0.5922960E+002 2171 | 0.6200748E+002 2172 | 0.6373948E+002 2173 | 0.6012064E+002 2174 | 0.6599622E+002 2175 | 0.6438629E+002 2176 | 0.5140130E+002 2177 | 0.5750414E+002 2178 | 0.5832623E+002 2179 | 0.5566232E+002 2180 | 0.6092379E+002 2181 | 0.6611204E+002 2182 | 0.7751937E+002 2183 | 0.7991990E+002 2184 | 0.6828694E+002 2185 | 0.7280919E+002 2186 | 0.7426411E+002 2187 | 0.7197914E+002 2188 | 0.7163281E+002 2189 | 0.6874302E+002 2190 | 0.7606996E+002 2191 | 0.8011371E+002 2192 | 0.6972801E+002 2193 | 0.7572848E+002 2194 | 0.7643846E+002 2195 | 0.6903102E+002 2196 | 0.7369314E+002 2197 | 0.7173595E+002 2198 | 0.7170293E+002 2199 | 0.7111737E+002 2200 | 0.7202611E+002 2201 | 0.7288388E+002 2202 | 0.7055689E+002 2203 | 0.7484637E+002 2204 | 0.7043543E+002 2205 | 0.7392437E+002 2206 | 0.6764113E+002 2207 | 0.7379303E+002 2208 | 0.7772161E+002 2209 | 0.7776787E+002 2210 | 0.7918916E+002 2211 | 0.7559566E+002 2212 | 0.7416611E+002 2213 | 0.7418286E+002 2214 | 0.7779927E+002 2215 | 0.7231938E+002 2216 | 0.7169748E+002 2217 | 0.7268932E+002 2218 | 0.6936731E+002 2219 | 0.7996110E+002 2220 | 0.7404806E+002 2221 | 0.7213360E+002 2222 | 0.7782696E+002 2223 | 0.6632205E+002 2224 | 0.6575969E+002 2225 | 0.6210027E+002 2226 | 0.6545545E+002 2227 | 0.5763026E+002 2228 | 0.7052401E+002 2229 | 0.7027960E+002 2230 | 0.6195123E+002 2231 | 0.6544965E+002 2232 | 0.5307610E+002 2233 | 0.6526640E+002 2234 | 0.7155158E+002 2235 | 0.6568922E+002 2236 | 0.6070761E+002 2237 | 0.6431075E+002 2238 | 0.7262181E+002 2239 | 0.6312328E+002 2240 | 0.5936337E+002 2241 | 0.7399603E+002 2242 | 0.6725692E+002 2243 | 0.6524199E+002 2244 | 0.7115004E+002 2245 | 0.7333074E+002 2246 | 0.7186159E+002 2247 | 0.6643191E+002 2248 | 0.7234397E+002 2249 | 0.6854339E+002 2250 | 0.6725598E+002 2251 | 0.7555071E+002 2252 | 0.6956831E+002 2253 | 0.6877586E+002 2254 | 0.7307279E+002 2255 | 0.7231634E+002 2256 | 0.6634427E+002 2257 | 0.6669750E+002 2258 | 0.6105870E+002 2259 | 0.6115333E+002 2260 | 0.7207865E+002 2261 | 0.6118699E+002 2262 | 0.5816433E+002 2263 | 0.6918343E+002 2264 | 0.7382249E+002 2265 | 0.6025565E+002 2266 | 0.5900466E+002 2267 | 0.7192058E+002 2268 | 0.6477123E+002 2269 | 0.6165111E+002 2270 | 0.6571634E+002 2271 | 0.5914740E+002 2272 | 0.5678597E+002 2273 | 0.6287245E+002 2274 | 0.6443641E+002 2275 | 0.7383749E+002 2276 | 0.6948172E+002 2277 | 0.6416937E+002 2278 | 0.7126338E+002 2279 | 0.5450190E+002 2280 | 0.7689882E+002 2281 | 0.7575866E+002 2282 | 0.7259956E+002 2283 | 0.7205901E+002 2284 | 0.7992508E+002 2285 | 0.7472456E+002 2286 | 0.7478231E+002 2287 | 0.6861587E+002 2288 | 0.7909595E+002 2289 | 0.7338599E+002 2290 | 0.7793417E+002 2291 | 0.8464205E+002 2292 | 0.8108017E+002 2293 | 0.8311532E+002 2294 | 0.7618658E+002 2295 | 0.8205046E+002 2296 | 0.7558084E+002 2297 | 0.7231515E+002 2298 | 0.7537784E+002 2299 | 0.7385298E+002 2300 | 0.7649108E+002 2301 | 0.6539102E+002 2302 | 0.8200909E+002 2303 | 0.6657368E+002 2304 | 0.6741357E+002 2305 | 0.6783759E+002 2306 | 0.6890162E+002 2307 | 0.7646569E+002 2308 | 0.7030232E+002 2309 | 0.7392781E+002 2310 | 0.7676087E+002 2311 | 0.7608509E+002 2312 | 0.6109982E+002 2313 | 0.6751897E+002 2314 | 0.7465330E+002 2315 | 0.7274658E+002 2316 | 0.7317097E+002 2317 | 0.6919606E+002 2318 | 0.6837920E+002 2319 | 0.6893546E+002 2320 | 0.7396843E+002 2321 | 0.7719559E+002 2322 | 0.6978214E+002 2323 | 0.7158765E+002 2324 | 0.7116315E+002 2325 | 0.6219499E+002 2326 | 0.7987641E+002 2327 | -------------------------------------------------------------------------------- /examples/example1/simout.log: -------------------------------------------------------------------------------- 1 | Program BayesR 2 | Run started at 2021-04-01 11:58:42 3 | Prefix for input files : simdata 4 | Prefix for output files : simout 5 | Phenotype column = 1 6 | No. of loci = 10031 7 | No. of individuals = 2326 8 | No. of training individuals = 2326 9 | Prior Vara = 0.010000 -2.000000 10 | No. of mixtures = 4 11 | Variance of dist = 0.00000 0.00010 0.00100 0.01000 12 | Dirichlet prior = 1.00000 1.00000 1.00000 1.00000 13 | Prior Vare = 0.010000 -2.000000 14 | No. of cycles = 10000 15 | Burnin = 5000 16 | Thinning rate = 10 17 | Seed = 333 18 | SNP output = F 19 | New seeds generated from seed1 333 20 | Plink magic number 1 - ok 21 | Plink magic number 2 - ok 22 | SNP-major mode for PLINK .bed file 23 | Run ended at 2021-04-01 12:00:35 24 | -------------------------------------------------------------------------------- /examples/example1/simout.model: -------------------------------------------------------------------------------- 1 | Mean 0.6864922E+02 2 | Nsnp 0.8169360E+03 3 | Va 0.4717503E+02 4 | Ve 0.5337057E+02 5 | Nk1 0.9214064E+04 6 | Nk2 0.6462140E+03 7 | Nk3 0.9799800E+02 8 | Nk4 0.7272400E+02 9 | Pk1 0.9182882E+00 10 | Pk2 0.6450293E-01 11 | Pk3 0.9897675E-02 12 | Pk4 0.7311215E-02 13 | Vk1 0.0000000E+00 14 | Vk2 0.3036832E+01 15 | Vk3 0.4496217E+01 16 | Vk4 0.3918270E+02 17 | -------------------------------------------------------------------------------- /examples/example2/seg: -------------------------------------------------------------------------------- 1 | 2 0 0.025 1.0 1.0 2 | 4 0 0.0001 0.001 0.01 1.0 1.0 1.0 1.0 3 | -------------------------------------------------------------------------------- /examples/example2/simdata2.bed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/examples/example2/simdata2.bed -------------------------------------------------------------------------------- /examples/example2/simout2.log: -------------------------------------------------------------------------------- 1 | Program BayesR 2 | Run started at 2021-04-01 12:08:41 3 | Prefix for input files : simdata2 4 | Prefix for output files : simout2 5 | Phenotype column = 2 6 | No. of loci = 10031 7 | No. of individuals = 2326 8 | No. of training individuals = 2326 9 | Prior Vara = 0.010000 -2.000000 10 | Segment model file : seg 11 | Prior segements (No. of mixtures, Variance of dist, Dirichlet prior) 12 | 1 2 0.00000 0.02500 1.00000 1.00000 13 | 2 4 0.00000 0.00010 0.00100 0.01000 1.00000 1.00000 1.00000 1.00000 14 | Prior Vare = 0.010000 -2.000000 15 | No. of cycles = 10000 16 | Burnin = 5000 17 | Thinning rate = 10 18 | Seed = 333 19 | SNP output = F 20 | New seeds generated from seed1 333 21 | Plink magic number 1 - ok 22 | Plink magic number 2 - ok 23 | SNP-major mode for PLINK .bed file 24 | Run ended at 2021-04-01 12:10:37 25 | -------------------------------------------------------------------------------- /examples/example2/simout2.model: -------------------------------------------------------------------------------- 1 | Mean 0.3992151E+02 2 | Nsnp 0.1792846E+04 3 | Va 0.5806501E+02 4 | Ve 0.4716225E+02 5 | Nk11 0.5026116E+04 6 | Nk12 0.4884000E+01 7 | Nk21 0.3212038E+04 8 | Nk22 0.1157808E+04 9 | Nk23 0.6069240E+03 10 | Nk24 0.2323000E+02 11 | Pk11 0.9988306E+00 12 | Pk12 0.1169428E-02 13 | Pk21 0.6417220E+00 14 | Pk22 0.2317677E+00 15 | Pk23 0.1216947E+00 16 | Pk24 0.4815539E-02 17 | Vk11 0.0000000E+00 18 | Vk12 0.3631931E+01 19 | Vk21 0.0000000E+00 20 | Vk22 0.6655345E+01 21 | Vk23 0.3518718E+02 22 | Vk24 0.1239619E+02 23 | -------------------------------------------------------------------------------- /examples/example3/seg: -------------------------------------------------------------------------------- 1 | 2 0 0.025 1.0 1.0 2 | 4 0 0.0001 0.001 0.01 1.0 1.0 1.0 1.0 3 | -------------------------------------------------------------------------------- /examples/example3/simdata2.bed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/examples/example3/simdata2.bed -------------------------------------------------------------------------------- /examples/example3/simout3.log: -------------------------------------------------------------------------------- 1 | Program BayesR 2 | Run started at 2021-04-01 12:15:38 3 | Prefix for input files : simdata2 4 | Prefix for output files : simout3 5 | Phenotype column = 2 6 | No. of loci = 10031 7 | No. of individuals = 2326 8 | No. of training individuals = 2326 9 | SNP model file : mod3 10 | Variance model file : var3 11 | Prior Vara 12 | 1 0.1000000E-22 0.4000000E+01 13 | 2 0.1000000E-22 0.4000000E+01 14 | Segment model file : seg 15 | Prior segements (No. of mixtures, Variance of dist, Dirichlet prior) 16 | 1 2 0.00000 0.02500 1.00000 1.00000 17 | 2 4 0.00000 0.00010 0.00100 0.01000 1.00000 1.00000 1.00000 1.00000 18 | Prior Vare = 0.010000 -2.000000 19 | No. of cycles = 10000 20 | Burnin = 5000 21 | Thinning rate = 10 22 | Seed = 333 23 | SNP output = F 24 | New seeds generated from seed1 333 25 | Plink magic number 1 - ok 26 | Plink magic number 2 - ok 27 | SNP-major mode for PLINK .bed file 28 | Run ended at 2021-04-01 12:17:43 29 | -------------------------------------------------------------------------------- /examples/example3/simout3.model: -------------------------------------------------------------------------------- 1 | Mean 0.3992470E+02 2 | Nsnp 0.3276420E+04 3 | Va 0.5789394E+02 4 | Ve 0.4653919E+02 5 | Va1 0.1758171E+01 6 | Va2 0.5613577E+02 7 | Nk11 0.4980710E+04 8 | Nk12 0.5029000E+02 9 | Nk21 0.1773870E+04 10 | Nk22 0.2691616E+04 11 | Nk23 0.5101500E+03 12 | Nk24 0.2436400E+02 13 | Pk11 0.9897932E+00 14 | Pk12 0.1020680E-01 15 | Pk21 0.3545385E+00 16 | Pk22 0.5380721E+00 17 | Pk23 0.1023589E+00 18 | Pk24 0.5030450E-02 19 | Vk11 0.0000000E+00 20 | Vk12 0.1762329E+01 21 | Vk21 0.0000000E+00 22 | Vk22 0.1502896E+02 23 | Vk23 0.2853220E+02 24 | Vk24 0.1244996E+02 25 | -------------------------------------------------------------------------------- /examples/example3/var3: -------------------------------------------------------------------------------- 1 | 1E-23 4.0 2 | 1E-23 4.0 3 | -------------------------------------------------------------------------------- /old/bin/bayesR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/bin/bayesR -------------------------------------------------------------------------------- /old/bin/bayesRv2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/bin/bayesRv2 -------------------------------------------------------------------------------- /old/doc/BayesRmanual-0.75.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/doc/BayesRmanual-0.75.pdf -------------------------------------------------------------------------------- /old/doc/fast(er)BayesR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/doc/fast(er)BayesR.pdf -------------------------------------------------------------------------------- /old/example/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/example/.DS_Store -------------------------------------------------------------------------------- /old/example/simdata.bed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syntheke/bayesR/c09a7c56303e65cf0f1c4f02402f20731a3c8ebc/old/example/simdata.bed -------------------------------------------------------------------------------- /old/example/simout.gv: -------------------------------------------------------------------------------- 1 | 0.6425497E+02 2 | 0.7614823E+02 3 | 0.6963361E+02 4 | 0.6194220E+02 5 | 0.6813768E+02 6 | 0.6374046E+02 7 | 0.7110904E+02 8 | 0.7417156E+02 9 | 0.6938921E+02 10 | 0.6656045E+02 11 | 0.7596187E+02 12 | 0.6225910E+02 13 | 0.7829821E+02 14 | 0.5735542E+02 15 | 0.6969233E+02 16 | 0.5992319E+02 17 | 0.8136775E+02 18 | 0.6312012E+02 19 | 0.7574248E+02 20 | 0.8208093E+02 21 | 0.6005703E+02 22 | 0.6946422E+02 23 | 0.6605346E+02 24 | 0.6711519E+02 25 | 0.6897250E+02 26 | 0.6957925E+02 27 | 0.6832669E+02 28 | 0.6934988E+02 29 | 0.7014472E+02 30 | 0.6997106E+02 31 | 0.6217754E+02 32 | 0.6313197E+02 33 | 0.6390357E+02 34 | 0.6430071E+02 35 | 0.6729599E+02 36 | 0.6963230E+02 37 | 0.6535594E+02 38 | 0.7003554E+02 39 | 0.6709133E+02 40 | 0.6674827E+02 41 | 0.6915471E+02 42 | 0.7050016E+02 43 | 0.6354939E+02 44 | 0.7170652E+02 45 | 0.6219370E+02 46 | 0.6216415E+02 47 | 0.5826483E+02 48 | 0.6056733E+02 49 | 0.6328923E+02 50 | 0.6700240E+02 51 | 0.6921547E+02 52 | 0.7226814E+02 53 | 0.7010836E+02 54 | 0.6900978E+02 55 | 0.6694349E+02 56 | 0.6402085E+02 57 | 0.7102405E+02 58 | 0.6834249E+02 59 | 0.6045747E+02 60 | 0.7134181E+02 61 | 0.6349476E+02 62 | 0.6832757E+02 63 | 0.6145500E+02 64 | 0.7146732E+02 65 | 0.7051862E+02 66 | 0.7170005E+02 67 | 0.7066199E+02 68 | 0.7798605E+02 69 | 0.6534993E+02 70 | 0.6782186E+02 71 | 0.6491076E+02 72 | 0.6747987E+02 73 | 0.7791177E+02 74 | 0.7572256E+02 75 | 0.5909611E+02 76 | 0.7522744E+02 77 | 0.7393185E+02 78 | 0.7275783E+02 79 | 0.6718704E+02 80 | 0.7420814E+02 81 | 0.7029978E+02 82 | 0.6985882E+02 83 | 0.7365003E+02 84 | 0.6726986E+02 85 | 0.7389279E+02 86 | 0.6429854E+02 87 | 0.7539541E+02 88 | 0.7453816E+02 89 | 0.7767221E+02 90 | 0.6610950E+02 91 | 0.7505917E+02 92 | 0.6970787E+02 93 | 0.6633113E+02 94 | 0.7218833E+02 95 | 0.7888083E+02 96 | 0.6306999E+02 97 | 0.7163371E+02 98 | 0.5876945E+02 99 | 0.6725551E+02 100 | 0.7859726E+02 101 | 0.7377651E+02 102 | 0.6967917E+02 103 | 0.6390628E+02 104 | 0.7118929E+02 105 | 0.7316904E+02 106 | 0.6589128E+02 107 | 0.7339115E+02 108 | 0.7326801E+02 109 | 0.7358470E+02 110 | 0.6924217E+02 111 | 0.7440849E+02 112 | 0.6427820E+02 113 | 0.7590434E+02 114 | 0.8120315E+02 115 | 0.6668616E+02 116 | 0.7407404E+02 117 | 0.6645378E+02 118 | 0.7599716E+02 119 | 0.7123852E+02 120 | 0.7643359E+02 121 | 0.7465793E+02 122 | 0.6523565E+02 123 | 0.5968208E+02 124 | 0.7882062E+02 125 | 0.7588599E+02 126 | 0.6760392E+02 127 | 0.7025937E+02 128 | 0.6747981E+02 129 | 0.7429010E+02 130 | 0.6271318E+02 131 | 0.6174469E+02 132 | 0.6794057E+02 133 | 0.6685218E+02 134 | 0.6141569E+02 135 | 0.7061976E+02 136 | 0.5608121E+02 137 | 0.6163538E+02 138 | 0.6244196E+02 139 | 0.7328553E+02 140 | 0.6505725E+02 141 | 0.6934001E+02 142 | 0.5947214E+02 143 | 0.6680185E+02 144 | 0.6788846E+02 145 | 0.5707679E+02 146 | 0.6507955E+02 147 | 0.5921868E+02 148 | 0.7098339E+02 149 | 0.5900252E+02 150 | 0.6821939E+02 151 | 0.6471442E+02 152 | 0.6647955E+02 153 | 0.5845396E+02 154 | 0.6714107E+02 155 | 0.6222906E+02 156 | 0.5897264E+02 157 | 0.6455357E+02 158 | 0.6047031E+02 159 | 0.5555594E+02 160 | 0.6872640E+02 161 | 0.6289810E+02 162 | 0.6681874E+02 163 | 0.6127371E+02 164 | 0.7178157E+02 165 | 0.7281919E+02 166 | 0.5885157E+02 167 | 0.6479504E+02 168 | 0.7315998E+02 169 | 0.6780107E+02 170 | 0.7204845E+02 171 | 0.6783466E+02 172 | 0.7084336E+02 173 | 0.6807974E+02 174 | 0.6987044E+02 175 | 0.7123077E+02 176 | 0.6664630E+02 177 | 0.7480219E+02 178 | 0.6434892E+02 179 | 0.7133647E+02 180 | 0.6969596E+02 181 | 0.6645648E+02 182 | 0.7129964E+02 183 | 0.6146308E+02 184 | 0.6575618E+02 185 | 0.7028943E+02 186 | 0.7275131E+02 187 | 0.7299038E+02 188 | 0.7715645E+02 189 | 0.6594371E+02 190 | 0.7062117E+02 191 | 0.6927737E+02 192 | 0.6883291E+02 193 | 0.7163297E+02 194 | 0.6730005E+02 195 | 0.7050070E+02 196 | 0.6996225E+02 197 | 0.6847829E+02 198 | 0.6779246E+02 199 | 0.6468269E+02 200 | 0.6690743E+02 201 | 0.8035592E+02 202 | 0.7198827E+02 203 | 0.7957920E+02 204 | 0.6631194E+02 205 | 0.7414018E+02 206 | 0.8006067E+02 207 | 0.6811452E+02 208 | 0.7257800E+02 209 | 0.7025505E+02 210 | 0.7534412E+02 211 | 0.7660275E+02 212 | 0.7846541E+02 213 | 0.7092284E+02 214 | 0.7704751E+02 215 | 0.6479471E+02 216 | 0.7847238E+02 217 | 0.7683162E+02 218 | 0.7170475E+02 219 | 0.7172775E+02 220 | 0.7632387E+02 221 | 0.7113284E+02 222 | 0.7554834E+02 223 | 0.6845733E+02 224 | 0.7063027E+02 225 | 0.6381302E+02 226 | 0.8209695E+02 227 | 0.6755591E+02 228 | 0.6904159E+02 229 | 0.7322089E+02 230 | 0.7046162E+02 231 | 0.6122729E+02 232 | 0.6284274E+02 233 | 0.6182623E+02 234 | 0.6275454E+02 235 | 0.5643003E+02 236 | 0.5681415E+02 237 | 0.5656991E+02 238 | 0.5924755E+02 239 | 0.5700739E+02 240 | 0.6716924E+02 241 | 0.5636251E+02 242 | 0.6136017E+02 243 | 0.5985472E+02 244 | 0.6030300E+02 245 | 0.6663809E+02 246 | 0.6192107E+02 247 | 0.5689215E+02 248 | 0.5445752E+02 249 | 0.6528503E+02 250 | 0.6122229E+02 251 | 0.5471053E+02 252 | 0.5985178E+02 253 | 0.5511828E+02 254 | 0.5689878E+02 255 | 0.6320826E+02 256 | 0.6323976E+02 257 | 0.6887691E+02 258 | 0.5708385E+02 259 | 0.5973093E+02 260 | 0.6458425E+02 261 | 0.6128183E+02 262 | 0.6377162E+02 263 | 0.6879003E+02 264 | 0.6829244E+02 265 | 0.5521496E+02 266 | 0.6381046E+02 267 | 0.5752029E+02 268 | 0.5964247E+02 269 | 0.5964367E+02 270 | 0.5776634E+02 271 | 0.6207900E+02 272 | 0.6133865E+02 273 | 0.5194712E+02 274 | 0.5986134E+02 275 | 0.6029165E+02 276 | 0.6581174E+02 277 | 0.6876063E+02 278 | 0.7186875E+02 279 | 0.6582616E+02 280 | 0.7932771E+02 281 | 0.7307710E+02 282 | 0.6573588E+02 283 | 0.6644196E+02 284 | 0.7429943E+02 285 | 0.7344328E+02 286 | 0.6804913E+02 287 | 0.6565258E+02 288 | 0.6933682E+02 289 | 0.6250633E+02 290 | 0.6203614E+02 291 | 0.6269206E+02 292 | 0.5978226E+02 293 | 0.6813574E+02 294 | 0.5680021E+02 295 | 0.6642144E+02 296 | 0.5349452E+02 297 | 0.6907800E+02 298 | 0.6341406E+02 299 | 0.7178757E+02 300 | 0.5514378E+02 301 | 0.5236194E+02 302 | 0.6869765E+02 303 | 0.5251296E+02 304 | 0.6296415E+02 305 | 0.6988181E+02 306 | 0.7041615E+02 307 | 0.5537560E+02 308 | 0.7329775E+02 309 | 0.4667401E+02 310 | 0.6372400E+02 311 | 0.6173925E+02 312 | 0.7618883E+02 313 | 0.7321422E+02 314 | 0.7593406E+02 315 | 0.7720615E+02 316 | 0.7299053E+02 317 | 0.8323133E+02 318 | 0.7678366E+02 319 | 0.8207835E+02 320 | 0.7750519E+02 321 | 0.8546954E+02 322 | 0.7551853E+02 323 | 0.7767430E+02 324 | 0.8265390E+02 325 | 0.7465772E+02 326 | 0.8355089E+02 327 | 0.7609458E+02 328 | 0.7634641E+02 329 | 0.8231396E+02 330 | 0.7633063E+02 331 | 0.8381446E+02 332 | 0.7430507E+02 333 | 0.7772848E+02 334 | 0.8130510E+02 335 | 0.7300451E+02 336 | 0.7322981E+02 337 | 0.7900412E+02 338 | 0.8131511E+02 339 | 0.7998670E+02 340 | 0.7849754E+02 341 | 0.7788788E+02 342 | 0.7802159E+02 343 | 0.7432394E+02 344 | 0.8060649E+02 345 | 0.8513996E+02 346 | 0.8148385E+02 347 | 0.7586114E+02 348 | 0.8072445E+02 349 | 0.8333861E+02 350 | 0.7371478E+02 351 | 0.7215542E+02 352 | 0.8189952E+02 353 | 0.7479756E+02 354 | 0.7180981E+02 355 | 0.7285425E+02 356 | 0.7369279E+02 357 | 0.6061874E+02 358 | 0.6265296E+02 359 | 0.6059638E+02 360 | 0.6579051E+02 361 | 0.7054656E+02 362 | 0.5852096E+02 363 | 0.6809833E+02 364 | 0.5946696E+02 365 | 0.6541386E+02 366 | 0.5816874E+02 367 | 0.5868536E+02 368 | 0.7063079E+02 369 | 0.6938391E+02 370 | 0.6618365E+02 371 | 0.6889593E+02 372 | 0.6975762E+02 373 | 0.7284110E+02 374 | 0.7563011E+02 375 | 0.6888808E+02 376 | 0.7189184E+02 377 | 0.7127089E+02 378 | 0.7440684E+02 379 | 0.7176950E+02 380 | 0.7119292E+02 381 | 0.6943821E+02 382 | 0.7128470E+02 383 | 0.7086766E+02 384 | 0.7023201E+02 385 | 0.7500932E+02 386 | 0.6868224E+02 387 | 0.6795681E+02 388 | 0.7213329E+02 389 | 0.7373934E+02 390 | 0.6868232E+02 391 | 0.7700840E+02 392 | 0.7556763E+02 393 | 0.7894978E+02 394 | 0.7031850E+02 395 | 0.7574734E+02 396 | 0.7348467E+02 397 | 0.7701531E+02 398 | 0.7398195E+02 399 | 0.7452402E+02 400 | 0.6994561E+02 401 | 0.7725224E+02 402 | 0.7103991E+02 403 | 0.7287643E+02 404 | 0.7267453E+02 405 | 0.7332517E+02 406 | 0.6457179E+02 407 | 0.6868215E+02 408 | 0.7340613E+02 409 | 0.7164107E+02 410 | 0.6803566E+02 411 | 0.8412802E+02 412 | 0.7649446E+02 413 | 0.7345521E+02 414 | 0.7172544E+02 415 | 0.7230362E+02 416 | 0.7269942E+02 417 | 0.8313449E+02 418 | 0.8125404E+02 419 | 0.7866248E+02 420 | 0.7216865E+02 421 | 0.7531425E+02 422 | 0.6371751E+02 423 | 0.6490564E+02 424 | 0.6621033E+02 425 | 0.7359330E+02 426 | 0.7172578E+02 427 | 0.6430081E+02 428 | 0.7087653E+02 429 | 0.8108143E+02 430 | 0.7446970E+02 431 | 0.8305520E+02 432 | 0.6602332E+02 433 | 0.7271015E+02 434 | 0.7876821E+02 435 | 0.7272382E+02 436 | 0.7829302E+02 437 | 0.6604251E+02 438 | 0.6830634E+02 439 | 0.5778246E+02 440 | 0.5869747E+02 441 | 0.6285449E+02 442 | 0.5112987E+02 443 | 0.5480643E+02 444 | 0.5965332E+02 445 | 0.6702397E+02 446 | 0.5157972E+02 447 | 0.5421187E+02 448 | 0.6701180E+02 449 | 0.6739058E+02 450 | 0.5837743E+02 451 | 0.5413512E+02 452 | 0.5558013E+02 453 | 0.6383079E+02 454 | 0.6383813E+02 455 | 0.5965870E+02 456 | 0.5912422E+02 457 | 0.6551120E+02 458 | 0.6512371E+02 459 | 0.6449015E+02 460 | 0.6138225E+02 461 | 0.6504372E+02 462 | 0.6177452E+02 463 | 0.6268923E+02 464 | 0.5073109E+02 465 | 0.6237934E+02 466 | 0.5444982E+02 467 | 0.5722575E+02 468 | 0.5881255E+02 469 | 0.5424303E+02 470 | 0.5759613E+02 471 | 0.6065729E+02 472 | 0.5993735E+02 473 | 0.6380234E+02 474 | 0.6720444E+02 475 | 0.6384595E+02 476 | 0.5924887E+02 477 | 0.5831553E+02 478 | 0.6690540E+02 479 | 0.6667968E+02 480 | 0.6561066E+02 481 | 0.6949198E+02 482 | 0.7277176E+02 483 | 0.5412622E+02 484 | 0.5866934E+02 485 | 0.5908888E+02 486 | 0.6977189E+02 487 | 0.6382218E+02 488 | 0.6357400E+02 489 | 0.6987590E+02 490 | 0.6535478E+02 491 | 0.6428486E+02 492 | 0.6613574E+02 493 | 0.6119434E+02 494 | 0.6048520E+02 495 | 0.7232508E+02 496 | 0.6936465E+02 497 | 0.6392399E+02 498 | 0.6943203E+02 499 | 0.6022201E+02 500 | 0.6255281E+02 501 | 0.6668074E+02 502 | 0.7190154E+02 503 | 0.7448945E+02 504 | 0.7340685E+02 505 | 0.8023824E+02 506 | 0.7278768E+02 507 | 0.7294970E+02 508 | 0.6871003E+02 509 | 0.7861679E+02 510 | 0.7410285E+02 511 | 0.7987192E+02 512 | 0.6948291E+02 513 | 0.7165867E+02 514 | 0.7112141E+02 515 | 0.7107644E+02 516 | 0.8195180E+02 517 | 0.7499887E+02 518 | 0.7114640E+02 519 | 0.7141748E+02 520 | 0.8043018E+02 521 | 0.7748491E+02 522 | 0.7229583E+02 523 | 0.6724401E+02 524 | 0.7398238E+02 525 | 0.7657188E+02 526 | 0.7695751E+02 527 | 0.8216799E+02 528 | 0.6562560E+02 529 | 0.6341952E+02 530 | 0.8001320E+02 531 | 0.6770489E+02 532 | 0.7377710E+02 533 | 0.7597579E+02 534 | 0.7865194E+02 535 | 0.6419363E+02 536 | 0.6943885E+02 537 | 0.7162093E+02 538 | 0.7555071E+02 539 | 0.7565929E+02 540 | 0.6738525E+02 541 | 0.6761749E+02 542 | 0.7756943E+02 543 | 0.7469770E+02 544 | 0.6981110E+02 545 | 0.6891539E+02 546 | 0.6954755E+02 547 | 0.7113193E+02 548 | 0.6944585E+02 549 | 0.7211210E+02 550 | 0.6943334E+02 551 | 0.7187703E+02 552 | 0.6749164E+02 553 | 0.7221064E+02 554 | 0.7135461E+02 555 | 0.6367033E+02 556 | 0.7173230E+02 557 | 0.6496841E+02 558 | 0.6861915E+02 559 | 0.7355080E+02 560 | 0.7160256E+02 561 | 0.6875453E+02 562 | 0.6915817E+02 563 | 0.7453347E+02 564 | 0.6995022E+02 565 | 0.7497896E+02 566 | 0.7152142E+02 567 | 0.7178836E+02 568 | 0.7256221E+02 569 | 0.7154155E+02 570 | 0.6962560E+02 571 | 0.7128756E+02 572 | 0.7062490E+02 573 | 0.7350938E+02 574 | 0.6955749E+02 575 | 0.6928345E+02 576 | 0.7175457E+02 577 | 0.7010800E+02 578 | 0.7062004E+02 579 | 0.7234730E+02 580 | 0.7187712E+02 581 | 0.6679818E+02 582 | 0.7242764E+02 583 | 0.7479337E+02 584 | 0.7040932E+02 585 | 0.7164183E+02 586 | 0.6566219E+02 587 | 0.7098710E+02 588 | 0.7027180E+02 589 | 0.7275451E+02 590 | 0.7157753E+02 591 | 0.6585628E+02 592 | 0.6791640E+02 593 | 0.6451579E+02 594 | 0.5963318E+02 595 | 0.6569852E+02 596 | 0.6854137E+02 597 | 0.6297863E+02 598 | 0.7107296E+02 599 | 0.6491067E+02 600 | 0.6715711E+02 601 | 0.6343099E+02 602 | 0.6671910E+02 603 | 0.7066213E+02 604 | 0.6899306E+02 605 | 0.6583983E+02 606 | 0.7614946E+02 607 | 0.6847557E+02 608 | 0.5959581E+02 609 | 0.6810152E+02 610 | 0.6933394E+02 611 | 0.6323919E+02 612 | 0.7485835E+02 613 | 0.6629062E+02 614 | 0.7286458E+02 615 | 0.7027760E+02 616 | 0.6139225E+02 617 | 0.6933068E+02 618 | 0.6635576E+02 619 | 0.7322435E+02 620 | 0.6699547E+02 621 | 0.7600418E+02 622 | 0.6932648E+02 623 | 0.6998934E+02 624 | 0.6777787E+02 625 | 0.6396824E+02 626 | 0.6938366E+02 627 | 0.7135648E+02 628 | 0.6677428E+02 629 | 0.7015495E+02 630 | 0.6897999E+02 631 | 0.7223732E+02 632 | 0.7139042E+02 633 | 0.7006918E+02 634 | 0.7384769E+02 635 | 0.6272478E+02 636 | 0.6409120E+02 637 | 0.6492762E+02 638 | 0.6978367E+02 639 | 0.7552642E+02 640 | 0.7205583E+02 641 | 0.7079462E+02 642 | 0.6959325E+02 643 | 0.7300034E+02 644 | 0.6763290E+02 645 | 0.6629143E+02 646 | 0.7674217E+02 647 | 0.6336296E+02 648 | 0.6913595E+02 649 | 0.7979822E+02 650 | 0.7176447E+02 651 | 0.6941453E+02 652 | 0.6886564E+02 653 | 0.7429423E+02 654 | 0.6736875E+02 655 | 0.7071292E+02 656 | 0.6863943E+02 657 | 0.8192174E+02 658 | 0.7189850E+02 659 | 0.7108305E+02 660 | 0.6342980E+02 661 | 0.7245325E+02 662 | 0.7254418E+02 663 | 0.6953224E+02 664 | 0.6736558E+02 665 | 0.6506015E+02 666 | 0.6392774E+02 667 | 0.7808703E+02 668 | 0.6859516E+02 669 | 0.6284042E+02 670 | 0.6536723E+02 671 | 0.6653906E+02 672 | 0.5982244E+02 673 | 0.6256481E+02 674 | 0.6247602E+02 675 | 0.6242807E+02 676 | 0.5397876E+02 677 | 0.6650244E+02 678 | 0.6481268E+02 679 | 0.6405277E+02 680 | 0.7275965E+02 681 | 0.6321847E+02 682 | 0.6365986E+02 683 | 0.6976532E+02 684 | 0.6529394E+02 685 | 0.6542819E+02 686 | 0.7431897E+02 687 | 0.5979829E+02 688 | 0.7371073E+02 689 | 0.7053637E+02 690 | 0.7640881E+02 691 | 0.6677273E+02 692 | 0.6644605E+02 693 | 0.6641582E+02 694 | 0.5664140E+02 695 | 0.7245854E+02 696 | 0.6943347E+02 697 | 0.6535632E+02 698 | 0.6572242E+02 699 | 0.7870480E+02 700 | 0.5895633E+02 701 | 0.5985542E+02 702 | 0.5950703E+02 703 | 0.6644702E+02 704 | 0.7119153E+02 705 | 0.5364601E+02 706 | 0.6669293E+02 707 | 0.6277406E+02 708 | 0.6371473E+02 709 | 0.7399009E+02 710 | 0.6629001E+02 711 | 0.7978827E+02 712 | 0.7518986E+02 713 | 0.7452175E+02 714 | 0.6925157E+02 715 | 0.6180566E+02 716 | 0.5969162E+02 717 | 0.6890265E+02 718 | 0.6889202E+02 719 | 0.6394912E+02 720 | 0.6952481E+02 721 | 0.6635501E+02 722 | 0.5956843E+02 723 | 0.6874726E+02 724 | 0.6880839E+02 725 | 0.6911905E+02 726 | 0.6099777E+02 727 | 0.7106533E+02 728 | 0.6891429E+02 729 | 0.5865940E+02 730 | 0.6615036E+02 731 | 0.6129861E+02 732 | 0.7289234E+02 733 | 0.6868803E+02 734 | 0.6808139E+02 735 | 0.6626930E+02 736 | 0.7133201E+02 737 | 0.7060661E+02 738 | 0.6948495E+02 739 | 0.6821142E+02 740 | 0.6588773E+02 741 | 0.7178012E+02 742 | 0.6661077E+02 743 | 0.6847111E+02 744 | 0.6139668E+02 745 | 0.7557016E+02 746 | 0.6433552E+02 747 | 0.6464736E+02 748 | 0.6059525E+02 749 | 0.7358946E+02 750 | 0.7600194E+02 751 | 0.7051898E+02 752 | 0.7146525E+02 753 | 0.7216110E+02 754 | 0.7153910E+02 755 | 0.7092538E+02 756 | 0.7588014E+02 757 | 0.7378946E+02 758 | 0.7295267E+02 759 | 0.7341573E+02 760 | 0.7153373E+02 761 | 0.6825440E+02 762 | 0.7491468E+02 763 | 0.7764831E+02 764 | 0.7132567E+02 765 | 0.6915868E+02 766 | 0.7787455E+02 767 | 0.7744337E+02 768 | 0.6881633E+02 769 | 0.7528179E+02 770 | 0.6613899E+02 771 | 0.7403703E+02 772 | 0.7249475E+02 773 | 0.7121311E+02 774 | 0.7313904E+02 775 | 0.6439873E+02 776 | 0.7255207E+02 777 | 0.7102342E+02 778 | 0.7611648E+02 779 | 0.6734147E+02 780 | 0.8167936E+02 781 | 0.7252838E+02 782 | 0.7602427E+02 783 | 0.7330859E+02 784 | 0.6633995E+02 785 | 0.7788179E+02 786 | 0.7060232E+02 787 | 0.7204824E+02 788 | 0.7111308E+02 789 | 0.6204671E+02 790 | 0.6252975E+02 791 | 0.5728354E+02 792 | 0.5659712E+02 793 | 0.6565206E+02 794 | 0.6018830E+02 795 | 0.6383411E+02 796 | 0.6312206E+02 797 | 0.6535266E+02 798 | 0.5954094E+02 799 | 0.6922897E+02 800 | 0.6803550E+02 801 | 0.6817544E+02 802 | 0.6209285E+02 803 | 0.6345596E+02 804 | 0.7181788E+02 805 | 0.6908224E+02 806 | 0.6273577E+02 807 | 0.6618898E+02 808 | 0.6483856E+02 809 | 0.6520963E+02 810 | 0.7298084E+02 811 | 0.6985482E+02 812 | 0.6210329E+02 813 | 0.7381660E+02 814 | 0.6844646E+02 815 | 0.5869347E+02 816 | 0.6941257E+02 817 | 0.7352000E+02 818 | 0.6291454E+02 819 | 0.6469363E+02 820 | 0.7043547E+02 821 | 0.6500804E+02 822 | 0.7647607E+02 823 | 0.6459640E+02 824 | 0.7243613E+02 825 | 0.5638469E+02 826 | 0.7102247E+02 827 | 0.7851818E+02 828 | 0.7289418E+02 829 | 0.7895024E+02 830 | 0.7260906E+02 831 | 0.6237128E+02 832 | 0.6384209E+02 833 | 0.6966712E+02 834 | 0.6423685E+02 835 | 0.6856992E+02 836 | 0.6942553E+02 837 | 0.7005196E+02 838 | 0.6704158E+02 839 | 0.7243048E+02 840 | 0.7064419E+02 841 | 0.7247589E+02 842 | 0.7098383E+02 843 | 0.5995128E+02 844 | 0.7168925E+02 845 | 0.6748693E+02 846 | 0.7277061E+02 847 | 0.6530926E+02 848 | 0.6566690E+02 849 | 0.6702361E+02 850 | 0.6369327E+02 851 | 0.6636100E+02 852 | 0.6750271E+02 853 | 0.7103396E+02 854 | 0.6708821E+02 855 | 0.6407405E+02 856 | 0.7652656E+02 857 | 0.6821168E+02 858 | 0.6617342E+02 859 | 0.6681555E+02 860 | 0.7204012E+02 861 | 0.6736380E+02 862 | 0.6512225E+02 863 | 0.6954513E+02 864 | 0.6854822E+02 865 | 0.6984433E+02 866 | 0.6720964E+02 867 | 0.6403086E+02 868 | 0.7094391E+02 869 | 0.6342393E+02 870 | 0.6279491E+02 871 | 0.6912522E+02 872 | 0.6966072E+02 873 | 0.6495788E+02 874 | 0.6901926E+02 875 | 0.6852848E+02 876 | 0.7097666E+02 877 | 0.6970243E+02 878 | 0.6787870E+02 879 | 0.6823501E+02 880 | 0.6707830E+02 881 | 0.7133976E+02 882 | 0.6458158E+02 883 | 0.6646565E+02 884 | 0.6504579E+02 885 | 0.6337242E+02 886 | 0.6229287E+02 887 | 0.6609633E+02 888 | 0.6524759E+02 889 | 0.6400427E+02 890 | 0.6577021E+02 891 | 0.7177456E+02 892 | 0.7171754E+02 893 | 0.6398353E+02 894 | 0.6736074E+02 895 | 0.6957423E+02 896 | 0.6870021E+02 897 | 0.7660349E+02 898 | 0.7481941E+02 899 | 0.7410429E+02 900 | 0.6587557E+02 901 | 0.8056111E+02 902 | 0.6542687E+02 903 | 0.6498999E+02 904 | 0.7147044E+02 905 | 0.6772066E+02 906 | 0.7760174E+02 907 | 0.6089899E+02 908 | 0.7738364E+02 909 | 0.6865858E+02 910 | 0.6997597E+02 911 | 0.7139897E+02 912 | 0.6888123E+02 913 | 0.7832166E+02 914 | 0.6435264E+02 915 | 0.6147012E+02 916 | 0.6590874E+02 917 | 0.6472100E+02 918 | 0.7208464E+02 919 | 0.6443202E+02 920 | 0.6923230E+02 921 | 0.7432125E+02 922 | 0.6936855E+02 923 | 0.6728512E+02 924 | 0.7152805E+02 925 | 0.6986614E+02 926 | 0.7369969E+02 927 | 0.6281515E+02 928 | 0.7512268E+02 929 | 0.6667251E+02 930 | 0.6464997E+02 931 | 0.7077115E+02 932 | 0.7882359E+02 933 | 0.6981950E+02 934 | 0.5708117E+02 935 | 0.6692611E+02 936 | 0.6954128E+02 937 | 0.7098946E+02 938 | 0.6311019E+02 939 | 0.6456258E+02 940 | 0.6308726E+02 941 | 0.5367405E+02 942 | 0.5631619E+02 943 | 0.5803486E+02 944 | 0.5736205E+02 945 | 0.6752601E+02 946 | 0.6441002E+02 947 | 0.6337715E+02 948 | 0.6452671E+02 949 | 0.7477199E+02 950 | 0.6968057E+02 951 | 0.7787536E+02 952 | 0.8260266E+02 953 | 0.8132853E+02 954 | 0.7781994E+02 955 | 0.6348108E+02 956 | 0.7779386E+02 957 | 0.7713114E+02 958 | 0.7953895E+02 959 | 0.6668590E+02 960 | 0.7675444E+02 961 | 0.7744874E+02 962 | 0.7381609E+02 963 | 0.7575757E+02 964 | 0.7396256E+02 965 | 0.7888630E+02 966 | 0.7826692E+02 967 | 0.7407297E+02 968 | 0.6919997E+02 969 | 0.6824232E+02 970 | 0.7453143E+02 971 | 0.7786019E+02 972 | 0.7200956E+02 973 | 0.7643490E+02 974 | 0.8013954E+02 975 | 0.7461781E+02 976 | 0.7158662E+02 977 | 0.7602902E+02 978 | 0.7657751E+02 979 | 0.7639297E+02 980 | 0.7275353E+02 981 | 0.7376995E+02 982 | 0.7020493E+02 983 | 0.7602613E+02 984 | 0.7689651E+02 985 | 0.7827131E+02 986 | 0.7624767E+02 987 | 0.7586498E+02 988 | 0.7538978E+02 989 | 0.7046240E+02 990 | 0.8076011E+02 991 | 0.7531090E+02 992 | 0.7087072E+02 993 | 0.7480800E+02 994 | 0.7835555E+02 995 | 0.8212790E+02 996 | 0.7981372E+02 997 | 0.7949642E+02 998 | 0.7624265E+02 999 | 0.6814225E+02 1000 | 0.6963818E+02 1001 | 0.6692339E+02 1002 | 0.6794582E+02 1003 | 0.6493133E+02 1004 | 0.7646680E+02 1005 | 0.7527410E+02 1006 | 0.6838168E+02 1007 | 0.6842302E+02 1008 | 0.6750826E+02 1009 | 0.6733138E+02 1010 | 0.7240845E+02 1011 | 0.7215495E+02 1012 | 0.7326448E+02 1013 | 0.6743019E+02 1014 | 0.6882825E+02 1015 | 0.6875011E+02 1016 | 0.6656095E+02 1017 | 0.6103117E+02 1018 | 0.6755260E+02 1019 | 0.6360414E+02 1020 | 0.7253440E+02 1021 | 0.6677162E+02 1022 | 0.7346883E+02 1023 | 0.6372059E+02 1024 | 0.8156653E+02 1025 | 0.6908140E+02 1026 | 0.6728361E+02 1027 | 0.7359847E+02 1028 | 0.6176795E+02 1029 | 0.7606221E+02 1030 | 0.6692699E+02 1031 | 0.7384036E+02 1032 | 0.6562598E+02 1033 | 0.6977825E+02 1034 | 0.6748288E+02 1035 | 0.6874080E+02 1036 | 0.6727176E+02 1037 | 0.6726156E+02 1038 | 0.7401656E+02 1039 | 0.7224388E+02 1040 | 0.6913428E+02 1041 | 0.7212213E+02 1042 | 0.7274637E+02 1043 | 0.6745286E+02 1044 | 0.6878619E+02 1045 | 0.6753266E+02 1046 | 0.6462964E+02 1047 | 0.6593097E+02 1048 | 0.5904183E+02 1049 | 0.6864561E+02 1050 | 0.6398703E+02 1051 | 0.5910230E+02 1052 | 0.6740103E+02 1053 | 0.6215373E+02 1054 | 0.6325326E+02 1055 | 0.6506516E+02 1056 | 0.6279609E+02 1057 | 0.6284803E+02 1058 | 0.6919331E+02 1059 | 0.7404178E+02 1060 | 0.6984004E+02 1061 | 0.6627431E+02 1062 | 0.6966412E+02 1063 | 0.6626612E+02 1064 | 0.6771952E+02 1065 | 0.6919791E+02 1066 | 0.6657148E+02 1067 | 0.6422760E+02 1068 | 0.6075885E+02 1069 | 0.5957892E+02 1070 | 0.6627230E+02 1071 | 0.7002262E+02 1072 | 0.7069546E+02 1073 | 0.7535583E+02 1074 | 0.6443552E+02 1075 | 0.6071334E+02 1076 | 0.7236317E+02 1077 | 0.6332158E+02 1078 | 0.6005855E+02 1079 | 0.6359948E+02 1080 | 0.6642158E+02 1081 | 0.6657865E+02 1082 | 0.5851478E+02 1083 | 0.6756924E+02 1084 | 0.7803545E+02 1085 | 0.7572745E+02 1086 | 0.7420248E+02 1087 | 0.6864520E+02 1088 | 0.7381664E+02 1089 | 0.6750966E+02 1090 | 0.7996012E+02 1091 | 0.8099203E+02 1092 | 0.7677648E+02 1093 | 0.6239308E+02 1094 | 0.8364752E+02 1095 | 0.7492107E+02 1096 | 0.7813228E+02 1097 | 0.6564562E+02 1098 | 0.7691118E+02 1099 | 0.6661250E+02 1100 | 0.7971360E+02 1101 | 0.7536575E+02 1102 | 0.7698392E+02 1103 | 0.7410213E+02 1104 | 0.7832575E+02 1105 | 0.7144952E+02 1106 | 0.7584706E+02 1107 | 0.6794529E+02 1108 | 0.6823104E+02 1109 | 0.7947255E+02 1110 | 0.6939031E+02 1111 | 0.7843177E+02 1112 | 0.7896416E+02 1113 | 0.8057508E+02 1114 | 0.7890515E+02 1115 | 0.7911232E+02 1116 | 0.7425211E+02 1117 | 0.7212929E+02 1118 | 0.7215036E+02 1119 | 0.8208907E+02 1120 | 0.7752735E+02 1121 | 0.7328991E+02 1122 | 0.6289933E+02 1123 | 0.7182083E+02 1124 | 0.7967197E+02 1125 | 0.7127536E+02 1126 | 0.7006722E+02 1127 | 0.7170204E+02 1128 | 0.7158842E+02 1129 | 0.7005641E+02 1130 | 0.5999892E+02 1131 | 0.7134658E+02 1132 | 0.7904929E+02 1133 | 0.7052360E+02 1134 | 0.6953946E+02 1135 | 0.7767390E+02 1136 | 0.7305552E+02 1137 | 0.6452896E+02 1138 | 0.8011754E+02 1139 | 0.7760059E+02 1140 | 0.7907103E+02 1141 | 0.7329312E+02 1142 | 0.6718196E+02 1143 | 0.6323587E+02 1144 | 0.7194304E+02 1145 | 0.6744932E+02 1146 | 0.6439229E+02 1147 | 0.6653734E+02 1148 | 0.6603866E+02 1149 | 0.7324181E+02 1150 | 0.7262932E+02 1151 | 0.6345364E+02 1152 | 0.6639860E+02 1153 | 0.7777206E+02 1154 | 0.7623203E+02 1155 | 0.7214773E+02 1156 | 0.6491369E+02 1157 | 0.7484561E+02 1158 | 0.6391686E+02 1159 | 0.7751567E+02 1160 | 0.7740630E+02 1161 | 0.7983001E+02 1162 | 0.7853968E+02 1163 | 0.8047475E+02 1164 | 0.7790067E+02 1165 | 0.7344396E+02 1166 | 0.8451223E+02 1167 | 0.7433563E+02 1168 | 0.7824881E+02 1169 | 0.8035965E+02 1170 | 0.7323041E+02 1171 | 0.7662421E+02 1172 | 0.7883980E+02 1173 | 0.8112463E+02 1174 | 0.8278436E+02 1175 | 0.8329387E+02 1176 | 0.7870492E+02 1177 | 0.7706725E+02 1178 | 0.8050236E+02 1179 | 0.7805191E+02 1180 | 0.7257623E+02 1181 | 0.8552081E+02 1182 | 0.7577292E+02 1183 | 0.8114840E+02 1184 | 0.7176038E+02 1185 | 0.8032032E+02 1186 | 0.8257631E+02 1187 | 0.7844078E+02 1188 | 0.8199449E+02 1189 | 0.6584956E+02 1190 | 0.6255247E+02 1191 | 0.5831536E+02 1192 | 0.6713927E+02 1193 | 0.6658370E+02 1194 | 0.6623698E+02 1195 | 0.6427633E+02 1196 | 0.6874337E+02 1197 | 0.5531243E+02 1198 | 0.5911095E+02 1199 | 0.6458889E+02 1200 | 0.5693907E+02 1201 | 0.5858324E+02 1202 | 0.5791568E+02 1203 | 0.6466883E+02 1204 | 0.6556653E+02 1205 | 0.7060627E+02 1206 | 0.5783034E+02 1207 | 0.5618875E+02 1208 | 0.6695268E+02 1209 | 0.6731791E+02 1210 | 0.7122185E+02 1211 | 0.6120059E+02 1212 | 0.5982356E+02 1213 | 0.7440472E+02 1214 | 0.6185728E+02 1215 | 0.5715681E+02 1216 | 0.6366624E+02 1217 | 0.5741889E+02 1218 | 0.6342659E+02 1219 | 0.6365931E+02 1220 | 0.6166305E+02 1221 | 0.6403811E+02 1222 | 0.5625873E+02 1223 | 0.6266144E+02 1224 | 0.7328968E+02 1225 | 0.6467416E+02 1226 | 0.6865558E+02 1227 | 0.5672184E+02 1228 | 0.6059551E+02 1229 | 0.6368001E+02 1230 | 0.6562323E+02 1231 | 0.6912816E+02 1232 | 0.8022739E+02 1233 | 0.6943456E+02 1234 | 0.6750893E+02 1235 | 0.6742224E+02 1236 | 0.7299972E+02 1237 | 0.6716314E+02 1238 | 0.7390589E+02 1239 | 0.6435559E+02 1240 | 0.6600328E+02 1241 | 0.7115758E+02 1242 | 0.6904233E+02 1243 | 0.7499894E+02 1244 | 0.7152808E+02 1245 | 0.7063295E+02 1246 | 0.6786043E+02 1247 | 0.7449414E+02 1248 | 0.6997896E+02 1249 | 0.7725166E+02 1250 | 0.6903215E+02 1251 | 0.6819564E+02 1252 | 0.6979614E+02 1253 | 0.7557390E+02 1254 | 0.7087010E+02 1255 | 0.7434430E+02 1256 | 0.6464577E+02 1257 | 0.7299074E+02 1258 | 0.6572936E+02 1259 | 0.6698743E+02 1260 | 0.7176083E+02 1261 | 0.7130158E+02 1262 | 0.7119407E+02 1263 | 0.6425162E+02 1264 | 0.7033001E+02 1265 | 0.7243436E+02 1266 | 0.7176061E+02 1267 | 0.7080057E+02 1268 | 0.7090281E+02 1269 | 0.7883207E+02 1270 | 0.7390877E+02 1271 | 0.7089511E+02 1272 | 0.6955308E+02 1273 | 0.6538445E+02 1274 | 0.7793390E+02 1275 | 0.6092114E+02 1276 | 0.6499635E+02 1277 | 0.6964699E+02 1278 | 0.6959436E+02 1279 | 0.6044869E+02 1280 | 0.6284092E+02 1281 | 0.6297774E+02 1282 | 0.6983721E+02 1283 | 0.6912587E+02 1284 | 0.7108689E+02 1285 | 0.6757248E+02 1286 | 0.6391437E+02 1287 | 0.7425423E+02 1288 | 0.6070155E+02 1289 | 0.6533294E+02 1290 | 0.6361615E+02 1291 | 0.6099480E+02 1292 | 0.6156086E+02 1293 | 0.6406551E+02 1294 | 0.7224194E+02 1295 | 0.7509415E+02 1296 | 0.5621101E+02 1297 | 0.6245061E+02 1298 | 0.6468863E+02 1299 | 0.6785673E+02 1300 | 0.5530487E+02 1301 | 0.6381429E+02 1302 | 0.6447669E+02 1303 | 0.6228404E+02 1304 | 0.6645986E+02 1305 | 0.8086727E+02 1306 | 0.7096681E+02 1307 | 0.7196647E+02 1308 | 0.8150049E+02 1309 | 0.7851340E+02 1310 | 0.7465437E+02 1311 | 0.7349978E+02 1312 | 0.6898640E+02 1313 | 0.6714691E+02 1314 | 0.7935430E+02 1315 | 0.7347618E+02 1316 | 0.7362648E+02 1317 | 0.7189374E+02 1318 | 0.7509062E+02 1319 | 0.7257371E+02 1320 | 0.6865288E+02 1321 | 0.6327599E+02 1322 | 0.5539320E+02 1323 | 0.5502241E+02 1324 | 0.5819392E+02 1325 | 0.5842584E+02 1326 | 0.5770305E+02 1327 | 0.5420367E+02 1328 | 0.5629087E+02 1329 | 0.5801720E+02 1330 | 0.5741250E+02 1331 | 0.6202803E+02 1332 | 0.5696694E+02 1333 | 0.6089959E+02 1334 | 0.5830287E+02 1335 | 0.5864142E+02 1336 | 0.6382250E+02 1337 | 0.6736127E+02 1338 | 0.6405305E+02 1339 | 0.6737280E+02 1340 | 0.6795085E+02 1341 | 0.6786250E+02 1342 | 0.6637602E+02 1343 | 0.6616795E+02 1344 | 0.6882162E+02 1345 | 0.6699101E+02 1346 | 0.6546346E+02 1347 | 0.6665530E+02 1348 | 0.6601105E+02 1349 | 0.6336239E+02 1350 | 0.6717117E+02 1351 | 0.5945399E+02 1352 | 0.6322292E+02 1353 | 0.5827342E+02 1354 | 0.6005571E+02 1355 | 0.6200894E+02 1356 | 0.5671362E+02 1357 | 0.6445933E+02 1358 | 0.6365347E+02 1359 | 0.5499395E+02 1360 | 0.6476764E+02 1361 | 0.6628092E+02 1362 | 0.6229138E+02 1363 | 0.5935781E+02 1364 | 0.6873625E+02 1365 | 0.6527625E+02 1366 | 0.6050177E+02 1367 | 0.6268158E+02 1368 | 0.6075606E+02 1369 | 0.6228617E+02 1370 | 0.7254151E+02 1371 | 0.5960692E+02 1372 | 0.5410339E+02 1373 | 0.6751451E+02 1374 | 0.6061947E+02 1375 | 0.5979207E+02 1376 | 0.5996023E+02 1377 | 0.5519523E+02 1378 | 0.6033485E+02 1379 | 0.6875764E+02 1380 | 0.6003047E+02 1381 | 0.5676195E+02 1382 | 0.5129174E+02 1383 | 0.6817520E+02 1384 | 0.6051306E+02 1385 | 0.6736560E+02 1386 | 0.6481398E+02 1387 | 0.5738471E+02 1388 | 0.6017484E+02 1389 | 0.6592036E+02 1390 | 0.6563062E+02 1391 | 0.6026605E+02 1392 | 0.5643355E+02 1393 | 0.6100054E+02 1394 | 0.6956299E+02 1395 | 0.5346698E+02 1396 | 0.5712227E+02 1397 | 0.6302465E+02 1398 | 0.6409911E+02 1399 | 0.6375567E+02 1400 | 0.5654868E+02 1401 | 0.6221636E+02 1402 | 0.6520009E+02 1403 | 0.5965089E+02 1404 | 0.5684209E+02 1405 | 0.6875311E+02 1406 | 0.5347841E+02 1407 | 0.6770546E+02 1408 | 0.6216782E+02 1409 | 0.6062228E+02 1410 | 0.6204138E+02 1411 | 0.6689483E+02 1412 | 0.6078448E+02 1413 | 0.5476372E+02 1414 | 0.6524987E+02 1415 | 0.6829925E+02 1416 | 0.5233678E+02 1417 | 0.5577577E+02 1418 | 0.6747266E+02 1419 | 0.5217381E+02 1420 | 0.5842785E+02 1421 | 0.5655650E+02 1422 | 0.5093753E+02 1423 | 0.5373550E+02 1424 | 0.5313352E+02 1425 | 0.5145047E+02 1426 | 0.5998213E+02 1427 | 0.5284211E+02 1428 | 0.5573336E+02 1429 | 0.5856921E+02 1430 | 0.5914869E+02 1431 | 0.5977452E+02 1432 | 0.5432948E+02 1433 | 0.5738727E+02 1434 | 0.5944841E+02 1435 | 0.4874465E+02 1436 | 0.5270067E+02 1437 | 0.4978487E+02 1438 | 0.5205187E+02 1439 | 0.5183350E+02 1440 | 0.5576806E+02 1441 | 0.5052165E+02 1442 | 0.5875065E+02 1443 | 0.5547173E+02 1444 | 0.5128016E+02 1445 | 0.6238387E+02 1446 | 0.5766188E+02 1447 | 0.5118377E+02 1448 | 0.5617396E+02 1449 | 0.5705511E+02 1450 | 0.5385884E+02 1451 | 0.5471520E+02 1452 | 0.5500514E+02 1453 | 0.5605875E+02 1454 | 0.5047547E+02 1455 | 0.5690921E+02 1456 | 0.5832507E+02 1457 | 0.6700244E+02 1458 | 0.6476064E+02 1459 | 0.5832623E+02 1460 | 0.7348296E+02 1461 | 0.5951754E+02 1462 | 0.6818145E+02 1463 | 0.6790874E+02 1464 | 0.6262581E+02 1465 | 0.6505393E+02 1466 | 0.6414818E+02 1467 | 0.6447777E+02 1468 | 0.6221518E+02 1469 | 0.7490918E+02 1470 | 0.6389341E+02 1471 | 0.5864716E+02 1472 | 0.7299818E+02 1473 | 0.8202394E+02 1474 | 0.6833664E+02 1475 | 0.6694595E+02 1476 | 0.6958076E+02 1477 | 0.6430310E+02 1478 | 0.7487076E+02 1479 | 0.7275998E+02 1480 | 0.6532222E+02 1481 | 0.6247991E+02 1482 | 0.7498006E+02 1483 | 0.7620164E+02 1484 | 0.6521420E+02 1485 | 0.6880705E+02 1486 | 0.6747237E+02 1487 | 0.7485242E+02 1488 | 0.6932357E+02 1489 | 0.7036306E+02 1490 | 0.6248455E+02 1491 | 0.7504207E+02 1492 | 0.6865256E+02 1493 | 0.6838579E+02 1494 | 0.6615814E+02 1495 | 0.7490260E+02 1496 | 0.6100053E+02 1497 | 0.7624083E+02 1498 | 0.7964335E+02 1499 | 0.7264609E+02 1500 | 0.6939799E+02 1501 | 0.7560962E+02 1502 | 0.7716862E+02 1503 | 0.5847247E+02 1504 | 0.6899349E+02 1505 | 0.7395866E+02 1506 | 0.7008834E+02 1507 | 0.8070429E+02 1508 | 0.7051032E+02 1509 | 0.7314448E+02 1510 | 0.7126691E+02 1511 | 0.7710479E+02 1512 | 0.7373771E+02 1513 | 0.6953355E+02 1514 | 0.5985193E+02 1515 | 0.6674209E+02 1516 | 0.6749615E+02 1517 | 0.6902217E+02 1518 | 0.7957132E+02 1519 | 0.6264137E+02 1520 | 0.6208091E+02 1521 | 0.7484190E+02 1522 | 0.6739514E+02 1523 | 0.8224385E+02 1524 | 0.6858622E+02 1525 | 0.7023586E+02 1526 | 0.7203587E+02 1527 | 0.7900112E+02 1528 | 0.6793924E+02 1529 | 0.6893921E+02 1530 | 0.6475522E+02 1531 | 0.6728427E+02 1532 | 0.6528222E+02 1533 | 0.7548774E+02 1534 | 0.7187639E+02 1535 | 0.7944440E+02 1536 | 0.6690838E+02 1537 | 0.6387418E+02 1538 | 0.7743363E+02 1539 | 0.7310705E+02 1540 | 0.7167638E+02 1541 | 0.6629396E+02 1542 | 0.7545248E+02 1543 | 0.7017050E+02 1544 | 0.6895652E+02 1545 | 0.6726622E+02 1546 | 0.5505713E+02 1547 | 0.7759626E+02 1548 | 0.7985787E+02 1549 | 0.6418255E+02 1550 | 0.6690462E+02 1551 | 0.6783445E+02 1552 | 0.6981864E+02 1553 | 0.6670699E+02 1554 | 0.6512165E+02 1555 | 0.6929939E+02 1556 | 0.8390162E+02 1557 | 0.6186315E+02 1558 | 0.8557483E+02 1559 | 0.6329490E+02 1560 | 0.6588908E+02 1561 | 0.7241419E+02 1562 | 0.7193871E+02 1563 | 0.6717951E+02 1564 | 0.7080831E+02 1565 | 0.7019016E+02 1566 | 0.8186967E+02 1567 | 0.6944643E+02 1568 | 0.7705519E+02 1569 | 0.6836902E+02 1570 | 0.6399272E+02 1571 | 0.7038911E+02 1572 | 0.6957550E+02 1573 | 0.6818682E+02 1574 | 0.6869139E+02 1575 | 0.6907316E+02 1576 | 0.7335281E+02 1577 | 0.7252928E+02 1578 | 0.6840234E+02 1579 | 0.7828335E+02 1580 | 0.6819492E+02 1581 | 0.7527317E+02 1582 | 0.7109452E+02 1583 | 0.7238874E+02 1584 | 0.6780061E+02 1585 | 0.7163932E+02 1586 | 0.6447487E+02 1587 | 0.7233792E+02 1588 | 0.6902723E+02 1589 | 0.7080383E+02 1590 | 0.7230441E+02 1591 | 0.6367039E+02 1592 | 0.6892966E+02 1593 | 0.7226692E+02 1594 | 0.7151247E+02 1595 | 0.7043866E+02 1596 | 0.6837436E+02 1597 | 0.7288539E+02 1598 | 0.7218805E+02 1599 | 0.7137425E+02 1600 | 0.7186824E+02 1601 | 0.6963581E+02 1602 | 0.7482852E+02 1603 | 0.6713840E+02 1604 | 0.7173468E+02 1605 | 0.6846465E+02 1606 | 0.6485038E+02 1607 | 0.7351109E+02 1608 | 0.5976962E+02 1609 | 0.6478419E+02 1610 | 0.7190897E+02 1611 | 0.6935774E+02 1612 | 0.6380528E+02 1613 | 0.6044355E+02 1614 | 0.7170609E+02 1615 | 0.6667478E+02 1616 | 0.7243877E+02 1617 | 0.5980910E+02 1618 | 0.7304648E+02 1619 | 0.6716544E+02 1620 | 0.7366664E+02 1621 | 0.6629505E+02 1622 | 0.6326470E+02 1623 | 0.6797975E+02 1624 | 0.6633678E+02 1625 | 0.6771976E+02 1626 | 0.6616504E+02 1627 | 0.7162064E+02 1628 | 0.5880539E+02 1629 | 0.6663730E+02 1630 | 0.6666961E+02 1631 | 0.6544743E+02 1632 | 0.7017695E+02 1633 | 0.6296382E+02 1634 | 0.6565960E+02 1635 | 0.6216768E+02 1636 | 0.6148240E+02 1637 | 0.7106473E+02 1638 | 0.7056966E+02 1639 | 0.6693861E+02 1640 | 0.6753869E+02 1641 | 0.6681949E+02 1642 | 0.6343028E+02 1643 | 0.6807109E+02 1644 | 0.6530277E+02 1645 | 0.6583848E+02 1646 | 0.6929336E+02 1647 | 0.6422496E+02 1648 | 0.6026438E+02 1649 | 0.5650952E+02 1650 | 0.6471379E+02 1651 | 0.6555298E+02 1652 | 0.6807246E+02 1653 | 0.6796125E+02 1654 | 0.6158205E+02 1655 | 0.6786122E+02 1656 | 0.6113197E+02 1657 | 0.6545708E+02 1658 | 0.6558666E+02 1659 | 0.6762614E+02 1660 | 0.6023165E+02 1661 | 0.6303456E+02 1662 | 0.6925689E+02 1663 | 0.5970417E+02 1664 | 0.6622760E+02 1665 | 0.6544751E+02 1666 | 0.5815200E+02 1667 | 0.6246322E+02 1668 | 0.7111730E+02 1669 | 0.5538418E+02 1670 | 0.7229045E+02 1671 | 0.6254829E+02 1672 | 0.6768479E+02 1673 | 0.6139858E+02 1674 | 0.6235270E+02 1675 | 0.6283789E+02 1676 | 0.6678585E+02 1677 | 0.6256023E+02 1678 | 0.6769235E+02 1679 | 0.6118590E+02 1680 | 0.6779381E+02 1681 | 0.6337478E+02 1682 | 0.5957501E+02 1683 | 0.6720952E+02 1684 | 0.6537955E+02 1685 | 0.6349861E+02 1686 | 0.6290121E+02 1687 | 0.5807314E+02 1688 | 0.6781681E+02 1689 | 0.7140763E+02 1690 | 0.7228553E+02 1691 | 0.6372976E+02 1692 | 0.7060491E+02 1693 | 0.6488291E+02 1694 | 0.6654574E+02 1695 | 0.6348892E+02 1696 | 0.7081734E+02 1697 | 0.7241501E+02 1698 | 0.6336979E+02 1699 | 0.7547550E+02 1700 | 0.6183423E+02 1701 | 0.6608249E+02 1702 | 0.6292086E+02 1703 | 0.6665542E+02 1704 | 0.6786185E+02 1705 | 0.6091916E+02 1706 | 0.6952121E+02 1707 | 0.6540812E+02 1708 | 0.6274205E+02 1709 | 0.6884975E+02 1710 | 0.7009800E+02 1711 | 0.5916342E+02 1712 | 0.6990575E+02 1713 | 0.7127601E+02 1714 | 0.6869376E+02 1715 | 0.6719830E+02 1716 | 0.6832231E+02 1717 | 0.6480909E+02 1718 | 0.6484837E+02 1719 | 0.6920431E+02 1720 | 0.6730070E+02 1721 | 0.5954808E+02 1722 | 0.6569705E+02 1723 | 0.7236308E+02 1724 | 0.7007731E+02 1725 | 0.6268101E+02 1726 | 0.6805168E+02 1727 | 0.6648667E+02 1728 | 0.6837690E+02 1729 | 0.6721041E+02 1730 | 0.6081186E+02 1731 | 0.7335915E+02 1732 | 0.6299502E+02 1733 | 0.6647160E+02 1734 | 0.7136300E+02 1735 | 0.6783235E+02 1736 | 0.6427585E+02 1737 | 0.6672750E+02 1738 | 0.6726241E+02 1739 | 0.7467619E+02 1740 | 0.6841956E+02 1741 | 0.7335825E+02 1742 | 0.7324451E+02 1743 | 0.7325383E+02 1744 | 0.7878216E+02 1745 | 0.8269413E+02 1746 | 0.8080937E+02 1747 | 0.7291221E+02 1748 | 0.6617840E+02 1749 | 0.7350920E+02 1750 | 0.7637938E+02 1751 | 0.8076542E+02 1752 | 0.7735474E+02 1753 | 0.6980813E+02 1754 | 0.7159284E+02 1755 | 0.6945653E+02 1756 | 0.6778092E+02 1757 | 0.8030677E+02 1758 | 0.8092997E+02 1759 | 0.7287899E+02 1760 | 0.7976403E+02 1761 | 0.7378728E+02 1762 | 0.7644942E+02 1763 | 0.7754809E+02 1764 | 0.7911098E+02 1765 | 0.7929535E+02 1766 | 0.7259550E+02 1767 | 0.7228925E+02 1768 | 0.7630415E+02 1769 | 0.6843594E+02 1770 | 0.7571930E+02 1771 | 0.6861845E+02 1772 | 0.7635292E+02 1773 | 0.6813499E+02 1774 | 0.8089804E+02 1775 | 0.7860138E+02 1776 | 0.6956342E+02 1777 | 0.6912094E+02 1778 | 0.7160880E+02 1779 | 0.7424521E+02 1780 | 0.7123199E+02 1781 | 0.6597471E+02 1782 | 0.7077958E+02 1783 | 0.7286873E+02 1784 | 0.7002550E+02 1785 | 0.7597180E+02 1786 | 0.8061596E+02 1787 | 0.6746896E+02 1788 | 0.7152524E+02 1789 | 0.6465842E+02 1790 | 0.6872788E+02 1791 | 0.6901581E+02 1792 | 0.6898849E+02 1793 | 0.7238406E+02 1794 | 0.7055747E+02 1795 | 0.7051211E+02 1796 | 0.7508958E+02 1797 | 0.6253089E+02 1798 | 0.7474635E+02 1799 | 0.7690046E+02 1800 | 0.6753991E+02 1801 | 0.6591265E+02 1802 | 0.7423356E+02 1803 | 0.6493003E+02 1804 | 0.6787050E+02 1805 | 0.6596377E+02 1806 | 0.7521030E+02 1807 | 0.8007714E+02 1808 | 0.7450024E+02 1809 | 0.7255255E+02 1810 | 0.7725999E+02 1811 | 0.6255287E+02 1812 | 0.7138560E+02 1813 | 0.7557942E+02 1814 | 0.6795720E+02 1815 | 0.7343734E+02 1816 | 0.7353988E+02 1817 | 0.6855647E+02 1818 | 0.6618845E+02 1819 | 0.6514580E+02 1820 | 0.7421711E+02 1821 | 0.6844620E+02 1822 | 0.6702579E+02 1823 | 0.6933984E+02 1824 | 0.6581642E+02 1825 | 0.7269134E+02 1826 | 0.6051577E+02 1827 | 0.7152464E+02 1828 | 0.7909406E+02 1829 | 0.7318619E+02 1830 | 0.7071367E+02 1831 | 0.7257455E+02 1832 | 0.6861676E+02 1833 | 0.7557427E+02 1834 | 0.8004443E+02 1835 | 0.7841810E+02 1836 | 0.7406428E+02 1837 | 0.8085794E+02 1838 | 0.7052065E+02 1839 | 0.7586511E+02 1840 | 0.7179207E+02 1841 | 0.6905909E+02 1842 | 0.7257406E+02 1843 | 0.7369857E+02 1844 | 0.7153292E+02 1845 | 0.7018789E+02 1846 | 0.7580594E+02 1847 | 0.7536597E+02 1848 | 0.7907848E+02 1849 | 0.6797434E+02 1850 | 0.7067519E+02 1851 | 0.7696749E+02 1852 | 0.7197317E+02 1853 | 0.6938665E+02 1854 | 0.7307142E+02 1855 | 0.6830231E+02 1856 | 0.7555442E+02 1857 | 0.7098753E+02 1858 | 0.7039721E+02 1859 | 0.7533009E+02 1860 | 0.6967586E+02 1861 | 0.6845447E+02 1862 | 0.7484637E+02 1863 | 0.6834111E+02 1864 | 0.6673751E+02 1865 | 0.6874534E+02 1866 | 0.7209102E+02 1867 | 0.6942590E+02 1868 | 0.6891419E+02 1869 | 0.6818356E+02 1870 | 0.7363154E+02 1871 | 0.7053591E+02 1872 | 0.7489628E+02 1873 | 0.7162930E+02 1874 | 0.6997252E+02 1875 | 0.7264377E+02 1876 | 0.6725430E+02 1877 | 0.6733774E+02 1878 | 0.7098894E+02 1879 | 0.7037876E+02 1880 | 0.7134909E+02 1881 | 0.7364853E+02 1882 | 0.7370740E+02 1883 | 0.6753744E+02 1884 | 0.7348252E+02 1885 | 0.6597674E+02 1886 | 0.6580134E+02 1887 | 0.6748325E+02 1888 | 0.7565031E+02 1889 | 0.6905032E+02 1890 | 0.7251903E+02 1891 | 0.7036013E+02 1892 | 0.7478475E+02 1893 | 0.6418215E+02 1894 | 0.6861357E+02 1895 | 0.7319476E+02 1896 | 0.6590751E+02 1897 | 0.6931620E+02 1898 | 0.7762754E+02 1899 | 0.7041938E+02 1900 | 0.7485697E+02 1901 | 0.7297933E+02 1902 | 0.7294608E+02 1903 | 0.7147947E+02 1904 | 0.7569098E+02 1905 | 0.7112838E+02 1906 | 0.7085593E+02 1907 | 0.7046260E+02 1908 | 0.7043221E+02 1909 | 0.6102860E+02 1910 | 0.6234316E+02 1911 | 0.6112138E+02 1912 | 0.6247947E+02 1913 | 0.6044781E+02 1914 | 0.6427781E+02 1915 | 0.6163987E+02 1916 | 0.6405020E+02 1917 | 0.6494727E+02 1918 | 0.6142806E+02 1919 | 0.6374389E+02 1920 | 0.6749896E+02 1921 | 0.6496681E+02 1922 | 0.6194199E+02 1923 | 0.6368594E+02 1924 | 0.6234625E+02 1925 | 0.6520339E+02 1926 | 0.6098707E+02 1927 | 0.6659716E+02 1928 | 0.7762645E+02 1929 | 0.6548353E+02 1930 | 0.7155669E+02 1931 | 0.7126908E+02 1932 | 0.7244915E+02 1933 | 0.6467951E+02 1934 | 0.7621011E+02 1935 | 0.6404431E+02 1936 | 0.7082842E+02 1937 | 0.6824096E+02 1938 | 0.6996309E+02 1939 | 0.7692447E+02 1940 | 0.6708452E+02 1941 | 0.7575402E+02 1942 | 0.6391028E+02 1943 | 0.6526144E+02 1944 | 0.7212104E+02 1945 | 0.6169778E+02 1946 | 0.6809526E+02 1947 | 0.7436089E+02 1948 | 0.7165842E+02 1949 | 0.7232536E+02 1950 | 0.6090178E+02 1951 | 0.6664256E+02 1952 | 0.7586226E+02 1953 | 0.6826045E+02 1954 | 0.7380702E+02 1955 | 0.7070579E+02 1956 | 0.6891196E+02 1957 | 0.7779299E+02 1958 | 0.6420437E+02 1959 | 0.6796141E+02 1960 | 0.7166810E+02 1961 | 0.7160456E+02 1962 | 0.6722222E+02 1963 | 0.7194887E+02 1964 | 0.7045403E+02 1965 | 0.7274973E+02 1966 | 0.7001965E+02 1967 | 0.7073872E+02 1968 | 0.7729877E+02 1969 | 0.6841463E+02 1970 | 0.7205255E+02 1971 | 0.7437227E+02 1972 | 0.7020067E+02 1973 | 0.7169765E+02 1974 | 0.6835001E+02 1975 | 0.7057147E+02 1976 | 0.7763222E+02 1977 | 0.6943437E+02 1978 | 0.7209419E+02 1979 | 0.6836733E+02 1980 | 0.7915228E+02 1981 | 0.7273658E+02 1982 | 0.7359998E+02 1983 | 0.6439874E+02 1984 | 0.7164140E+02 1985 | 0.6528701E+02 1986 | 0.7370220E+02 1987 | 0.7581912E+02 1988 | 0.7053464E+02 1989 | 0.6852599E+02 1990 | 0.7025516E+02 1991 | 0.6633395E+02 1992 | 0.6311282E+02 1993 | 0.7000367E+02 1994 | 0.6615870E+02 1995 | 0.7230398E+02 1996 | 0.7151553E+02 1997 | 0.7331304E+02 1998 | 0.7118318E+02 1999 | 0.6482766E+02 2000 | 0.7737198E+02 2001 | 0.6812336E+02 2002 | 0.6427520E+02 2003 | 0.7765600E+02 2004 | 0.7611908E+02 2005 | 0.6876737E+02 2006 | 0.7860609E+02 2007 | 0.5967740E+02 2008 | 0.7272343E+02 2009 | 0.5905289E+02 2010 | 0.6813483E+02 2011 | 0.6442506E+02 2012 | 0.7053221E+02 2013 | 0.7084241E+02 2014 | 0.6875711E+02 2015 | 0.7854177E+02 2016 | 0.6850462E+02 2017 | 0.7786676E+02 2018 | 0.7388022E+02 2019 | 0.6464754E+02 2020 | 0.6648267E+02 2021 | 0.7783717E+02 2022 | 0.8112938E+02 2023 | 0.7367239E+02 2024 | 0.7355871E+02 2025 | 0.6766693E+02 2026 | 0.7432282E+02 2027 | 0.6611251E+02 2028 | 0.7464328E+02 2029 | 0.6456674E+02 2030 | 0.7178488E+02 2031 | 0.6973781E+02 2032 | 0.6172441E+02 2033 | 0.6994894E+02 2034 | 0.6399830E+02 2035 | 0.6967139E+02 2036 | 0.6905109E+02 2037 | 0.6425315E+02 2038 | 0.6851768E+02 2039 | 0.5861026E+02 2040 | 0.6611416E+02 2041 | 0.6196696E+02 2042 | 0.6419106E+02 2043 | 0.6147264E+02 2044 | 0.6124845E+02 2045 | 0.6654229E+02 2046 | 0.5702243E+02 2047 | 0.6843374E+02 2048 | 0.6019308E+02 2049 | 0.5852669E+02 2050 | 0.7331342E+02 2051 | 0.6422051E+02 2052 | 0.6218901E+02 2053 | 0.5711991E+02 2054 | 0.6606401E+02 2055 | 0.6832050E+02 2056 | 0.7009591E+02 2057 | 0.6401837E+02 2058 | 0.6335177E+02 2059 | 0.7409167E+02 2060 | 0.6293624E+02 2061 | 0.6897064E+02 2062 | 0.6528587E+02 2063 | 0.6174757E+02 2064 | 0.5740126E+02 2065 | 0.6998417E+02 2066 | 0.7315090E+02 2067 | 0.6813638E+02 2068 | 0.7259419E+02 2069 | 0.6758707E+02 2070 | 0.6724767E+02 2071 | 0.7619306E+02 2072 | 0.6404250E+02 2073 | 0.5353445E+02 2074 | 0.7068262E+02 2075 | 0.7485696E+02 2076 | 0.6384708E+02 2077 | 0.5781835E+02 2078 | 0.7827518E+02 2079 | 0.6961146E+02 2080 | 0.6878941E+02 2081 | 0.6849964E+02 2082 | 0.6549582E+02 2083 | 0.6929994E+02 2084 | 0.6935822E+02 2085 | 0.6683128E+02 2086 | 0.7276122E+02 2087 | 0.7159848E+02 2088 | 0.6307541E+02 2089 | 0.6306944E+02 2090 | 0.6905019E+02 2091 | 0.7863401E+02 2092 | 0.6641910E+02 2093 | 0.7395288E+02 2094 | 0.7443407E+02 2095 | 0.6913207E+02 2096 | 0.6975513E+02 2097 | 0.6487672E+02 2098 | 0.7067308E+02 2099 | 0.7326570E+02 2100 | 0.7219901E+02 2101 | 0.6154063E+02 2102 | 0.7148957E+02 2103 | 0.7872023E+02 2104 | 0.7686861E+02 2105 | 0.6620532E+02 2106 | 0.6837531E+02 2107 | 0.6539812E+02 2108 | 0.7279319E+02 2109 | 0.7891728E+02 2110 | 0.7406652E+02 2111 | 0.7003869E+02 2112 | 0.7010481E+02 2113 | 0.7464549E+02 2114 | 0.7331812E+02 2115 | 0.6804056E+02 2116 | 0.7474822E+02 2117 | 0.7195620E+02 2118 | 0.7394239E+02 2119 | 0.7919561E+02 2120 | 0.7038784E+02 2121 | 0.7809757E+02 2122 | 0.7338690E+02 2123 | 0.7175585E+02 2124 | 0.7863119E+02 2125 | 0.6975978E+02 2126 | 0.7666735E+02 2127 | 0.7254898E+02 2128 | 0.7495184E+02 2129 | 0.6987174E+02 2130 | 0.7361154E+02 2131 | 0.6540338E+02 2132 | 0.7476961E+02 2133 | 0.6550827E+02 2134 | 0.7265066E+02 2135 | 0.7564131E+02 2136 | 0.6723542E+02 2137 | 0.7934583E+02 2138 | 0.7212146E+02 2139 | 0.6723530E+02 2140 | 0.7795011E+02 2141 | 0.6571155E+02 2142 | 0.6467253E+02 2143 | 0.6968855E+02 2144 | 0.7144367E+02 2145 | 0.7278326E+02 2146 | 0.7570863E+02 2147 | 0.7026120E+02 2148 | 0.7310060E+02 2149 | 0.7046969E+02 2150 | 0.6456840E+02 2151 | 0.5947430E+02 2152 | 0.5697451E+02 2153 | 0.5511597E+02 2154 | 0.5859369E+02 2155 | 0.5731346E+02 2156 | 0.5738812E+02 2157 | 0.5997518E+02 2158 | 0.5954227E+02 2159 | 0.5790171E+02 2160 | 0.5692079E+02 2161 | 0.6562102E+02 2162 | 0.6519062E+02 2163 | 0.6041850E+02 2164 | 0.6241351E+02 2165 | 0.5579875E+02 2166 | 0.5659128E+02 2167 | 0.5717041E+02 2168 | 0.6137801E+02 2169 | 0.5848962E+02 2170 | 0.5972434E+02 2171 | 0.6204954E+02 2172 | 0.6333601E+02 2173 | 0.5984355E+02 2174 | 0.6617377E+02 2175 | 0.6465613E+02 2176 | 0.5119343E+02 2177 | 0.5738615E+02 2178 | 0.5818972E+02 2179 | 0.5558017E+02 2180 | 0.6087582E+02 2181 | 0.6613314E+02 2182 | 0.7734484E+02 2183 | 0.7929351E+02 2184 | 0.6789143E+02 2185 | 0.7262836E+02 2186 | 0.7435439E+02 2187 | 0.7222181E+02 2188 | 0.7164860E+02 2189 | 0.6869232E+02 2190 | 0.7577376E+02 2191 | 0.7986385E+02 2192 | 0.6953208E+02 2193 | 0.7554436E+02 2194 | 0.7623847E+02 2195 | 0.6873944E+02 2196 | 0.7386993E+02 2197 | 0.7172532E+02 2198 | 0.7168275E+02 2199 | 0.7102814E+02 2200 | 0.7232296E+02 2201 | 0.7293554E+02 2202 | 0.7058677E+02 2203 | 0.7459306E+02 2204 | 0.7042049E+02 2205 | 0.7363261E+02 2206 | 0.6738044E+02 2207 | 0.7367560E+02 2208 | 0.7775553E+02 2209 | 0.7791362E+02 2210 | 0.7900495E+02 2211 | 0.7565788E+02 2212 | 0.7406658E+02 2213 | 0.7401243E+02 2214 | 0.7753523E+02 2215 | 0.7240089E+02 2216 | 0.7169421E+02 2217 | 0.7250344E+02 2218 | 0.6938036E+02 2219 | 0.7964173E+02 2220 | 0.7405287E+02 2221 | 0.7208226E+02 2222 | 0.7785660E+02 2223 | 0.6584114E+02 2224 | 0.6556046E+02 2225 | 0.6222781E+02 2226 | 0.6543440E+02 2227 | 0.5755450E+02 2228 | 0.7057692E+02 2229 | 0.7022905E+02 2230 | 0.6192239E+02 2231 | 0.6528230E+02 2232 | 0.5302298E+02 2233 | 0.6497731E+02 2234 | 0.7158251E+02 2235 | 0.6575982E+02 2236 | 0.6096126E+02 2237 | 0.6428502E+02 2238 | 0.7280386E+02 2239 | 0.6255550E+02 2240 | 0.5925455E+02 2241 | 0.7414073E+02 2242 | 0.6718193E+02 2243 | 0.6498753E+02 2244 | 0.7122642E+02 2245 | 0.7338646E+02 2246 | 0.7182104E+02 2247 | 0.6640854E+02 2248 | 0.7221432E+02 2249 | 0.6848308E+02 2250 | 0.6694402E+02 2251 | 0.7559140E+02 2252 | 0.6971540E+02 2253 | 0.6876601E+02 2254 | 0.7320560E+02 2255 | 0.7226564E+02 2256 | 0.6610589E+02 2257 | 0.6669617E+02 2258 | 0.6075730E+02 2259 | 0.6137546E+02 2260 | 0.7219657E+02 2261 | 0.6108992E+02 2262 | 0.5779571E+02 2263 | 0.6918028E+02 2264 | 0.7394107E+02 2265 | 0.6013637E+02 2266 | 0.5914860E+02 2267 | 0.7190241E+02 2268 | 0.6507435E+02 2269 | 0.6149428E+02 2270 | 0.6581536E+02 2271 | 0.5907572E+02 2272 | 0.5709495E+02 2273 | 0.6300072E+02 2274 | 0.6422859E+02 2275 | 0.7363695E+02 2276 | 0.6959325E+02 2277 | 0.6407791E+02 2278 | 0.7150919E+02 2279 | 0.5448281E+02 2280 | 0.7696169E+02 2281 | 0.7578493E+02 2282 | 0.7260339E+02 2283 | 0.7191336E+02 2284 | 0.8010688E+02 2285 | 0.7494410E+02 2286 | 0.7491726E+02 2287 | 0.6854893E+02 2288 | 0.7923277E+02 2289 | 0.7308238E+02 2290 | 0.7741846E+02 2291 | 0.8463172E+02 2292 | 0.8129431E+02 2293 | 0.8299052E+02 2294 | 0.7620673E+02 2295 | 0.8181599E+02 2296 | 0.7548481E+02 2297 | 0.7223699E+02 2298 | 0.7522997E+02 2299 | 0.7441893E+02 2300 | 0.7607582E+02 2301 | 0.6524197E+02 2302 | 0.8223943E+02 2303 | 0.6700237E+02 2304 | 0.6711015E+02 2305 | 0.6784560E+02 2306 | 0.6889301E+02 2307 | 0.7688550E+02 2308 | 0.7044688E+02 2309 | 0.7383941E+02 2310 | 0.7699270E+02 2311 | 0.7550298E+02 2312 | 0.6066917E+02 2313 | 0.6775327E+02 2314 | 0.7461878E+02 2315 | 0.7263977E+02 2316 | 0.7309814E+02 2317 | 0.6941985E+02 2318 | 0.6878513E+02 2319 | 0.6882669E+02 2320 | 0.7441797E+02 2321 | 0.7717776E+02 2322 | 0.6939870E+02 2323 | 0.7140267E+02 2324 | 0.7085625E+02 2325 | 0.6203615E+02 2326 | 0.7985888E+02 2327 | -------------------------------------------------------------------------------- /old/example/simout.log: -------------------------------------------------------------------------------- 1 | Program BayesR 2 | Run started at 2015-08-17 10:00:36 3 | Prefix for input files : simdata 4 | Prefix for output files : simout 5 | Phenotype column = 1 6 | No. of loci = 10031 7 | No. of individuals = 2326 8 | No. of training individuals = 2326 9 | Prior Vara = 0.010000 -2.000000 10 | Prior Vare = 0.010000 -2.000000 11 | Model size = 0 12 | No. of cycles = 10000 13 | Burnin = 5000 14 | Thinning rate = 10 15 | No. of mixtures = 4 16 | Variance of dist = 0.00000 0.00010 0.00100 0.01000 17 | Dirichlet prior = 1.00000 1.00000 1.00000 1.00000 18 | Seed = 333 19 | SNP output = F 20 | Plink magic number 1 - ok 21 | Plink magic number 2 - ok 22 | SNP-major mode for PLINK .bed file 23 | New seeds generated from seed1 333 24 | Run ended at 2015-08-17 10:13:16 25 | -------------------------------------------------------------------------------- /old/example/simout.model: -------------------------------------------------------------------------------- 1 | Mean 0.6865238E+02 2 | Nsnp 0.5319520E+03 3 | Va 0.4764244E+02 4 | Ve 0.5331444E+02 5 | Nk1 0.9499048E+04 6 | Nk2 0.3704680E+03 7 | Nk3 0.8446600E+02 8 | Nk4 0.7701800E+02 9 | Pk1 0.9467457E+00 10 | Pk2 0.3702773E-01 11 | Pk3 0.8466605E-02 12 | Pk4 0.7759985E-02 13 | Vk1 0.0000000E+00 14 | Vk2 0.1743622E+01 15 | Vk3 0.3913577E+01 16 | Vk4 0.4148841E+02 17 | -------------------------------------------------------------------------------- /old/src/RandomDistributions.f90: -------------------------------------------------------------------------------- 1 | 2 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 3 | ! normal distributions of SNP effects 4 | ! Copyright (C) 2014 Gerhard Moser 5 | ! 6 | ! This program is free software: you can redistribute it and/or modify 7 | ! it under the terms of the GNU General Public License as published by 8 | ! the Free Software Foundation, either version 3 of the License, or 9 | ! (at your option) any later version. 10 | ! 11 | ! This program is distributed in the hope that it will be useful, 12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | ! GNU General Public License for more details. 15 | 16 | ! You should have received a copy of the GNU General Public License! 17 | ! along with this program. If not, see = 1.0d0) then 81 | d = shape - 1.0d0/3.0d0 82 | c = 1.0d0/(9.0d0*d)**0.5d0 83 | do while (.true.) 84 | x = rand_normal(0.0d0, 1.0d0) 85 | v = 1.0d0 + c*x 86 | do while (v <= 0.0d0) 87 | x = rand_normal(0.0d0, 1.0d0) 88 | v = 1.0d0 + c*x 89 | end do 90 | v = v*v*v 91 | call random_number(u) 92 | xsq = x*x 93 | if ((u < 1.0d0 -.0331d0*xsq*xsq) .or. (dlog(u) < 0.5d0*xsq + d*(1.0d0 - v + dlog(v))) )then 94 | ans=scale*d*v 95 | return 96 | end if 97 | end do 98 | else 99 | g = rand_gamma(shape+1.0d0, 1.0d0) 100 | call random_number(w) 101 | ans=scale*g*(w)**(1.0d0/shape) 102 | return 103 | end if 104 | end function rand_gamma 105 | ! 106 | ! ## return a random sample from a chi square distribution 107 | ! ## with the specified degrees of freedom 108 | ! 109 | function rand_chi_square(dof) result(ans) 110 | double precision ans,dof 111 | ans=rand_gamma(0.5d0*dof, 2.0d0) 112 | end function rand_chi_square 113 | ! 114 | ! ## return a random sample from a scaled 115 | ! inverse chi square distribution with 116 | ! df and scale parameter 117 | ! 118 | function rand_scaled_inverse_chi_square(dof,scale) result(ans) 119 | double precision ans,dof,scale 120 | ans=rand_inverse_gamma(dble(0.5)*dof, dble(0.5)*dof*scale) 121 | end function rand_scaled_inverse_chi_square 122 | 123 | ! ## return a random sample from an inverse gamma random variable 124 | ! 125 | function rand_inverse_gamma(shape, scale) result(ans) 126 | double precision shape,scale,ans 127 | ! ## If X is gamma(shape, scale) then 128 | ! ## 1/Y is inverse gamma(shape, 1/scale) 129 | ans= 1.0d0 / rand_gamma(shape, 1.0d0 / scale) 130 | end function rand_inverse_gamma 131 | ! 132 | !## return a sample from a Weibull distribution 133 | ! 134 | function rand_weibull(shape, scale) result(ans) 135 | double precision shape,scale,temp,ans 136 | if (shape <= 0.0d0) then 137 | write(*,*) "Shape parameter must be positive" 138 | end if 139 | if (scale <= 0.0d0) then 140 | write(*,*) "Scale parameter must be positive" 141 | end if 142 | call random_number(temp) 143 | ans= scale * (-log(temp))**(1.0d0 / shape) 144 | end function rand_weibull 145 | ! 146 | !## return a random sample from a Cauchy distribution 147 | ! 148 | function rand_cauchy(median, scale) result(ans) 149 | double precision ans,median,scale,p 150 | if (scale <= 0.0d0) then 151 | write(*,*) "Scale parameter must be positive" 152 | end if 153 | call random_number(p) 154 | ans = median + scale*tan(PI*(p - 0.5d0)) 155 | end function rand_cauchy 156 | ! 157 | !## return a random sample from a Student t distribution 158 | ! 159 | function rand_student_t(dof) result(ans) 160 | double precision ans,dof,y1,y2 161 | if (dof <= 0.d0) then 162 | write(*,*) "Degrees of freedom must be positive" 163 | end if 164 | ! 165 | ! ## See Seminumerical Algorithms by Knuth 166 | y1 = rand_normal(0.0d0, 1.0d0) 167 | y2 = rand_chi_square(dof) 168 | ans= y1 / (y2 / dof)**0.50d0 169 | ! 170 | end function rand_student_t 171 | ! 172 | !## return a random sample from a Laplace distribution 173 | !## The Laplace distribution is also known as the double exponential distribution. 174 | ! 175 | function rand_laplace(mean, scale) result(ans) 176 | double precision ans,mean,scale,u 177 | if (scale <= 0.0d0) then 178 | write(*,*) "Scale parameter must be positive" 179 | end if 180 | call random_number(u) 181 | if (u < 0.5d0) then 182 | ans = mean + scale*log(2.0d0*u) 183 | else 184 | ans = mean - scale*log(2.0d0*(1.0d0-u)) 185 | end if 186 | end function rand_laplace 187 | ! 188 | ! ## return a random sample from a log-normal distribution 189 | ! 190 | function rand_log_normal(mu, sigma) result(ans) 191 | double precision ans,mu,sigma 192 | ans= exp(rand_normal(mu, sigma)) 193 | end function rand_log_normal 194 | ! 195 | ! ## return a random sample from a beta distribution 196 | ! 197 | function rand_beta(a, b) result(ans) 198 | double precision a,b,ans,u,v 199 | if ((a <= 0.0d0) .or. (b <= 0.0d0)) then 200 | write(*,*) "Beta parameters must be positive" 201 | end if 202 | ! ## There are more efficient methods for generating beta samples. 203 | ! ## However such methods are a little more efficient and much more complicated. 204 | ! ## For an explanation of why the following method works, see 205 | ! ## http://www.johndcook.com/distribution_chart.html#gamma_beta 206 | u = rand_gamma(a, 1.0d0) 207 | v = rand_gamma(b, 1.0d0) 208 | ans = u / (u + v) 209 | end function rand_beta 210 | 211 | ! Based on rdirichlet function in R {gtools} 212 | function rdirichlet(n,irx) result(x) 213 | integer :: n, i 214 | double precision :: sx 215 | double precision, dimension(n) :: irx, x 216 | do i=1,n 217 | x(i)=rand_gamma(irx(i),1.0d0) 218 | enddo 219 | sx=sum(x) 220 | x=x/sx 221 | end function rdirichlet 222 | 223 | end module RDistributions 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /old/src/bayesR.f90: -------------------------------------------------------------------------------- 1 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 2 | ! normal distributions of SNP effects 3 | ! Copyright (C) 2014 Gerhard Moser 4 | ! 5 | ! This program is free software: you can redistribute it and/or modify 6 | ! it under the terms of the GNU General Public License as published by 7 | ! the Free Software Foundation, either version 3 of the License, or 8 | ! (at your option) any later version. 9 | ! 10 | ! This program is distributed in the hope that it will be useful, 11 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ! GNU General Public License for more details. 14 | 15 | ! You should have received a copy of the GNU General Public License! 16 | ! along with this program. If not, see 17 | 18 | program bayesR 19 | use parz 20 | use cmd_parser 21 | use routinez 22 | use RDistributions 23 | 24 | implicit none 25 | integer :: i, j, k, kk, jj,snploc 26 | character (len=8) :: cdate 27 | character (len=10) :: ctime, ci, ca 28 | logical :: overflow 29 | 30 | call date_and_time(date=cdate,time=ctime) 31 | call parse 32 | 33 | call get_size 34 | call load_phenos_plink 35 | call allocate_data 36 | call parse_priors 37 | 38 | if(mcmc) then 39 | open(unit=21,file=logfil,status='unknown',form='formatted') 40 | write(21,901) 'Program BayesR' 41 | write(21,908) 'Run started at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 42 | write(21,902) 'Prefix for input files',trim(inprefix) 43 | write(21,902) 'Prefix for output files',trim(outprefix) 44 | write(21,903) 'Phenotype column',trait_pos 45 | write(21,903) 'No. of loci',nloci 46 | write(21,903) 'No. of individuals',nind 47 | write(21,903) 'No. of training individuals',nt 48 | write(21,906) 'Prior Vara', vara, dfvara 49 | write(21,906) 'Prior Vare', vare, dfvare 50 | write(21,903) 'Model size',msize 51 | write(21,903) 'No. of cycles',numit 52 | write(21,903) 'Burnin ',burnin 53 | write(21,903) 'Thinning rate',thin 54 | write(21,903) 'No. of mixtures',ndist 55 | write(21,905) 'Variance of dist ', gpin 56 | write(21,905) 'Dirichlet prior', delta 57 | write(21,903) 'Seed ', seed1 58 | write(21,909) 'SNP output ', snpout 59 | call flush(21) 60 | endif 61 | 62 | call load_snp_binary 63 | call xcenter 64 | call init_random_seed 65 | 66 | if(mcmc) then 67 | nnind=dble(nt) 68 | if(snpout) then 69 | open(unit=14,file=locfil,status='unknown',action='write') 70 | endif 71 | 72 | open(unit=25,file=hypfil,status='unknown',form='formatted') 73 | write(25,'(2(A10,1x),2(A12,1x),A7)',advance='no') 'Replicate','Nsnp','Va','Ve',' ' 74 | do i=1,ndist 75 | write(ci,'(I8)') i 76 | ci=adjustl(ci) 77 | ca="Nk"//trim(ci) 78 | write(25,'(A10,1x)',advance="no") ca 79 | end do 80 | !write(25,'(A7)',advance='no') ' ' 81 | do i=1,ndist 82 | write(ci,'(I8)') i 83 | ci=adjustl(ci) 84 | ca="Vk"//trim(ci) 85 | write(25,'(A12)',advance="no") ca 86 | end do 87 | write(25,*) 88 | !Calculate vara from h2 or use apriori estimates 89 | ! df=-2 will produce 'flat' (improper priors) 90 | ! df < -2 sets vara = h2*vary 91 | if(dfvara < -2) then 92 | VCE=.false. 93 | yhat=sum(why, mask=trains==0)/nnind 94 | vary= sum((why-yhat)*(why-yhat),mask=trains==0)/(nnind-1.0d0) 95 | vara=vara*vary 96 | else 97 | VCE=.true. 98 | vara_ap=vara 99 | vare_ap=vare 100 | if(dfvara == -2) then 101 | vara_ap=0d0 102 | endif 103 | if(dfvare == -2) then 104 | vare_ap=0d0 105 | endif 106 | endif 107 | 108 | !initialize 109 | pstore=0d0 110 | gstore=0d0 111 | mu_vare_store=0 112 | snpstore=0d0 113 | indiststore=0d0 114 | snptracker=2 115 | xpx=0d0 116 | do i=1,nloci 117 | xpx(i)=dot_product(X(:,i),X(:,i)) 118 | enddo 119 | 120 | !starting values 121 | mu=1.0d0 122 | yadj=0.0d0 123 | yhat=sum(why, mask=trains==0)/nnind 124 | vary= sum((why-yhat)*(why-yhat),mask=trains==0)/(nnind-1.0d0) 125 | gp=gpin*vara 126 | scale=0.0d0 127 | p(1)=0.5d0 128 | p(2:ndist)=1.0d0/gpin(2:ndist) 129 | p(2:ndist)=0.5*p(2:ndist)/sum(p(2:ndist)) 130 | g=dsqrt(vara/(0.5*dble(nloci))) 131 | do k=1,nloci 132 | permvec(k)=k 133 | enddo 134 | call compute_residuals 135 | each_cycle : do rep=1,numit 136 | included=0 137 | if(.not. VCE) then 138 | vare=dot_product(yadj,yadj)/rand_chi_square(nnind+3.0d0) 139 | endif 140 | yadj=yadj+mu 141 | mu=rand_normal(sum(yadj)/nnind, dsqrt(vare/nnind)) 142 | yadj=yadj-mu 143 | log_p(1)=dlog(p(1)) 144 | do i=2,ndist 145 | log_p(i)=dlog(p(i)) 146 | log_gp(i)=dlog(gp(i)) 147 | vare_gp(i)=vare/gp(i) 148 | enddo 149 | if(permute) then 150 | call permutate(permvec,nloci) 151 | endif 152 | do k=1,nloci 153 | snploc=permvec(k) 154 | z => X(:,snploc) 155 | zz=xpx(snploc) 156 | zz_vare=zz/vare 157 | gk=g(snploc) 158 | if(snptracker(snploc) > 1) then 159 | yadj=yadj+z*gk 160 | endif 161 | rhs= dot_product(yadj,z) 162 | lhs=zz/vare 163 | s(1)=log_p(1) 164 | do kk=2,ndist 165 | logdetV=dlog(gp(kk)*zz_vare+1.0d0) 166 | uhat=rhs/(zz+vare_gp(kk)) 167 | s(kk)=-0.5d0*(logdetV-(rhs*uhat/vare))+log_p(kk) 168 | enddo 169 | stemp=0.0d0 170 | do kk=1,ndist 171 | skk=s(kk) 172 | sk=0.0d0 173 | overflow=.false. 174 | do j=1,ndist 175 | if(j==kk) cycle 176 | clike=s(j)-skk 177 | if(clike .lt. -700) then !undeflow 178 | cycle 179 | else if (clike .gt. 700) then 180 | overflow=.true. 181 | exit 182 | endif 183 | sk=sk+dexp(clike) 184 | enddo 185 | if (overflow .eqv. .true.) then 186 | stemp(kk) = 0.0 187 | else 188 | stemp(kk)=1.0d0/(1.0d0+sk) 189 | endif 190 | enddo 191 | ssculm=0.0d0 192 | call random_number(r) 193 | indistflag=1 194 | do kk=1,ndist 195 | ssculm=ssculm+stemp(kk) 196 | if (r0 .and. rep>mrep) then 212 | if(included>=msize) exit 213 | endif 214 | enddo ! each loci 215 | 216 | do i=1,ndist 217 | snpindist(i)=count(snptracker==i) 218 | varindist(i)=sum(g*g, mask= snptracker==i) 219 | enddo 220 | included=nloci-snpindist(1) 221 | 222 | if(VCE) then 223 | scale=(dble(included)*sum(g**2) + vara_ap*dfvara)/(dfvara+dble(included)) 224 | vara=rand_scaled_inverse_chi_square(dble(included)+dfvara,scale) 225 | gp=gpin*vara 226 | vare=(dot_product(yadj,yadj)+vare_ap*dfvare)/ (nnind+dfvare) 227 | vare=rand_scaled_inverse_chi_square(nnind+dfvare,vare) 228 | endif 229 | 230 | dirx=dble(snpindist)+delta 231 | p=rdirichlet(ndist,dirx) 232 | 233 | if(rep>burnin .and. mod(rep,thin)==0) then 234 | counter=counter+1 235 | gstore=gstore+g 236 | pstore=pstore+p 237 | mu_vare_store(1)=mu_vare_store(1)+mu 238 | mu_vare_store(2)=mu_vare_store(2)+included 239 | mu_vare_store(3)=mu_vare_store(3)+vara 240 | mu_vare_store(4)=mu_vare_store(4)+vare 241 | varstore=varstore+varindist 242 | snpstore=snpstore+snpindist 243 | do i=1,nloci 244 | jj=snptracker(i) 245 | indiststore(i,jj)=indiststore(i,jj)+1 246 | enddo 247 | write(25,'(i10,1x,i10,1x,2(E15.7,1x),20(i10,1x))',advance='no') rep, included , & 248 | vara, vare, snpindist 249 | write(25,'(20E15.7,1x)') varindist 250 | call flush(25) 251 | if(snpout) call output_snploc 252 | end if 253 | ! re-calibrate residuals 254 | if(mod(rep,1000)==0) then 255 | !call compute_residuals 256 | endif 257 | enddo each_cycle 258 | 259 | !posterior means 260 | gstore=gstore/counter 261 | pstore=pstore/counter 262 | mu_vare_store=mu_vare_store/counter 263 | varstore=varstore/counter 264 | snpstore=snpstore/counter 265 | do i=1,nloci 266 | indiststore(i,:)=indiststore(i,:)/counter 267 | enddo 268 | call output_model 269 | mu=mu_vare_store(1) 270 | call compute_dgv 271 | call write_dgv 272 | else ! end mcmc 273 | open(unit=21,file=logfil,status='unknown',form='formatted') 274 | write(21,901) 'Program BayesR' 275 | write(21,908) 'Run started at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 276 | write(21,902) 'Prefix for input files',trim(inprefix) 277 | write(21,902) 'Prefix for output files',trim(outprefix) 278 | write(21,903) 'Phenotype column',trait_pos 279 | write(21,903) 'No. of loci',nloci 280 | write(21,903) 'No. of individuals',nind 281 | write(21,903) 'No. of individuals to predict',nt 282 | call load_param 283 | call compute_dgv 284 | call write_dgv 285 | end if 286 | 287 | call date_and_time(date=cdate,time=ctime) 288 | write(21,908) 'Run ended at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 289 | close(21) 290 | 291 | 901 format(a) 292 | 902 format(a,t30,': ',a) 293 | 903 format(a,t30,'= ',i8) 294 | 904 format(a,t30,'= ',f20.6) 295 | 905 format(a,t30,'= ',10f10.5) 296 | 906 format(a,t30,'= ',2f10.6) 297 | 907 format(a,t30,'= ',f10.2,a) 298 | 908 format(a20,1x,a4,'-',a2,'-',a2,' ',a2,':',a2':',a2) 299 | 909 format(a,t30,'= ',l) 300 | end program bayesR 301 | -------------------------------------------------------------------------------- /old/src/bayesRv2.f90: -------------------------------------------------------------------------------- 1 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 2 | ! normal distributions of SNP effects 3 | ! Copyright (C) 2015 Gerhard Moser 4 | ! 5 | ! This program is free software: you can redistribute it and/or modify 6 | ! it under the terms of the GNU General Public License as published by 7 | ! the Free Software Foundation, either version 3 of the License, or 8 | ! (at your option) any later version. 9 | ! 10 | ! This program is distributed in the hope that it will be useful, 11 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ! GNU General Public License for more details. 14 | 15 | ! You should have received a copy of the GNU General Public License! 16 | ! along with this program. If not, see 17 | 18 | program bayesR 19 | use parz 20 | use cmd_parser 21 | use routinez 22 | use RDistributions 23 | use omp_lib 24 | 25 | implicit none 26 | integer :: i, j, k, kk, jj,snploc,b,x1 27 | character (len=8) :: cdate 28 | character (len=10) :: ctime, ci, ca 29 | logical :: overflow, changed 30 | double precision :: wtime 31 | 32 | call omp_set_dynamic(.false.) 33 | wtime = omp_get_wtime() 34 | 35 | call date_and_time(date=cdate,time=ctime) 36 | call parse 37 | call get_size 38 | call load_phenos_plink 39 | call allocate_data 40 | call parse_priors 41 | 42 | if(mcmc) then 43 | open(unit=21,file=logfil,status='unknown',form='formatted') 44 | write(21,901) 'Program BayesR' 45 | write(21,907) 'Run started at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 46 | write(21,902) 'Prefix for input files',trim(inprefix) 47 | write(21,902) 'Prefix for output files',trim(outprefix) 48 | write(21,903) 'Phenotype column',trait_pos 49 | write(21,903) 'No. of loci',nloci 50 | write(21,903) 'No. of individuals',nind 51 | write(21,903) 'No. of training individuals',nt 52 | write(21,906) 'Prior Vara', vara, dfvara 53 | write(21,906) 'Prior Vare', vare, dfvare 54 | write(21,903) 'Model size',msize 55 | write(21,903) 'No. of cycles',numit 56 | write(21,903) 'Burnin ',burnin 57 | write(21,903) 'Thinning rate',thin 58 | write(21,903) 'No. of mixtures',ndist 59 | write(21,905) 'Variance of dist ', gpin 60 | write(21,905) 'Dirichlet prior', delta 61 | write(21,903) 'Seed ', seed1 62 | write(21,903) 'SNP output ', snpout 63 | call flush(21) 64 | endif 65 | 66 | call init_random_seed 67 | call load_snp_binary 68 | call process_snp 69 | call block_dimensions 70 | call build_blocks 71 | call rhs_group 72 | call rhs_ct 73 | call omp_set_num_threads(nthreads) 74 | 75 | if(mcmc) then 76 | nnind=dble(nt) 77 | if(snpout) then 78 | open(unit=14,file=locfil,status='unknown',action='write') 79 | endif 80 | open(unit=25,file=hypfil,status='unknown',form='formatted') 81 | write(25,'(2(A10,1x),2(A12,1x),A7)',advance='no') 'Replicate','Nsnp','Va','Ve',' ' 82 | do i=1,ndist 83 | write(ci,'(I8)') i 84 | ci=adjustl(ci) 85 | ca="Nk"//trim(ci) 86 | write(25,'(A10,1x)',advance="no") ca 87 | end do 88 | !write(25,'(A7)',advance='no') ' ' 89 | do i=1,ndist 90 | write(ci,'(I8)') i 91 | ci=adjustl(ci) 92 | ca="Vk"//trim(ci) 93 | write(25,'(A12)',advance="no") ca 94 | end do 95 | write(25,*) 96 | !Calculate vara from h2 or use apriori estimates 97 | ! df=-2 will produce 'flat' (improper priors) 98 | ! df < -2 sets vara = h2*vary 99 | if(dfvara < -2) then 100 | VCE=.false. 101 | yhat=sum(why, mask=trains==0)/nnind 102 | vary= sum((why-yhat)*(why-yhat),mask=trains==0)/(nnind-1.0d0) 103 | vara=vara*vary 104 | else 105 | VCE=.true. 106 | vara_ap=vara 107 | vare_ap=vare 108 | if(dfvara == -2) then 109 | vara_ap=0d0 110 | endif 111 | if(dfvare == -2) then 112 | vare_ap=0d0 113 | endif 114 | endif 115 | 116 | !initialize 117 | pstore=0d0 118 | gstore=0d0 119 | mu_vare_store=0 120 | snpstore=0d0 121 | indiststore=0d0 122 | snptracker=2 123 | 124 | !starting values 125 | mu=1.0d0 126 | res=0.0d0 127 | yhat=sum(why, mask=trains==0)/nnind 128 | vary= sum((why-yhat)*(why-yhat),mask=trains==0)/(nnind-1.0d0) 129 | gp=gpin*vara 130 | scale=0.0d0 131 | p(1)=0.5d0 132 | p(2:ndist)=1.0d0/gpin(2:ndist) 133 | p(2:ndist)=0.5*p(2:ndist)/sum(p(2:ndist)) 134 | g=dsqrt(vara/(0.5*dble(nloci))) 135 | 136 | call compute_residuals_rhs 137 | do k=1,n_blocks 138 | shufflevec(k)=k 139 | enddo 140 | 141 | each_cycle : do rep=1,numit 142 | included=0 143 | g_old=g 144 | if(.not. VCE) then 145 | vare=dot_product(res,res)/rand_chi_square(nnind+3.0d0) 146 | endif 147 | res=res+mu 148 | mu=rand_normal(sum(res)/nnind, dsqrt(vare/nnind)) 149 | res=res-mu 150 | log_p(1)=dlog(p(1)) 151 | do i=2,ndist 152 | log_p(i)=dlog(p(i)) 153 | log_gp(i)=dlog(gp(i)) 154 | vare_gp(i)=vare/gp(i) 155 | enddo 156 | 157 | if(shuffle) then 158 | call permutate(shufflevec,n_blocks) 159 | endif 160 | 161 | block : do b=1,n_blocks 162 | bl=shufflevec(b) 163 | if(bl==n_blocks .and. rest_size>0) then 164 | t_size=ngeno**rest_size 165 | b_size=rest_size 166 | else 167 | t_size=rhs_ncol 168 | b_size=block_size 169 | end if 170 | s_loc(1:b_size)=block_info(bl,1:b_size) 171 | resvec=0.0d0 172 | !$OMP parallel private(k,x1,resvec_temp) 173 | resvec_temp=0.0d0 174 | !$OMP DO 175 | do k=1,nt 176 | x1=rhs_ind(k,bl) 177 | resvec_temp(x1)=resvec_temp(x1)+res(k) 178 | enddo 179 | !$OMP END DO 180 | !$omp critical 181 | resvec=resvec+resvec_temp 182 | !$OMP END critical 183 | !$OMP barrier 184 | !$OMP DO 185 | do k=1,b_size 186 | bres(1,k)=sum(resvec,mask = rhs_block(:,k)== 0) 187 | bres(2,k)=sum(resvec,mask = rhs_block(:,k)== 1) 188 | bres(3,k)=sum(resvec,mask = rhs_block(:,k)== 2) 189 | bres(4,k)=sum(resvec,mask = rhs_block(:,k)== 3) 190 | enddo 191 | !$OMP end do 192 | !$OMP end parallel 193 | do k=1,b_size 194 | xe(k)=dot_product(bres(:,k),geno_mean(:,s_loc(k))) 195 | enddo 196 | delta_e=0.0d0 197 | delta_res=0.0d0 198 | gbl=0.0d0 199 | changed=.false. 200 | within_block : do pos=1,b_size 201 | rhs=xe(pos) 202 | if(pos>1) then 203 | if(changed) call xe_update 204 | end if 205 | snploc=s_loc(pos) 206 | zz=xpx(snploc) 207 | zz_vare=zz/vare 208 | go=g_old(snploc) 209 | if(snptracker(snploc) > 1) rhs=rhs+zz*go 210 | lhs=zz/vare 211 | s(1)=log_p(1) 212 | do kk=2,ndist 213 | logdetV=dlog(gp(kk)*zz_vare+1.0d0) 214 | uhat=rhs/(zz+vare_gp(kk)) 215 | s(kk)=-0.5d0*(logdetV-(rhs*uhat/vare))+log_p(kk) 216 | enddo 217 | stemp=0.0d0 218 | do kk=1,ndist 219 | skk=s(kk) 220 | sk=0.0d0 221 | overflow=.false. 222 | do j=1,ndist 223 | if(j==kk) cycle 224 | clike=s(j)-skk 225 | if(clike .lt. -700) then !undeflow 226 | cycle 227 | else if (clike .gt. 700) then 228 | overflow=.true. 229 | exit 230 | endif 231 | sk=sk+dexp(clike) 232 | enddo 233 | if (overflow .eqv. .true.) then 234 | stemp(kk) = 0.0 235 | else 236 | stemp(kk)=1.0d0/(1.0d0+sk) 237 | endif 238 | enddo 239 | ssculm=0.0d0 240 | call random_number(r) 241 | indistflag=1 242 | do kk=1,ndist 243 | ssculm=ssculm+stemp(kk) 244 | if (r1 .or. snptracker(snploc)>1) then 257 | changed=.true. 258 | end if 259 | gbl(pos)=gk-go 260 | g(snploc)=gk 261 | snptracker(snploc)=indistflag 262 | end do within_block 263 | 264 | call res_update_rhs 265 | 266 | if(msize>0 .and. rep>mrep) then 267 | if(included>=msize) exit 268 | endif 269 | end do block 270 | 271 | do i=1,ndist 272 | snpindist(i)=count(snptracker==i) 273 | varindist(i)=sum(g*g, mask= snptracker==i) 274 | enddo 275 | included=nloci-snpindist(1) 276 | 277 | if(VCE) then 278 | scale=(dble(included)*sum(g**2) + vara_ap*dfvara)/(dfvara+dble(included)) 279 | vara=rand_scaled_inverse_chi_square(dble(included)+dfvara,scale) 280 | gp=gpin*vara 281 | vare=(dot_product(res,res)+vare_ap*dfvare)/ (nnind+dfvare) 282 | vare=rand_scaled_inverse_chi_square(nnind+dfvare,vare) 283 | endif 284 | 285 | dirx=dble(snpindist)+delta 286 | p=rdirichlet(ndist,dirx) 287 | 288 | if(rep>burnin .and. mod(rep,thin)==0) then 289 | counter=counter+1 290 | gstore=gstore+g 291 | pstore=pstore+p 292 | mu_vare_store(1)=mu_vare_store(1)+mu 293 | mu_vare_store(2)=mu_vare_store(2)+included 294 | mu_vare_store(3)=mu_vare_store(3)+vara 295 | mu_vare_store(4)=mu_vare_store(4)+vare 296 | varstore=varstore+varindist 297 | snpstore=snpstore+snpindist 298 | do i=1,nloci 299 | jj=snptracker(i) 300 | indiststore(i,jj)=indiststore(i,jj)+1 301 | enddo 302 | write(25,'(i10,1x,i10,1x,2(E15.7,1x),20(i10,1x))',advance='no') rep, included , & 303 | vara, vare, snpindist 304 | write(25,'(20E15.7,1x)') varindist 305 | call flush(25) 306 | if(snpout) call output_snploc 307 | end if 308 | ! re-calibrate residuals 309 | !if(mod(rep,1000)==0) then 310 | !call compute_residuals_rhs 311 | !endif 312 | enddo each_cycle 313 | 314 | !posterior means 315 | gstore=gstore/counter 316 | pstore=pstore/counter 317 | mu_vare_store=mu_vare_store/counter 318 | varstore=varstore/counter 319 | snpstore=snpstore/counter 320 | do i=1,nloci 321 | indiststore(i,:)=indiststore(i,:)/counter 322 | enddo 323 | call output_model 324 | mu=mu_vare_store(1) 325 | call compute_dgv_rhs 326 | call write_dgv 327 | else ! end mcmc 328 | open(unit=21,file=logfil,status='unknown',form='formatted') 329 | write(21,901) 'Program BayesR' 330 | write(21,907) 'Run started at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 331 | write(21,902) 'Prefix for input files',trim(inprefix) 332 | write(21,902) 'Prefix for output files',trim(outprefix) 333 | write(21,903) 'Phenotype column',trait_pos 334 | write(21,903) 'No. of loci',nloci 335 | write(21,903) 'No. of individuals',nind 336 | write(21,903) 'No. of individuals to predict',nt 337 | call load_param 338 | call compute_dgv_rhs 339 | call write_dgv 340 | end if 341 | 342 | call date_and_time(date=cdate,time=ctime) 343 | wtime= omp_get_wtime() -wtime 344 | write(21,904) 'user time ', wtime/60.0d0 345 | write(21,907) 'Run ended at',cdate(1:4),cdate(5:6),cdate(7:8),ctime(1:2),ctime(3:4),ctime(5:6) 346 | close(21) 347 | 348 | 901 format(a) 349 | 902 format(a,t30,': ',a) 350 | 903 format(a,t30,'= ',i8) 351 | 904 format(a,t30,'= ',f20.6) 352 | 905 format(a,t30,'= ',10f10.5) 353 | 906 format(a,t30,'= ',2f10.6) 354 | 907 format(a20,1x,a4,'-',a2,'-',a2,' ',a2,':',a2,':',a2) 355 | end program bayesR 356 | -------------------------------------------------------------------------------- /old/src/baymods.f90: -------------------------------------------------------------------------------- 1 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 2 | ! normal distributions of SNP effects 3 | ! Copyright (C) 2014 Gerhard Moser 4 | ! 5 | ! This program is free software: you can redistribute it and/or modify 6 | ! it under the terms of the GNU General Public License as published by 7 | ! the Free Software Foundation, either version 3 of the License, or 8 | ! (at your option) any later version. 9 | ! 10 | ! This program is distributed in the hope that it will be useful, 11 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ! GNU General Public License for more details. 14 | 15 | ! You should have received a copy of the GNU General Public License! 16 | ! along with this program. If not, see 17 | 18 | module parz 19 | implicit none 20 | !Global variables 21 | integer :: nloci, nind, nt, ndist, numit, seed1, clock, ios, rep, & 22 | burnin, thin, ntrain, ntest,counter, trait_pos 23 | logical :: mcmc, snpout, permute 24 | !File names 25 | character(len=200) :: genfil, phenfil, bimfil, inprefix, outprefix, logfil, freqfil, & 26 | mbvfil, hypfil, locfil, modfil, paramfil 27 | ! Data 28 | double precision, dimension(:), allocatable :: why, pred, freqstore 29 | double precision, target, dimension(:,:), allocatable :: X 30 | ! Genetic variables 31 | integer, dimension(:), allocatable ::snpindist, snptracker 32 | double precision :: vara, vare, mu, scale 33 | double precision, dimension(:), allocatable :: p, gp, gpin, delta, g, yadj, & 34 | dirx, varindist 35 | ! BayesR specific 36 | logical :: VCE 37 | integer:: included, msize, mrep 38 | double precision :: logdetV, uhat, zz, rhs, lhs, v1, total_ssq, gk, vara_ap, vare_ap, dfvara, dfvare 39 | double precision, dimension(:), allocatable :: xpx, s, stemp 40 | double precision, pointer :: z(:) 41 | integer, allocatable, dimension(:)::permvec 42 | !Auxiliary variables 43 | integer:: indistflag, burn 44 | integer, dimension(:), allocatable ::trains 45 | double precision :: xhat, yhat, vary, sk, skk, r, ssculm, nnind, clike 46 | !Summary statistics 47 | integer:: nref 48 | double precision :: msep,bhat, ahat,corr 49 | ! Storage 50 | double precision, dimension(:), allocatable :: gstore, pstore, mu_vare_store, & 51 | snpstore, varstore 52 | double precision, dimension(:,:), allocatable :: indiststore 53 | 54 | double precision, dimension(:), allocatable :: log_p, log_gp, vare_gp 55 | double precision :: zz_vare 56 | end module parz 57 | 58 | module cmd_parser 59 | use parz 60 | implicit None 61 | 62 | integer :: narg, nopt 63 | character(len=1024) :: arg 64 | character(len=1024), allocatable, dimension(:) :: cmd_line, tmp_array 65 | 66 | integer, parameter :: & 67 | a_int = 1, & 68 | a_float = 2, & 69 | a_char = 3, & 70 | a_flag = 4 71 | 72 | type param 73 | integer, allocatable ,dimension(:) :: pos 74 | character(len=20), allocatable, dimension(:) :: key 75 | character(len=20), allocatable, dimension(:) :: argtype 76 | character(len=100), allocatable,dimension(:) :: desc 77 | integer, allocatable, dimension(:) :: kind 78 | character(len=200), allocatable,dimension(:) :: default 79 | end type param 80 | 81 | type(param) :: register 82 | 83 | 84 | contains 85 | 86 | subroutine alloc_register 87 | allocate(register%pos(nopt)) 88 | allocate(register%key(nopt)) 89 | allocate(register%argtype(nopt)) 90 | allocate(register%desc(nopt)) 91 | allocate(register%kind(nopt)) 92 | allocate(register%default(nopt)) 93 | end subroutine alloc_register 94 | 95 | subroutine init_register 96 | nopt =22 97 | call alloc_register 98 | call include_option(1, '-bfile' ,'[prefix]', 'prefix PLINK binary files' ,a_char, '') 99 | call include_option(2, '-out' ,'[prefix]', 'prefix for output' ,a_char, '') 100 | call include_option(3, '-n' ,'[num]', 'phenotype column' ,a_int, '1') 101 | call include_option(4, '-vara' ,'[num]', 'SNP variance prior' ,a_float, '0.01') 102 | call include_option(5, '-vare' ,'[num]', 'error variance prior' ,a_float, '0.01') 103 | call include_option(6, '-dfvara' ,'[num]', 'degrees of freedom Va' ,a_float, '-2.0') 104 | call include_option(7, '-dfvare' ,'[num]', 'degrees of freedom Ve' ,a_float, '-2.0') 105 | call include_option(8,'-delta' ,'[num]', 'prior for Dirichlet' ,a_float, '1.0') 106 | call include_option(9, '-msize' ,'[num]', 'number of SNPs in reduced update' ,a_int, '0') 107 | call include_option(10, '-mrep' ,'[num]', 'number of full cycles in reduced update' ,a_int, '5000') 108 | call include_option(11,'-numit' ,'[num]', 'length of MCMC chain' ,a_int, '50000') 109 | call include_option(12,'-burnin' ,'[num]', 'burnin steps' ,a_int, '20000') 110 | call include_option(13,'-thin' ,'[num]', 'thinning rate' ,a_int, '10') 111 | call include_option(14,'-ndist' ,'[num]', 'number of mixture distributions' ,a_int, '4') 112 | call include_option(15,'-gpin' ,'[num]', 'effect sizes of mixtures (% x Va)' ,a_float, '0.0,0.0001,0.001,0.01') 113 | call include_option(16,'-seed' ,'[num]', 'initial value for random number' ,a_int, '0') 114 | call include_option(17,'-predict','[flag]', 'perform prediction' ,a_flag, 'f') 115 | call include_option(18,'-snpout' ,'[flag]', 'output detailed SNP info' ,a_flag, 'f') 116 | call include_option(19,'-permute','[flag]', 'permute order of SNP' ,a_flag, 'f') 117 | call include_option(20,'-model' ,'[filename]','model summary file (for prediction) ' ,a_char, '') 118 | call include_option(21,'-freq' ,'[filename]','SNP frequency file (for prediction)' ,a_char, '') 119 | call include_option(22,'-param' ,'[filename]','SNP effect file (for prediction)' ,a_char, '') 120 | end subroutine init_register 121 | 122 | subroutine include_option(pos,key,argtype,desc,kind,default) 123 | implicit none 124 | integer :: pos 125 | character(len=*) :: key 126 | character(len=*) :: desc 127 | character(len=*) :: argtype 128 | integer :: kind 129 | character(len=*) :: default 130 | 131 | register%pos(pos)=pos 132 | register%key(pos)=trim(key) 133 | register%argtype(pos)=trim(argtype) 134 | register%desc(pos)=trim(desc) 135 | register%kind(pos)=kind 136 | register%default(pos)=trim(default) 137 | end subroutine include_option 138 | 139 | logical function str_match(str1,str2) 140 | implicit none 141 | character(*) :: str1, str2 142 | integer :: comp 143 | !exact match 144 | comp = index(trim(str1),trim(str2))*index(trim(str2),trim(str1)) 145 | str_match = .false. 146 | if (comp /= 0) str_match = .true. 147 | end function str_match 148 | 149 | integer function ntokens(line) 150 | !http://www.tek-tips.com/viewthread.cfm?qid=1688013 151 | character,intent(in):: line*(*) 152 | integer i, n, toks 153 | character(len=1) :: separator 154 | separator=',' 155 | i = 1; 156 | n = len_trim(line) 157 | toks = 0 158 | ntokens = 0 159 | do while(i <= n) 160 | do while(line(i:i) == separator) 161 | i = i + 1 162 | if (n < i) return 163 | enddo 164 | toks = toks + 1 165 | ntokens = toks 166 | do 167 | i = i + 1 168 | if (n < i) return 169 | if (line(i:i) == separator) exit 170 | enddo 171 | enddo 172 | end function ntokens 173 | 174 | subroutine tokenize(str,sep,dim,val) 175 | character(len=*), intent(in) :: str 176 | character(len=1), intent(in) :: sep 177 | integer, intent(in) :: dim 178 | character(len=128),dimension(dim), intent(out) :: val 179 | integer :: pos1, pos2, n 180 | 181 | pos1=1 182 | n=0 183 | do 184 | pos2 = index(str(pos1:), sep) 185 | if (pos2 == 0) then 186 | n=n+1 187 | val(n) = str(pos1:) 188 | exit 189 | endif 190 | n=n+1 191 | val(n) = str(pos1:pos1+pos2-2) 192 | pos1 = pos2+pos1 193 | enddo 194 | end subroutine tokenize 195 | 196 | subroutine get_cmdLine 197 | integer ::i 198 | 199 | narg = command_argument_count() 200 | allocate(cmd_line(narg)) 201 | do i=1,narg 202 | call get_command_argument(i,arg) 203 | cmd_line(i)=arg 204 | end do 205 | end subroutine get_cmdLine 206 | 207 | integer function cast_int(value) 208 | character(len=*) :: value 209 | read(value,*)cast_int 210 | end function cast_int 211 | 212 | real function cast_float(value) 213 | character(len=*) :: value 214 | read(value,*)cast_float 215 | end function cast_float 216 | 217 | logical function cast_logical(value) 218 | character(len=*) :: value 219 | cast_logical=.false. 220 | if(str_match(trim(value),'t')) cast_logical=.true. 221 | end function cast_logical 222 | 223 | logical function is_key(key) 224 | character(len=*) :: key 225 | character(len=2),parameter :: str='-' 226 | is_key=.false. 227 | if(str_match(trim(key(1:1)),str) .and..not. is_numeric(trim(key(2:2)))) is_key=.true. 228 | end function is_key 229 | 230 | logical function is_numeric(key) 231 | character(len=*) :: key 232 | integer :: value,ios 233 | is_numeric=.true. 234 | read(key,*,iostat=ios) value 235 | if(ios /=0)is_numeric=.false. 236 | end function is_numeric 237 | 238 | subroutine update_register 239 | integer :: i, k, kind 240 | character(len=1024) :: key 241 | character(len=100) :: err1, err2 242 | logical :: valid 243 | 244 | err1='Unknown command line option : ' 245 | err2='Missing argument for :' 246 | 247 | i=1 248 | do while (i.le.narg) 249 | key=trim(cmd_line(i)) 250 | k=1 251 | valid=.false. 252 | do while(k.le.nopt) 253 | if(str_match(key,trim(register%key(k)))) then 254 | kind=register%kind(k) 255 | valid=.true. 256 | if(kind==4) then 257 | register%default(k)='t' 258 | i=i+1 259 | else if(i==narg) then 260 | print *, trim(err2),trim(key),i 261 | stop 'ERROR: Problem parsing the command line arguments' 262 | valid=.false. 263 | else if(is_key(trim(cmd_line(i+1)))) then 264 | print *, trim(err2),trim(key),i 265 | stop 'ERROR: Problem parsing the command line arguments' 266 | else 267 | register%default(k)=trim(cmd_line(i+1)) 268 | valid=.true. 269 | i=i+2 270 | endif 271 | exit 272 | end if 273 | k=k+1 274 | valid=.false. 275 | enddo 276 | if(.not.valid) then 277 | print *, trim(err1),trim(key),i 278 | stop 'ERROR: Problem parsing the command line arguments' 279 | end if 280 | enddo 281 | end subroutine update_register 282 | 283 | subroutine parse_help 284 | integer :: i,k 285 | character(len=1024) :: key 286 | if(narg==0) then 287 | write(*,'(a)')adjustl('argument type description & 288 | & default') 289 | do k=1,nopt 290 | write(*,111) adjustl(register%key(k)),adjustl(register%argtype(k)), & 291 | adjustl(register%desc(k)), adjustl(register%default(k)) 292 | end do 293 | stop 294 | else 295 | do i=1,narg 296 | key=trim(cmd_line(i)) 297 | if(str_match(trim(key(1:2)),'-h')) then 298 | write(*,'(a)')adjustl('argument type description & 299 | & default') 300 | do k=1,nopt 301 | write(*,111) adjustl(register%key(k)),adjustl(register%argtype(k)), & 302 | adjustl(register%desc(k)), adjustl(register%default(k)) 303 | end do 304 | stop 305 | end if 306 | 111 format(a10,a12,a45,a25) 307 | end do 308 | end if 309 | end subroutine parse_help 310 | 311 | subroutine parse_out 312 | integer::i 313 | do i=1,nopt 314 | if(str_match(trim(register%key(i)),'-out')) then 315 | outprefix = trim(register%default(i)) 316 | logfil = trim(outprefix)//'.log' 317 | freqfil= trim(outprefix)//'.frq' 318 | mbvfil= trim(outprefix)//'.gv' 319 | hypfil= trim(outprefix)//'.hyp' 320 | locfil= trim(outprefix)//'.snp' 321 | modfil=trim(outprefix)//'.model' 322 | paramfil=trim(outprefix)//'.param' 323 | exit 324 | end if 325 | end do 326 | end subroutine parse_out 327 | 328 | subroutine parse_plink 329 | integer::i 330 | logical:: fileExist 331 | 332 | do i=1,nopt 333 | if(str_match(trim(register%key(i)),'-bfile')) then 334 | inprefix=trim(register%default(i)) 335 | genfil=trim(inprefix)//'.bed' 336 | inquire(file=genfil,exist=fileExist) 337 | if(.not.fileExist)then 338 | write(*,*)'file ',trim(genfil),' not found' 339 | stop 340 | end if 341 | phenfil=trim(inprefix)//'.fam' 342 | inquire(file=phenfil,exist=fileExist) 343 | if(.not.fileExist)then 344 | write(*,*)'file ',trim(phenfil),' not found' 345 | stop 346 | end if 347 | bimfil=trim(inprefix)//'.bim' 348 | inquire(file=bimfil,exist=fileExist) 349 | if(.not.fileExist)then 350 | write(*,*)'file ',trim(bimfil),' not found' 351 | stop 352 | end if 353 | exit 354 | end if 355 | enddo 356 | end subroutine parse_plink 357 | 358 | subroutine parse_trait_pos 359 | integer::i 360 | 361 | do i=1,nopt 362 | if(str_match(trim(register%key(i)),'-n')) then 363 | trait_pos = cast_int(register%default(i)) 364 | end if 365 | end do 366 | end subroutine parse_trait_pos 367 | 368 | subroutine parse_predict 369 | integer::i 370 | logical :: flag, fileExist 371 | mcmc=.true. 372 | do i=1,nopt 373 | if(str_match(trim(register%key(i)),'-predict')) then 374 | flag = cast_logical(register%default(i)) 375 | if(flag) mcmc=.false. 376 | end if 377 | end do 378 | if(.not.mcmc) then 379 | do i=1,nopt 380 | if(str_match(trim(register%key(i)),'-model')) then 381 | inprefix=trim(register%default(i)) 382 | if(str_match(trim(inprefix),' ')) stop 'Error: No model file specified' 383 | modfil=trim(inprefix) 384 | inquire(file=modfil,exist=fileExist) 385 | if(.not.fileExist)then 386 | write(*,*)'file ',trim(modfil),' not found' 387 | stop 388 | end if 389 | else if(str_match(trim(register%key(i)),'-freq')) then 390 | inprefix=trim(register%default(i)) 391 | if(str_match(trim(inprefix),' ')) stop 'Error: No SNP frequency file specified' 392 | freqfil=trim(inprefix) 393 | inquire(file=freqfil,exist=fileExist) 394 | if(.not.fileExist)then 395 | write(*,*)'file ',trim(freqfil),' not found' 396 | stop 397 | end if 398 | else if(str_match(trim(register%key(i)),'-param')) then 399 | inprefix=trim(register%default(i)) 400 | if(str_match(trim(inprefix),' ')) stop 'Error: No param file specified' 401 | paramfil=trim(inprefix) 402 | inquire(file=freqfil,exist=fileExist) 403 | if(.not.fileExist)then 404 | write(*,*)'file ',trim(paramfil),' not found' 405 | stop 406 | end if 407 | end if 408 | end do 409 | end if 410 | end subroutine parse_predict 411 | 412 | subroutine parse_ndist 413 | integer::i 414 | do i=1,nopt 415 | if(str_match(trim(register%key(i)),'-ndist')) then 416 | ndist = cast_int(register%default(i)) 417 | exit 418 | end if 419 | end do 420 | end subroutine parse_ndist 421 | 422 | subroutine parse_priors 423 | integer::i,k, nitem 424 | character(len=128), dimension(ndist) :: c_string 425 | 426 | do i=1,nopt 427 | if(str_match(trim(register%key(i)),'-vara')) then 428 | vara = cast_float(register%default(i)) 429 | else if(str_match(trim(register%key(i)),'-vare')) then 430 | vare = cast_float(register%default(i)) 431 | else if(str_match(trim(register%key(i)),'-dfvara')) then 432 | dfvara = cast_float(register%default(i)) 433 | else if(str_match(trim(register%key(i)),'-dfvare')) then 434 | dfvare = cast_float(register%default(i)) 435 | else if(str_match(trim(register%key(i)),'-gpin')) then 436 | nitem=ntokens(register%default(i)) 437 | if(nitem /= ndist) then 438 | print *, 'Error: Number of mixtue classes ',ndist 439 | print *,' but ',nitem,'effect sizes specified (gpin)' 440 | stop 441 | else 442 | call tokenize(trim(register%default(i)),',',ndist,c_string) 443 | do k=1,ndist 444 | gpin(k)=cast_float(trim(c_string(k))) 445 | enddo 446 | endif 447 | else if(str_match(trim(register%key(i)),'-delta')) then 448 | nitem=ntokens(register%default(i)) 449 | if(nitem==1) then 450 | call tokenize(trim(register%default(i)),',',1,c_string) 451 | delta=cast_float(trim(c_string(1))) 452 | else if(nitem /= ndist) then 453 | print *, 'Error: Number of mixtue classes',ndist 454 | print *,' but',nitem,'prior values for Dirichlet pecified (delta)' 455 | stop 456 | else 457 | call tokenize(trim(register%default(i)),',',ndist,c_string) 458 | do k=1,ndist 459 | delta(k)=cast_float(trim(c_string(k))) 460 | enddo 461 | endif 462 | end if 463 | end do 464 | end subroutine parse_priors 465 | 466 | subroutine parse_initialise 467 | integer::i 468 | do i=1,nopt 469 | if(str_match(trim(register%key(i)),'-msize')) then 470 | msize = cast_int(register%default(i)) 471 | permute=.true. 472 | else if(str_match(trim(register%key(i)),'-mrep')) then 473 | mrep = cast_int(register%default(i)) 474 | else if(str_match(trim(register%key(i)),'-numit')) then 475 | numit = cast_int(register%default(i)) 476 | else if(str_match(trim(register%key(i)),'-burnin')) then 477 | burnin= cast_int(register%default(i)) 478 | else if(str_match(trim(register%key(i)),'-thin')) then 479 | thin= cast_int(register%default(i)) 480 | else if(str_match(trim(register%key(i)),'-seed')) then 481 | seed1= cast_int(register%default(i)) 482 | else if(str_match(trim(register%key(i)),'-snpout')) then 483 | snpout= cast_logical(register%default(i)) 484 | else if(str_match(trim(register%key(i)),'-permute')) then 485 | permute = cast_logical(register%default(i)) 486 | endif 487 | end do 488 | end subroutine parse_initialise 489 | 490 | subroutine parse 491 | call init_register 492 | call get_cmdLine 493 | call parse_help 494 | call update_register 495 | call parse_out 496 | call parse_plink 497 | call parse_trait_pos 498 | call parse_predict 499 | call parse_ndist 500 | call parse_initialise 501 | end subroutine parse 502 | 503 | end module cmd_parser 504 | 505 | 506 | module routinez 507 | use parz 508 | implicit none 509 | 510 | contains 511 | 512 | subroutine get_size() 513 | character(len=3) :: cdum 514 | nind=0 515 | open(35,file=trim(phenfil),status='old',form='formatted') 516 | do 517 | read(35,*,iostat=ios) cdum 518 | if (ios.ne.0) exit 519 | nind=nind+1 520 | enddo 521 | close(35,status='keep') 522 | nloci=0 523 | open(36,file=trim(bimfil),status='old',form='formatted') 524 | do 525 | nloci=nloci+1 526 | read(36,*,iostat=ios) cdum 527 | if (ios.ne.0) exit 528 | enddo 529 | close(36,status='keep') 530 | nloci=nloci-1 531 | end subroutine get_size 532 | 533 | !subroutine load_phenos_sim() 534 | !integer :: i 535 | ! why=0 536 | ! trains=0 537 | !! open(31,file=trim(phenfil),status='old',form='formatted') 538 | ! do i=1,nind 539 | ! read(31,*) trains(i),why(i) 540 | ! enddo 541 | ! close(unit=31,status='keep') 542 | !end subroutine load_phenos_sim 543 | 544 | subroutine load_phenos_plink() 545 | character(len=1024):: str 546 | character(len=20) :: why_str 547 | integer ::pos1, pos2,n ,i 548 | 549 | allocate(trains(nind), why(nind)) 550 | open(31,file=trim(phenfil),status='old',form='formatted') 551 | do i=1,nind 552 | read(31,'(a)') str 553 | pos1=1 554 | n=0 555 | do 556 | pos2 = index(str(pos1:), " ") 557 | if (pos2 == 0) then 558 | n=n+1 559 | why_str = str(pos1:) 560 | exit 561 | endif 562 | n=n+1 563 | why_str = str(pos1:pos1+pos2-2) 564 | if (n== trait_pos+5) then 565 | exit 566 | endif 567 | pos1 = pos2+pos1 568 | enddo 569 | why_str=trim(why_str) 570 | if(why_str /= 'NA') then 571 | trains(i)=0 572 | read(why_str,*) why(i) 573 | else 574 | trains(i)=1 575 | why(i)=-9999 576 | endif 577 | enddo 578 | close(unit=31,status='keep') 579 | end subroutine load_phenos_plink 580 | 581 | subroutine load_snp_binary() 582 | integer :: i, j,k, tr 583 | integer*1 :: b1 584 | double precision, dimension(0:3) :: igen 585 | double precision :: val 586 | igen(0)=0.0d0 587 | igen(1)=3.0d0 588 | igen(2)=1.0d0 589 | igen(3)=2.0d0 590 | 591 | open (unit=41,file=trim(genfil),status='old',access='stream',form='unformatted') 592 | read(41)b1 !plink magic number 1 593 | if (.not.btest(b1,0).and..not.btest(b1,1).and.btest(b1,2).and.btest(b1,3).and.& 594 | & .not.btest(b1,4).and.btest(b1,5).and.btest(b1,6).and..not.btest(b1,7)) then 595 | write(21,'(a)') 'Plink magic number 1 - ok' 596 | else 597 | write(*,*) 'Binary genotype file may not be a plink file' 598 | write(21,'(a)') 'Binary genotype file may not be a plink file' 599 | call flush(21) 600 | end if 601 | 602 | read(41)b1 !plink magic number 2 603 | if (btest(b1,0).and.btest(b1,1).and..not.btest(b1,2).and.btest(b1,3).and.& 604 | & btest(b1,4).and..not.btest(b1,5).and..not.btest(b1,6).and..not.btest(b1,7)) then 605 | write(21,'(a)') 'Plink magic number 2 - ok' 606 | else 607 | write(*,*) 'Binary genotype file may not be a plink file' 608 | write(21,'(a)') 'Binary genotype file may not be a plink file' 609 | call flush(21) 610 | end if 611 | 612 | read(41)b1 !mode 613 | if (btest(b1,0)) then 614 | write(21,'(a)') 'SNP-major mode for PLINK .bed file' 615 | else 616 | write(*,'(a)') 'should not be individual mode - check >>>' 617 | write(21,'(a)') 'SNP file should not be in individual mode' 618 | call flush(21) 619 | end if 620 | 621 | do j=1,nloci 622 | k=0 623 | tr=1 624 | do i=1,nind 625 | if(k==0) read(41)b1 626 | val=igen(ibits(b1,k,2)) 627 | if(trains(i)==0) then 628 | X(tr,j)=val 629 | tr=tr+1 630 | endif 631 | k=mod(k+2,8) 632 | enddo 633 | enddo 634 | close(41,status='keep') 635 | end subroutine load_snp_binary 636 | 637 | subroutine init_random_seed() 638 | ! one integer for seed in parameter file 639 | ! seed1 >0: initialized with seed1 640 | integer :: i, n, clock 641 | integer,dimension(:), allocatable :: seed 642 | 643 | call random_seed(size = n) 644 | allocate(seed(n)) 645 | 646 | if (seed1 /= 0) then 647 | do i=1,n 648 | seed(i)=abs(seed1)+(i-1) 649 | enddo 650 | write(21,'(a,i8)') 'New seeds generated from seed1 ',seed1 651 | else 652 | write(21,*) 'new seeds generated from clock' 653 | call system_clock(count=clock) 654 | seed = clock + 37 * (/ (i - 1, i = 1, n) /) 655 | endif 656 | call random_seed(put = seed) 657 | deallocate(seed) 658 | end subroutine init_random_seed 659 | 660 | subroutine xcenter() 661 | !RESCALE DESIGN MATRIX SO THAT GENOTYPES ARE CHANGED FROM BEING CODED 662 | !AS 0,1,2 TO BEING CODED AS DEVIATIONS FROM ZERO 663 | integer :: j, nomiss 664 | double precision :: q, qtest 665 | double precision, dimension(nt) :: xtemp 666 | if(mcmc) then 667 | do j=1,nloci 668 | xtemp=X(:,j) 669 | nomiss=count(xtemp < 3.0d0) 670 | q=sum(xtemp,mask= xtemp < 3.0d0) / (2.0d0*nomiss) 671 | if(q==1.0d0 .or. q==0.0d0) then 672 | X(:,j)=0.0d0 673 | else 674 | where (xtemp >2.0d0) xtemp=2.0d0*q 675 | X(:,j)=(xtemp-2.0d0*q)/sqrt(2.0d0*q*(1.0d0-q)) 676 | endif 677 | freqstore(j)=q 678 | enddo 679 | open(45,file=trim(freqfil),status='unknown') 680 | do j=1,nloci 681 | write(45,'(F10.6)') freqstore(j) 682 | enddo 683 | close(45,status='keep') 684 | else 685 | open(45,file=trim(freqfil),status='unknown') 686 | do j=1,nloci 687 | read(45,'(E15.7)') freqstore(j) 688 | enddo 689 | close(45,status='keep') 690 | do j=1,nloci 691 | q=freqstore(j) 692 | if(q==1.0d0 .or. q==0.0d0) then 693 | X(:,j)=0.0d0 694 | else 695 | xtemp=X(:,j) 696 | nomiss=count(xtemp < 3) 697 | if(nomiss==0) then 698 | X(:,j)=0.0d0 699 | else 700 | qtest=dble(sum(xtemp,mask= xtemp < 3)) / (2.0d0*nomiss) 701 | where (xtemp >2.0d0) xtemp=2.0d0*qtest 702 | X(:,j)=(xtemp-2.0d0*q)/sqrt(2.0d0*q*(1.0d0-q)) 703 | endif 704 | endif 705 | enddo 706 | endif 707 | end subroutine xcenter 708 | 709 | subroutine allocate_data 710 | !trains keeps track of training (0) and test(1) individuals 711 | !swap around for predicition 712 | if(.not.mcmc) then 713 | where(trains==0) trains=3 714 | where(trains==1) trains=0 715 | where(trains==3) trains=1 716 | end if 717 | nt=count(trains==0) 718 | allocate(pred(nind), gpin(ndist), gp(ndist), p(ndist), & 719 | X(nt,nloci), delta(ndist),dirx(ndist), g(nloci), yadj(nt), & 720 | snpindist(ndist), varindist(ndist), z(nt), s(ndist), stemp(ndist), & 721 | xpx(nloci), gstore(nloci), snpstore(ndist), varstore(ndist), pstore(ndist), & 722 | indiststore(nloci,ndist), mu_vare_store(4), freqstore(nloci), permvec(nloci),& 723 | snptracker(nloci), log_p(ndist), log_gp(ndist),vare_gp(ndist), stat=ios) 724 | if( ios /= 0 )then 725 | write(21,'(a50)') 'ERROR :: Unable to allocate required storage' 726 | stop 'Unable to allocate required storage for data' 727 | call flush(21) 728 | endif 729 | end subroutine allocate_data 730 | 731 | subroutine permutate(p,n) 732 | integer :: n,p(n), k,j,i,ipj,itemp,m 733 | double precision :: u(100) 734 | do i=1,n 735 | p(i)=i 736 | enddo 737 | ! generate up to 100 u(0,1) numbers at a time. 738 | do i=1,n,100 739 | m=min(n-i+1,100) 740 | call random_number(u) 741 | do j=1,m 742 | ipj=i+j-1 743 | k=int(u(j)*(n-ipj+1))+ipj 744 | itemp=p(ipj) 745 | p(ipj)=p(k) 746 | p(k)=itemp 747 | enddo 748 | enddo 749 | end subroutine permutate 750 | 751 | subroutine compute_dgv 752 | integer :: i, tr 753 | tr=0 754 | pred=-9999.0d0 755 | do i=1,nind 756 | if(trains(i)==0) then 757 | tr=tr+1 758 | pred(i)=mu+dot_product(X(tr,1:nloci),gstore(1:nloci)) 759 | endif 760 | end do 761 | end subroutine compute_dgv 762 | 763 | subroutine write_dgv() 764 | integer :: i 765 | character(len=2) :: missvalue 766 | 767 | missvalue='NA' 768 | open(unit=61,file=mbvfil,status='unknown',form='formatted') 769 | do i=1,nind 770 | if (trains(i)==0) then 771 | !write (rchar, '(E15.7)') pred(i) 772 | !write(61,*)adjustl(rchar) 773 | write(61,'(E15.7)') pred(i) 774 | else 775 | write(61,'(a2)') missvalue 776 | end if 777 | enddo 778 | close(unit=61,status='keep') 779 | end subroutine write_dgv 780 | 781 | subroutine load_param() 782 | character(len=100):: str 783 | character(len=10):: dum 784 | integer :: i, nc, ios 785 | double precision, dimension(20):: gtemp 786 | 787 | open(31,file=paramfil,status='old',form='formatted') 788 | read(31,'(a)') str 789 | nc=ndist+1 790 | do i=1,nloci 791 | read(31,*,iostat=ios) gtemp(1:nc) 792 | gstore(i)=gtemp(nc) 793 | if(ios/=0) then 794 | write(21,'(a)') 'Error opening file ',adjustl(paramfil) 795 | call flush(21) 796 | end if 797 | enddo 798 | close(31) 799 | open(32,file=modfil,status='old',form='formatted') 800 | read(32,*) dum, mu 801 | close(32) 802 | end subroutine load_param 803 | 804 | subroutine output_model 805 | integer :: i 806 | character(LEN=10) :: ci,ca 807 | 808 | open(unit=10,file=paramfil,status='unknown',iostat=ios) 809 | if(ios/=0) then 810 | write(21,*) 'Error opening ',trim(paramfil) 811 | stop 812 | end if 813 | do i=1,ndist 814 | write(ci,'(I8)') i 815 | ci=adjustl(ci) 816 | ca="PIP"//trim(ci) 817 | write(10,'(2(A5))',advance="no") ' ',ca 818 | end do 819 | write(10,*) ' beta' 820 | do i=1,nloci 821 | write(10,'(50(E15.7,1X))') indiststore(i,:), gstore(i) 822 | enddo 823 | close(10,status='keep') 824 | 825 | open(unit=12,file=modfil,status='unknown',iostat=ios) 826 | if(ios/=0) then 827 | write(21,*) 'Error opening ',trim(modfil) 828 | stop 829 | end if 830 | write(12,800) 'Mean',mu_vare_store(1) 831 | write(12,800) 'Nsnp',mu_vare_store(2) 832 | write(12,800) 'Va',mu_vare_store(3) 833 | write(12,800) 'Ve', mu_vare_store(4) 834 | do i=1,ndist 835 | write(ci,'(I8)') i 836 | ci=adjustl(ci) 837 | ca="Nk"//trim(adjustl(ci)) 838 | write(12,800) ca,snpstore(i) 839 | end do 840 | do i=1,ndist 841 | write(ci,'(I8)') i 842 | ci=adjustl(ci) 843 | ca="Pk"//trim(adjustl(ci)) 844 | write(12,800) ca,pstore(i) 845 | end do 846 | do i=1,ndist 847 | write(ci,'(I8)') i 848 | ci=adjustl(ci) 849 | ca="Vk"//trim(adjustl(ci)) 850 | write(12,800) ca,varstore(i) 851 | end do 852 | close(12,status='keep') 853 | 854 | 800 format(a,t10,E15.7) 855 | end subroutine output_model 856 | 857 | subroutine compute_residuals() 858 | integer :: tr, i 859 | tr=0 860 | do i=1,nind 861 | if(trains(i)==0) then 862 | tr=tr+1 863 | yadj(tr)=why(i)-dot_product(X(tr,1:nloci),g)-mu 864 | endif 865 | enddo 866 | end subroutine compute_residuals 867 | 868 | subroutine output_snploc 869 | integer :: i,j 870 | character(LEN=20) :: ci, cg, ce 871 | character(len=1) :: double = ":" 872 | 873 | ! convert int to char 874 | !write(ci,'(I8)') rep 875 | !ci=adjustl(ci) 876 | 877 | ! ! write SNP effects in sparse format 878 | do i=1,nloci 879 | j= snptracker(i) 880 | if(j>1) then 881 | write(ci,'(I8)') i 882 | ci=adjustl(ci) 883 | write(cg,'(I8)') j 884 | cg=adjustl(cg) 885 | write(ce,'(e15.6)') g(i)**2 886 | ce=adjustl(ce) 887 | write(14,'(1X,a,a,a,a,a)',advance='no') trim(cg),double,trim(ci),double,trim(ce) 888 | endif 889 | enddo 890 | write(14,*) 891 | end subroutine output_snploc 892 | 893 | end module routinez 894 | -------------------------------------------------------------------------------- /old/src/baymodsv2.f90: -------------------------------------------------------------------------------- 1 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 2 | ! normal distributions of SNP effects 3 | ! Copyright (C) 2014 Gerhard Moser 4 | ! 5 | ! This program is free software: you can redistribute itg and/or modify 6 | ! it under the terms of the GNU General Public License as published by 7 | ! the Free Software Foundation, either version 3 of the License, or 8 | ! (at your option) any later version. 9 | ! 10 | ! This program is distributed in the hope that it will be useful, 11 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ! GNU General Public License for more details. 14 | 15 | ! You should have received a copy of the GNU General Public License! 16 | ! along with this program. If not, see 17 | 18 | module parz 19 | implicit none 20 | !Global variables 21 | integer :: nloci, nind, nt, ndist, numit, seed1, clock, ios, rep, & 22 | burnin, thin, ntrain, ntest,counter, trait_pos 23 | logical :: mcmc, snpout, permute 24 | !File names 25 | character(len=200) :: genfil, phenfil, bimfil, inprefix, outprefix, logfil, freqfil, & 26 | mbvfil, hypfil, locfil, modfil, paramfil 27 | ! Data 28 | double precision, dimension(:), allocatable :: why, pred, freqstore 29 | integer(kind=1), dimension(:,:), allocatable :: X 30 | ! Genetic variables 31 | integer, dimension(:), allocatable ::snpindist, snptracker 32 | double precision :: vara, vare, mu, scale 33 | double precision, dimension(:), allocatable :: p, gp, gpin, delta, g, g_old, res, & 34 | dirx, varindist, res_old, res_null 35 | ! BayesR specific 36 | logical :: VCE 37 | integer:: included, msize, mrep 38 | double precision :: logdetV, uhat, zz, lhs, v1, total_ssq, rhs, gk, go, vara_ap, vare_ap, dfvara, dfvare 39 | double precision, dimension(:), allocatable :: xpx, s, stemp 40 | integer, allocatable, dimension(:)::permvec 41 | ! rhs update 42 | integer :: block_size, rhs_ncol, n_blocks, t_blocks, rest_size, pos, bl, & 43 | t_size, b_size, nthreads 44 | integer, parameter :: ngeno=4 45 | integer, dimension(:,:),allocatable :: rhs_block, rhs_ind, block_info 46 | double precision, dimension(:,:), allocatable :: geno_mean, rhs_count,bres 47 | double precision, dimension(:), allocatable :: class_sum, ny2, delta_e,delta_res, gbl, xe, & 48 | resvec, resvec_temp 49 | integer, dimension(:), allocatable :: s_loc, shufflevec, lookup,map,countvec, countvec_temp 50 | logical :: shuffle 51 | !Auxiliary variables 52 | integer:: indistflag, burn 53 | integer, dimension(:), allocatable ::trains 54 | double precision :: xhat, yhat, vary, sk, skk, r, ssculm, nnind, clike 55 | !Summary statistics 56 | integer:: nref 57 | double precision :: msep,bhat, ahat,corr 58 | ! Storage 59 | double precision, dimension(:), allocatable :: gstore, pstore, mu_vare_store, & 60 | snpstore, varstore 61 | double precision, dimension(:,:), allocatable :: indiststore 62 | 63 | double precision, dimension(:), allocatable :: log_p, log_gp, vare_gp 64 | double precision :: zz_vare 65 | end module parz 66 | 67 | module cmd_parser 68 | use parz 69 | implicit None 70 | 71 | integer :: narg, nopt 72 | character(len=1024) :: arg 73 | character(len=1024), allocatable, dimension(:) :: cmd_line, tmp_array 74 | 75 | integer, parameter :: & 76 | a_int = 1, & 77 | a_float = 2, & 78 | a_char = 3, & 79 | a_flag = 4 80 | 81 | type param 82 | integer, allocatable ,dimension(:) :: pos 83 | character(len=20), allocatable, dimension(:) :: key 84 | character(len=20), allocatable, dimension(:) :: argtype 85 | character(len=100), allocatable,dimension(:) :: desc 86 | integer, allocatable, dimension(:) :: kind 87 | character(len=200), allocatable,dimension(:) :: default 88 | end type param 89 | 90 | type(param) :: register 91 | 92 | contains 93 | 94 | subroutine alloc_register 95 | allocate(register%pos(nopt)) 96 | allocate(register%key(nopt)) 97 | allocate(register%argtype(nopt)) 98 | allocate(register%desc(nopt)) 99 | allocate(register%kind(nopt)) 100 | allocate(register%default(nopt)) 101 | end subroutine alloc_register 102 | 103 | subroutine init_register 104 | nopt =25 105 | call alloc_register 106 | call include_option(1, '-bfile' ,'[prefix]', 'prefix PLINK binary files' ,a_char, '') 107 | call include_option(2, '-out' ,'[prefix]', 'prefix for output' ,a_char, '') 108 | call include_option(3, '-n' ,'[num]', 'phenotype column' ,a_int, '1') 109 | call include_option(4, '-vara' ,'[num]', 'SNP variance prior' ,a_float, '0.01') 110 | call include_option(5, '-vare' ,'[num]', 'error variance prior' ,a_float, '0.01') 111 | call include_option(6, '-dfvara' ,'[num]', 'degrees of freedom Va' ,a_float, '-2.0') 112 | call include_option(7, '-dfvare' ,'[num]', 'degrees of freedom Ve' ,a_float, '-2.0') 113 | call include_option(8,'-delta' ,'[num]', 'prior for Dirichlet' ,a_float, '1.0') 114 | call include_option(9, '-msize' ,'[num]', 'number of SNPs in reduced update' ,a_int, '0') 115 | call include_option(10, '-mrep' ,'[num]', 'number of full cycles in reduced update' ,a_int, '5000') 116 | call include_option(11,'-numit' ,'[num]', 'length of MCMC chain' ,a_int, '50000') 117 | call include_option(12,'-burnin' ,'[num]', 'burnin steps' ,a_int, '20000') 118 | call include_option(13,'-thin' ,'[num]', 'thinning rate' ,a_int, '10') 119 | call include_option(14,'-ndist' ,'[num]', 'number of mixture distributions' ,a_int, '4') 120 | call include_option(15,'-gpin' ,'[num]', 'effect sizes of mixtures (% x Va)' ,a_float, '0.0,0.0001,0.001,0.01') 121 | call include_option(16,'-seed' ,'[num]', 'initial value for random number' ,a_int, '0') 122 | call include_option(17,'-predict','[flag]', 'perform prediction' ,a_flag, 'f') 123 | call include_option(18,'-snpout' ,'[flag]', 'output detailed SNP info' ,a_flag, 'f') 124 | call include_option(19,'-permute','[flag]', 'permute order of SNP' ,a_flag, 'f') 125 | call include_option(20,'-model' ,'[filename]','model summary file (for prediction) ' ,a_char, '') 126 | call include_option(21,'-freq' ,'[filename]','SNP frequency file (for prediction)' ,a_char, '') 127 | call include_option(22,'-param' ,'[filename]','SNP effect file (for prediction)' ,a_char, '') 128 | call include_option(23,'-blocksize' ,'[num]' ,'Number of SNP in rhs block' ,a_int, '4') 129 | call include_option(24,'-nthreads' ,'[num]' ,'Number of threads' ,a_int, '4') 130 | call include_option(25,'-shuffle' , '[flag]' ,'permute order of blocks' ,a_flag, 'f') 131 | end subroutine init_register 132 | 133 | subroutine include_option(pos,key,argtype,desc,kind,default) 134 | implicit none 135 | integer :: pos 136 | character(len=*) :: key 137 | character(len=*) :: desc 138 | character(len=*) :: argtype 139 | integer :: kind 140 | character(len=*) :: default 141 | 142 | register%pos(pos)=pos 143 | register%key(pos)=trim(key) 144 | register%argtype(pos)=trim(argtype) 145 | register%desc(pos)=trim(desc) 146 | register%kind(pos)=kind 147 | register%default(pos)=trim(default) 148 | end subroutine include_option 149 | 150 | logical function str_match(str1,str2) 151 | implicit none 152 | character(*) :: str1, str2 153 | integer :: comp 154 | !exact match 155 | comp = index(trim(str1),trim(str2))*index(trim(str2),trim(str1)) 156 | str_match = .false. 157 | if (comp /= 0) str_match = .true. 158 | end function str_match 159 | 160 | integer function ntokens(line) 161 | !http://www.tek-tips.com/viewthread.cfm?qid=1688013 162 | character,intent(in):: line*(*) 163 | integer i, n, toks 164 | character(len=1) :: separator 165 | separator=',' 166 | i = 1; 167 | n = len_trim(line) 168 | toks = 0 169 | ntokens = 0 170 | do while(i <= n) 171 | do while(line(i:i) == separator) 172 | i = i + 1 173 | if (n < i) return 174 | enddo 175 | toks = toks + 1 176 | ntokens = toks 177 | do 178 | i = i + 1 179 | if (n < i) return 180 | if (line(i:i) == separator) exit 181 | enddo 182 | enddo 183 | end function ntokens 184 | 185 | subroutine tokenize(str,sep,dim,val) 186 | character(len=*), intent(in) :: str 187 | character(len=1), intent(in) :: sep 188 | integer, intent(in) :: dim 189 | character(len=128),dimension(dim), intent(out) :: val 190 | integer :: pos1, pos2, n 191 | 192 | pos1=1 193 | n=0 194 | do 195 | pos2 = index(str(pos1:), sep) 196 | if (pos2 == 0) then 197 | n=n+1 198 | val(n) = str(pos1:) 199 | exit 200 | endif 201 | n=n+1 202 | val(n) = str(pos1:pos1+pos2-2) 203 | pos1 = pos2+pos1 204 | enddo 205 | end subroutine tokenize 206 | 207 | subroutine get_cmdLine 208 | integer ::i 209 | 210 | narg = command_argument_count() 211 | allocate(cmd_line(narg)) 212 | do i=1,narg 213 | call get_command_argument(i,arg) 214 | cmd_line(i)=arg 215 | end do 216 | end subroutine get_cmdLine 217 | 218 | integer function cast_int(value) 219 | character(len=*) :: value 220 | read(value,*)cast_int 221 | end function cast_int 222 | 223 | double precision function cast_float(value) 224 | character(len=*) :: value 225 | read(value,*)cast_float 226 | end function cast_float 227 | 228 | logical function cast_logical(value) 229 | character(len=*) :: value 230 | cast_logical=.false. 231 | if(str_match(trim(value),'t')) cast_logical=.true. 232 | end function cast_logical 233 | 234 | logical function is_key(key) 235 | character(len=*) :: key 236 | integer :: isnum 237 | character(len=2),parameter :: str='-' 238 | is_key=.false. 239 | if(str_match(trim(key(1:1)),str) .and..not. is_numeric(trim(key(2:2)))) is_key=.true. 240 | end function is_key 241 | 242 | logical function is_numeric(key) 243 | character(len=*) :: key 244 | integer :: value,ios 245 | is_numeric=.true. 246 | read(key,*,iostat=ios) value 247 | if(ios /=0)is_numeric=.false. 248 | end function is_numeric 249 | 250 | subroutine update_register 251 | integer :: i, k, kind 252 | character(len=1024) :: key 253 | character(len=100) :: err1, err2 254 | logical :: valid 255 | 256 | err1='Unknown command line option : ' 257 | err2='Missing argumnet for :' 258 | 259 | i=1 260 | do while (i.le.narg) 261 | key=trim(cmd_line(i)) 262 | k=1 263 | valid=.false. 264 | do while(k.le.nopt) 265 | if(str_match(key,trim(register%key(k)))) then 266 | kind=register%kind(k) 267 | valid=.true. 268 | if(kind==4) then 269 | register%default(k)='t' 270 | i=i+1 271 | else if(i==narg) then 272 | print *, trim(err2),trim(key),i 273 | stop 'ERROR: Problem parsing the command line arguments' 274 | valid=.false. 275 | else if(is_key(trim(cmd_line(i+1)))) then 276 | print *, trim(err2),trim(key),i 277 | stop 'ERROR: Problem parsing the command line arguments' 278 | else 279 | register%default(k)=trim(cmd_line(i+1)) 280 | valid=.true. 281 | i=i+2 282 | endif 283 | exit 284 | end if 285 | k=k+1 286 | valid=.false. 287 | enddo 288 | if(.not.valid) then 289 | print *, trim(err1),trim(key),i 290 | stop 'ERROR: Problem parsing the command line arguments' 291 | end if 292 | enddo 293 | end subroutine update_register 294 | 295 | subroutine parse_help 296 | integer :: i,k 297 | character(len=1024) :: key 298 | if(narg==0) then 299 | write(*,'(a)')adjustl('argument type description & 300 | & default') 301 | do k=1,nopt 302 | write(*,111) adjustl(register%key(k)),adjustl(register%argtype(k)), & 303 | adjustl(register%desc(k)), adjustl(register%default(k)) 304 | end do 305 | stop 306 | else 307 | do i=1,narg 308 | key=trim(cmd_line(i)) 309 | if(str_match(trim(key(1:2)),'-h')) then 310 | write(*,'(a)')adjustl('argument type description & 311 | & default') 312 | do k=1,nopt 313 | write(*,111) adjustl(register%key(k)),adjustl(register%argtype(k)), & 314 | adjustl(register%desc(k)), adjustl(register%default(k)) 315 | end do 316 | stop 317 | end if 318 | 111 format(a10,a12,a45,a25) 319 | end do 320 | end if 321 | end subroutine parse_help 322 | 323 | subroutine parse_out 324 | integer::i 325 | do i=1,nopt 326 | if(str_match(trim(register%key(i)),'-out')) then 327 | outprefix = trim(register%default(i)) 328 | logfil = trim(outprefix)//'.log' 329 | freqfil= trim(outprefix)//'.frq' 330 | mbvfil= trim(outprefix)//'.gv' 331 | hypfil= trim(outprefix)//'.hyp' 332 | locfil= trim(outprefix)//'.snp' 333 | modfil=trim(outprefix)//'.model' 334 | paramfil=trim(outprefix)//'.param' 335 | exit 336 | end if 337 | end do 338 | end subroutine parse_out 339 | 340 | subroutine parse_plink 341 | integer::i 342 | logical:: fileExist 343 | 344 | do i=1,nopt 345 | if(str_match(trim(register%key(i)),'-bfile')) then 346 | inprefix=trim(register%default(i)) 347 | genfil=trim(inprefix)//'.bed' 348 | inquire(file=genfil,exist=fileExist) 349 | if(.not.fileExist)then 350 | write(*,*)'file ',trim(genfil),' not found' 351 | stop 352 | end if 353 | phenfil=trim(inprefix)//'.fam' 354 | inquire(file=phenfil,exist=fileExist) 355 | if(.not.fileExist)then 356 | write(*,*)'file ',trim(phenfil),' not found' 357 | stop 358 | end if 359 | bimfil=trim(inprefix)//'.bim' 360 | inquire(file=bimfil,exist=fileExist) 361 | if(.not.fileExist)then 362 | write(*,*)'file ',trim(bimfil),' not found' 363 | stop 364 | end if 365 | exit 366 | end if 367 | enddo 368 | end subroutine parse_plink 369 | 370 | subroutine parse_trait_pos 371 | integer::i 372 | 373 | do i=1,nopt 374 | if(str_match(trim(register%key(i)),'-n')) then 375 | trait_pos = cast_int(register%default(i)) 376 | end if 377 | end do 378 | end subroutine parse_trait_pos 379 | 380 | subroutine parse_predict 381 | integer::i 382 | logical :: flag, fileExist 383 | mcmc=.true. 384 | do i=1,nopt 385 | if(str_match(trim(register%key(i)),'-predict')) then 386 | flag = cast_logical(register%default(i)) 387 | if(flag) mcmc=.false. 388 | end if 389 | end do 390 | if(.not.mcmc) then 391 | do i=1,nopt 392 | if(str_match(trim(register%key(i)),'-model')) then 393 | inprefix=trim(register%default(i)) 394 | if(str_match(trim(inprefix),' ')) stop 'Error: No model file specified' 395 | modfil=trim(inprefix) 396 | inquire(file=modfil,exist=fileExist) 397 | if(.not.fileExist)then 398 | write(*,*)'file ',trim(modfil),' not found' 399 | stop 400 | end if 401 | else if(str_match(trim(register%key(i)),'-freq')) then 402 | inprefix=trim(register%default(i)) 403 | if(str_match(trim(inprefix),' ')) stop 'Error: No SNP frequency file specified' 404 | freqfil=trim(inprefix) 405 | inquire(file=freqfil,exist=fileExist) 406 | if(.not.fileExist)then 407 | write(*,*)'file ',trim(freqfil),' not found' 408 | stop 409 | end if 410 | else if(str_match(trim(register%key(i)),'-param')) then 411 | inprefix=trim(register%default(i)) 412 | if(str_match(trim(inprefix),' ')) stop 'Error: No param file specified' 413 | paramfil=trim(inprefix) 414 | inquire(file=freqfil,exist=fileExist) 415 | if(.not.fileExist)then 416 | write(*,*)'file ',trim(paramfil),' not found' 417 | stop 418 | end if 419 | end if 420 | end do 421 | end if 422 | end subroutine parse_predict 423 | 424 | subroutine parse_ndist 425 | integer::i 426 | do i=1,nopt 427 | if(str_match(trim(register%key(i)),'-ndist')) then 428 | ndist = cast_int(register%default(i)) 429 | exit 430 | end if 431 | end do 432 | end subroutine parse_ndist 433 | 434 | subroutine parse_priors 435 | integer::i,k, nitem 436 | character(len=128), dimension(ndist) :: c_string 437 | 438 | do i=1,nopt 439 | if(str_match(trim(register%key(i)),'-vara')) then 440 | vara = cast_float(register%default(i)) 441 | else if(str_match(trim(register%key(i)),'-vare')) then 442 | vare = cast_float(register%default(i)) 443 | else if(str_match(trim(register%key(i)),'-dfvara')) then 444 | dfvara = cast_float(register%default(i)) 445 | else if(str_match(trim(register%key(i)),'-dfvare')) then 446 | dfvare = cast_float(register%default(i)) 447 | else if(str_match(trim(register%key(i)),'-gpin')) then 448 | nitem=ntokens(register%default(i)) 449 | if(nitem /= ndist) then 450 | print *, 'Error: Number of mixtue classes ',ndist 451 | print *,' but ',nitem,'effect sizes specified (gpin)' 452 | stop 453 | else 454 | call tokenize(trim(register%default(i)),',',ndist,c_string) 455 | do k=1,ndist 456 | gpin(k)=cast_float(trim(c_string(k))) 457 | enddo 458 | endif 459 | else if(str_match(trim(register%key(i)),'-delta')) then 460 | nitem=ntokens(register%default(i)) 461 | if(nitem==1) then 462 | call tokenize(trim(register%default(i)),',',1,c_string) 463 | delta=cast_float(trim(c_string(1))) 464 | else if(nitem /= ndist) then 465 | print *, 'Error: Number of mixtue classes',ndist 466 | print *,' but',nitem,'prior values for Dirichlet pecified (delta)' 467 | stop 468 | else 469 | call tokenize(trim(register%default(i)),',',ndist,c_string) 470 | do k=1,ndist 471 | delta(k)=cast_float(trim(c_string(k))) 472 | enddo 473 | endif 474 | end if 475 | end do 476 | end subroutine parse_priors 477 | 478 | subroutine parse_initialise 479 | integer::i 480 | do i=1,nopt 481 | if(str_match(trim(register%key(i)),'-msize')) then 482 | msize = cast_int(register%default(i)) 483 | permute=.true. 484 | else if(str_match(trim(register%key(i)),'-mrep')) then 485 | mrep = cast_int(register%default(i)) 486 | else if(str_match(trim(register%key(i)),'-numit')) then 487 | numit = cast_int(register%default(i)) 488 | else if(str_match(trim(register%key(i)),'-burnin')) then 489 | burnin= cast_int(register%default(i)) 490 | else if(str_match(trim(register%key(i)),'-thin')) then 491 | thin= cast_int(register%default(i)) 492 | else if(str_match(trim(register%key(i)),'-seed')) then 493 | seed1= cast_int(register%default(i)) 494 | else if(str_match(trim(register%key(i)),'-snpout')) then 495 | snpout= cast_logical(register%default(i)) 496 | else if(str_match(trim(register%key(i)),'-permute')) then 497 | permute = cast_logical(register%default(i)) 498 | else if(str_match(trim(register%key(i)),'-blocksize')) then 499 | block_size = cast_int(register%default(i)) 500 | nthreads=block_size 501 | else if(str_match(trim(register%key(i)),'-nthreads')) then 502 | nthreads = cast_int(register%default(i)) 503 | else if(str_match(trim(register%key(i)),'-shuffle')) then 504 | shuffle = cast_logical(register%default(i)) 505 | endif 506 | end do 507 | end subroutine parse_initialise 508 | 509 | subroutine parse 510 | call init_register 511 | call get_cmdLine 512 | call parse_help 513 | call update_register 514 | call parse_out 515 | call parse_plink 516 | call parse_trait_pos 517 | call parse_predict 518 | call parse_ndist 519 | call parse_initialise 520 | end subroutine parse 521 | 522 | end module cmd_parser 523 | 524 | module routinez 525 | use parz 526 | implicit none 527 | 528 | contains 529 | 530 | subroutine get_size() 531 | character(len=3) :: cdum 532 | nind=0 533 | open(35,file=trim(phenfil),status='old',form='formatted') 534 | do 535 | read(35,*,iostat=ios) cdum 536 | if (ios.ne.0) exit 537 | nind=nind+1 538 | enddo 539 | close(35,status='keep') 540 | nloci=0 541 | open(36,file=trim(bimfil),status='old',form='formatted') 542 | do 543 | nloci=nloci+1 544 | read(36,*,iostat=ios) cdum 545 | if (ios.ne.0) exit 546 | enddo 547 | close(36,status='keep') 548 | nloci=nloci-1 549 | end subroutine get_size 550 | 551 | subroutine load_phenos_plink() 552 | character(len=1024):: str 553 | character(len=20) :: why_str 554 | integer ::pos1, pos2,n ,i 555 | 556 | allocate(trains(nind), why(nind)) 557 | open(31,file=trim(phenfil),status='old',form='formatted') 558 | do i=1,nind 559 | read(31,'(a)') str 560 | pos1=1 561 | n=0 562 | do 563 | pos2 = index(str(pos1:), " ") 564 | if (pos2 == 0) then 565 | n=n+1 566 | why_str = str(pos1:) 567 | exit 568 | endif 569 | n=n+1 570 | why_str = str(pos1:pos1+pos2-2) 571 | if (n== trait_pos+5) then 572 | exit 573 | endif 574 | pos1 = pos2+pos1 575 | enddo 576 | why_str=trim(why_str) 577 | if(why_str /= 'NA') then 578 | trains(i)=0 579 | read(why_str,*) why(i) 580 | else 581 | trains(i)=1 582 | why(i)=-9999 583 | endif 584 | enddo 585 | close(unit=31,status='keep') 586 | end subroutine load_phenos_plink 587 | 588 | subroutine load_snp_binary() 589 | integer :: i, j,k, tr 590 | integer(kind=1) :: b1 591 | integer(kind=1), dimension(0:3) :: igen 592 | integer(kind=1) :: val 593 | igen(0)=0 594 | igen(1)=3 595 | igen(2)=1 596 | igen(3)=2 597 | 598 | open (unit=41,file=trim(genfil),status='old',access='stream',form='unformatted') 599 | read(41)b1 !plink magic number 1 600 | if (.not.btest(b1,0).and..not.btest(b1,1).and.btest(b1,2).and.btest(b1,3).and.& 601 | & .not.btest(b1,4).and.btest(b1,5).and.btest(b1,6).and..not.btest(b1,7)) then 602 | write(21,'(a)') 'Plink magic number 1 - ok' 603 | else 604 | write(*,*) 'Binary genotype file may not be a plink file' 605 | write(21,'(a)') 'Binary genotype file may not be a plink file' 606 | call flush(21) 607 | end if 608 | read(41)b1 !plink magic number 2 609 | if (btest(b1,0).and.btest(b1,1).and..not.btest(b1,2).and.btest(b1,3).and.& 610 | & btest(b1,4).and..not.btest(b1,5).and..not.btest(b1,6).and..not.btest(b1,7)) then 611 | write(21,'(a)') 'Plink magic number 2 - ok' 612 | else 613 | write(*,*) 'Binary genotype file may not be a plink file' 614 | write(21,'(a)') 'Binary genotype file may not be a plink file' 615 | call flush(21) 616 | end if 617 | read(41)b1 !mode 618 | do j=1,nloci 619 | k=0 620 | tr=1 621 | do i=1,nind 622 | if(k==0) read(41)b1 623 | val=igen(ibits(b1,k,2)) 624 | if(trains(i)==0) then 625 | X(tr,j)=val 626 | tr=tr+1 627 | endif 628 | k=mod(k+2,8) 629 | enddo 630 | enddo 631 | close(41,status='keep') 632 | end subroutine load_snp_binary 633 | 634 | subroutine init_random_seed() 635 | ! one integer for seed in parameter file 636 | ! seed1 >0: initialized with seed1 637 | integer :: i, n, clock 638 | integer,dimension(:), allocatable :: seed 639 | 640 | call random_seed(size = n) 641 | allocate(seed(n)) 642 | 643 | if (seed1 /= 0) then 644 | do i=1,n 645 | seed(i)=abs(seed1)+(i-1) 646 | enddo 647 | write(21,'(a,i8)') 'New seeds generated from seed1 ',seed1 648 | else 649 | write(21,*) 'new seeds generated from clock' 650 | call system_clock(count=clock) 651 | seed = clock + 37 * (/ (i - 1, i = 1, n) /) 652 | endif 653 | call random_seed(put = seed) 654 | deallocate(seed) 655 | end subroutine init_random_seed 656 | 657 | subroutine process_snp 658 | integer :: j,k, nomiss 659 | double precision :: q,qtest,stdev,mean 660 | integer, dimension(ngeno) :: gc 661 | integer, dimension(nt) :: xtemp 662 | if(mcmc) then 663 | xpx=0.0d0 664 | do j=1,nloci 665 | xtemp=X(:,j) 666 | gc=0 667 | nomiss=count(xtemp < 3) 668 | q=dble(sum(xtemp,mask= xtemp < 3)) / (2.0d0*nomiss) 669 | mean=2.0d0*q 670 | stdev=dsqrt(mean*(1.0d0-q)) 671 | if(q==1.0d0 .or. q==0.0d0) then 672 | geno_mean(:,j)=0.0d0 673 | xpx(j)=0.0d0 674 | else 675 | do k=1,ngeno 676 | gc(k)=count(xtemp==(k-1)) 677 | enddo 678 | geno_mean(0,j)=(0.0d0-mean)/stdev 679 | geno_mean(1,j)=(1.0d0-mean)/stdev 680 | geno_mean(2,j)=(2.d0-mean)/stdev 681 | geno_mean(3,j)=0.0d0 682 | xpx(j)=dot_product(dble(gc),geno_mean(:,j)**2) 683 | end if 684 | freqstore(j)=q 685 | enddo 686 | open(45,file=trim(freqfil),status='unknown') 687 | do j=1,nloci 688 | write(45,'(F10.6)') freqstore(j) 689 | enddo 690 | close(45,status='keep') 691 | else 692 | open(45,file=trim(freqfil),status='unknown') 693 | do j=1,nloci 694 | read(45,'(E15.7)') freqstore(j) 695 | enddo 696 | close(45,status='keep') 697 | do j=1,nloci 698 | q=freqstore(j) 699 | mean=2.0d0*q 700 | stdev=dsqrt(mean*(1.0d0-q)) 701 | if(q==1.0d0 .or. q==0.0d0) then 702 | geno_mean(:,j)=0.0d0 703 | else 704 | xtemp=X(:,j) 705 | nomiss=count(xtemp < 3) 706 | if(nomiss==0) then 707 | geno_mean(0:3,j)=0.0d0 708 | else 709 | qtest=dble(sum(xtemp,mask= xtemp < 3)) / (2.0d0*nomiss) 710 | geno_mean(0,j)=(0.0d0-mean)/stdev 711 | geno_mean(1,j)=(1.0d0-mean)/stdev 712 | geno_mean(2,j)=(2.d0-mean)/stdev 713 | geno_mean(3,j)=(2.0d0*qtest-mean)/stdev 714 | endif 715 | end if 716 | end do 717 | endif 718 | end subroutine process_snp 719 | 720 | subroutine allocate_data 721 | !trains keeps track of training (0) and test(1) individuals 722 | !swap around for predicition 723 | if(.not.mcmc) then 724 | where(trains==0) trains=3 725 | where(trains==1) trains=0 726 | where(trains==3) trains=1 727 | end if 728 | nt=count(trains==0) 729 | allocate(pred(nind), gpin(ndist), gp(ndist), p(ndist), geno_mean(0:3,nloci), & 730 | X(nt,nloci), delta(ndist),dirx(ndist), g(nloci), g_old(nloci), res(nt), & 731 | snpindist(ndist), varindist(ndist), s(ndist), stemp(ndist), & 732 | xpx(nloci), gstore(nloci), snpstore(ndist), varstore(ndist), pstore(ndist), & 733 | indiststore(nloci,ndist), mu_vare_store(4), freqstore(nloci), permvec(nloci),& 734 | snptracker(nloci), log_p(ndist), log_gp(ndist),vare_gp(ndist), stat=ios) 735 | if( ios /= 0 )then 736 | write(21,'(a50)') 'ERROR :: Unable to allocate required storage' 737 | stop 'Unable to allocate required storage for data' 738 | call flush(21) 739 | endif 740 | end subroutine allocate_data 741 | 742 | subroutine permutate(p,n) 743 | integer :: n,p(n), k,j,i,ipj,itemp,m 744 | double precision :: u(100) 745 | do i=1,n 746 | p(i)=i 747 | enddo 748 | ! generate up to 100 u(0,1) numbers at a time. 749 | do i=1,n,100 750 | m=min(n-i+1,100) 751 | call random_number(u) 752 | do j=1,m 753 | ipj=i+j-1 754 | k=int(u(j)*(n-ipj+1))+ipj 755 | itemp=p(ipj) 756 | p(ipj)=p(k) 757 | p(k)=itemp 758 | enddo 759 | enddo 760 | end subroutine permutate 761 | 762 | subroutine compute_dgv_rhs 763 | integer :: i,j, tr 764 | double precision :: pr 765 | 766 | tr=0 767 | pred=-9999.0d0 768 | do i=1,nind 769 | if(trains(i)==0) then 770 | tr=tr+1 771 | pr=mu 772 | do j=1,nloci 773 | pr=pr+geno_mean(X(tr,j),j)*gstore(j) 774 | enddo 775 | pred(i)=pr 776 | endif 777 | end do 778 | end subroutine compute_dgv_rhs 779 | 780 | subroutine write_dgv() 781 | integer :: i 782 | character(len=2) :: missvalue 783 | 784 | missvalue='NA' 785 | open(unit=61,file=mbvfil,status='unknown',form='formatted') 786 | do i=1,nind 787 | if (trains(i)==0) then 788 | !write (rchar, '(E15.7)') pred(i) 789 | !write(61,*)adjustl(rchar) 790 | write(61,'(E15.7)') pred(i) 791 | else 792 | write(61,'(a2)') missvalue 793 | end if 794 | enddo 795 | close(unit=61,status='keep') 796 | end subroutine write_dgv 797 | 798 | subroutine load_param() 799 | character(len=100):: str 800 | character(len=10):: dum 801 | integer :: i, nc, ios 802 | double precision, dimension(20):: gtemp 803 | 804 | open(31,file=paramfil,status='old',form='formatted') 805 | read(31,'(a)') str 806 | nc=ndist+1 807 | do i=1,nloci 808 | read(31,*,iostat=ios) gtemp(1:nc) 809 | gstore(i)=gtemp(nc) 810 | if(ios/=0) then 811 | write(21,'(a)') 'Error opening file ',adjustl(paramfil) 812 | call flush(21) 813 | end if 814 | enddo 815 | close(31) 816 | open(32,file=modfil,status='old',form='formatted') 817 | read(32,*) dum, mu 818 | close(32) 819 | end subroutine load_param 820 | 821 | subroutine output_model 822 | integer :: i 823 | character(LEN=10) :: ci,ca 824 | 825 | open(unit=10,file=paramfil,status='unknown',iostat=ios) 826 | if(ios/=0) then 827 | write(21,*) 'Error opening ',trim(paramfil) 828 | stop 829 | end if 830 | do i=1,ndist 831 | write(ci,'(I8)') i 832 | ci=adjustl(ci) 833 | ca="PIP"//trim(ci) 834 | write(10,'(2(A5))',advance="no") ' ',ca 835 | end do 836 | write(10,*) ' beta' 837 | do i=1,nloci 838 | write(10,'(50(E15.7,1X))') indiststore(i,:), gstore(i) 839 | enddo 840 | close(10,status='keep') 841 | 842 | open(unit=12,file=modfil,status='unknown',iostat=ios) 843 | if(ios/=0) then 844 | write(21,*) 'Error opening ',trim(modfil) 845 | stop 846 | end if 847 | write(12,800) 'Mean',mu_vare_store(1) 848 | write(12,800) 'Nsnp',mu_vare_store(2) 849 | write(12,800) 'Va',mu_vare_store(3) 850 | write(12,800) 'Ve', mu_vare_store(4) 851 | do i=1,ndist 852 | write(ci,'(I8)') i 853 | ci=adjustl(ci) 854 | ca="Nk"//trim(adjustl(ci)) 855 | write(12,800) ca,snpstore(i) 856 | end do 857 | do i=1,ndist 858 | write(ci,'(I8)') i 859 | ci=adjustl(ci) 860 | ca="Pk"//trim(adjustl(ci)) 861 | write(12,800) ca,pstore(i) 862 | end do 863 | do i=1,ndist 864 | write(ci,'(I8)') i 865 | ci=adjustl(ci) 866 | ca="Vk"//trim(adjustl(ci)) 867 | write(12,800) ca,varstore(i) 868 | end do 869 | close(12,status='keep') 870 | 871 | 800 format(a,t10,E15.7) 872 | end subroutine output_model 873 | 874 | subroutine compute_residuals_rhs() 875 | integer :: tr, i,j 876 | tr=0 877 | do i=1,nind 878 | if(trains(i)==0) then 879 | tr=tr+1 880 | res(tr)=why(i)-mu 881 | do j=1,nloci 882 | res(tr)=res(tr)-geno_mean(X(tr,j),j)*g(j) 883 | end do 884 | endif 885 | enddo 886 | end subroutine compute_residuals_rhs 887 | 888 | subroutine output_snploc 889 | integer :: i,j 890 | character(LEN=20) :: ci, cg, ce 891 | character(len=1) :: double = ":" 892 | 893 | do i=1,nloci 894 | j= snptracker(i) 895 | if(j>1) then 896 | write(ci,'(I8)') i 897 | ci=adjustl(ci) 898 | write(cg,'(I8)') j 899 | cg=adjustl(cg) 900 | write(ce,'(e15.6)') g(i)**2 901 | ce=adjustl(ce) 902 | write(14,'(1X,a,a,a,a,a)',advance='no') trim(cg),double,trim(ci),double,trim(ce) 903 | endif 904 | enddo 905 | write(14,*) 906 | end subroutine output_snploc 907 | 908 | subroutine block_dimensions 909 | rhs_ncol=ngeno**block_size 910 | n_blocks=int(nloci/block_size) 911 | rest_size=nloci-(n_blocks*block_size) 912 | if(rest_size>0) then 913 | n_blocks=n_blocks+1 914 | end if 915 | allocate(rhs_block(rhs_ncol,block_size),xe(block_size),s_loc(block_size),ny2(0:(ngeno-1)), & 916 | gbl(block_size), rhs_ind(nt,n_blocks),res_old(nt), res_null(nt), delta_res(rhs_ncol), & 917 | rhs_count(rhs_ncol,n_blocks),delta_e(rhs_ncol),block_info(n_blocks,block_size),& 918 | shufflevec(n_blocks),resvec(rhs_ncol),resvec_temp(rhs_ncol),bres(ngeno,block_size), & 919 | countvec(rhs_ncol),countvec_temp(rhs_ncol),stat=ios) 920 | if( ios /= 0 )then 921 | stop 'Unable to allocate required storage for rhs block' 922 | endif 923 | end subroutine block_dimensions 924 | 925 | subroutine rhs_group 926 | integer :: i,j 927 | integer, dimension(:), allocatable :: ks,rs 928 | 929 | allocate(ks(block_size),rs(block_size-1)) 930 | ks=0 931 | rs=0 932 | do i=1,block_size-1 933 | rs(i)=ngeno**i 934 | enddo 935 | do i=1,rhs_ncol 936 | do j=1,block_size 937 | rhs_block(i,j)=ks(j) 938 | enddo 939 | ks(1)=ks(1)+1 940 | do j=1,block_size-1 941 | if(mod(i,rs(j))==0) then 942 | ks(j)=0 943 | ks(j+1)=ks(j+1)+1 944 | endif 945 | end do 946 | end do 947 | end subroutine rhs_group 948 | 949 | subroutine build_blocks 950 | integer :: i,bs,start,end 951 | 952 | do i=1,nloci 953 | permvec(i)=i 954 | enddo 955 | if(permute) then 956 | call permutate(permvec,nloci) 957 | endif 958 | start=0 959 | end=0 960 | do i=1,n_blocks 961 | if(i==n_blocks .and. rest_size>0) then 962 | bs=rest_size 963 | else 964 | bs=block_size 965 | end if 966 | start=end+1 967 | end=end+bs 968 | block_info(i,1:bs)=permvec(start:end) 969 | enddo 970 | end subroutine build_blocks 971 | 972 | subroutine mapfun(bsize) 973 | integer :: i,n 974 | integer, intent(in) :: bsize 975 | integer, dimension(:), allocatable :: temp 976 | 977 | if(allocated(lookup)) deallocate(lookup) 978 | if(allocated(map)) deallocate(map) 979 | allocate(map(bsize),temp(bsize)) 980 | 981 | temp(:)=3 982 | map(1)=1 983 | do i=2,bsize 984 | map(i)=ngeno**i 985 | enddo 986 | n=sum(temp*map)+1 987 | allocate(lookup(n)) 988 | do i=1,rhs_ncol 989 | n=sum(rhs_block(i,:)*map)+1 990 | lookup(n) = i 991 | enddo 992 | end subroutine mapfun 993 | 994 | subroutine rhs_ct 995 | integer:: i,j,bs, pos 996 | integer, dimension(9) :: sindex 997 | 998 | call mapfun(block_size) 999 | do i=1,n_blocks 1000 | if(i==n_blocks .and. rest_size>0) then 1001 | bs=rest_size 1002 | else 1003 | bs=block_size 1004 | end if 1005 | sindex(1:bs)=block_info(i,1:bs) 1006 | countvec=0 1007 | !$OMP parallel private(j,pos,countvec_temp) if(nt >5000) 1008 | countvec_temp=0 1009 | !$OMP DO 1010 | do j=1,nt 1011 | pos=lookup(sum(X(j,sindex(1:bs))*map(1:bs))+1) 1012 | !rhs_count(pos,i)=rhs_count(pos,i)+1 1013 | countvec_temp(pos)=countvec_temp(pos)+1 1014 | rhs_ind(j,i)=pos 1015 | enddo 1016 | !$OMP end do 1017 | !$OMP critical 1018 | countvec=countvec+countvec_temp 1019 | !$OMP end critical 1020 | !$OMP barrier 1021 | rhs_count(:,i)=countvec 1022 | !$OMP end parallel 1023 | end do 1024 | end subroutine rhs_ct 1025 | 1026 | subroutine xe_update 1027 | integer ::i, loc, s1, s2 1028 | 1029 | loc=s_loc(pos-1) 1030 | ny2=0.0d0 1031 | do i=1,rhs_ncol 1032 | if(rhs_count(i,bl)==0.0d0) cycle 1033 | s1=rhs_block(i,pos-1) 1034 | s2=rhs_block(i,pos) 1035 | delta_e(i)=delta_e(i)+rhs_count(i,bl)*geno_mean(s1,loc)*gbl(pos-1) 1036 | ny2(s2)=ny2(s2)+delta_e(i) 1037 | enddo 1038 | rhs = xe(pos) -dot_product(geno_mean(:,s_loc(pos)),ny2) 1039 | end subroutine xe_update 1040 | 1041 | subroutine res_update_rhs 1042 | integer :: i,k,s 1043 | 1044 | do k=1,b_size 1045 | if(gbl(k) /= 0.0d0) then 1046 | do i=1,rhs_ncol 1047 | s=rhs_block(i,k) 1048 | delta_res(i)=delta_res(i)+geno_mean(s,s_loc(k))*gbl(k) 1049 | end do 1050 | end if 1051 | end do 1052 | if(any(gbl /= 0.0d0)) then 1053 | !$OMP PARALLEL DO private(i) 1054 | do i=1,nt 1055 | res(i)=res(i)-delta_res(rhs_ind(i,bl)) 1056 | end do 1057 | !$OMP end parallel do 1058 | end if 1059 | end subroutine res_update_rhs 1060 | 1061 | end module routinez 1062 | -------------------------------------------------------------------------------- /src/RandomDistributions.f90: -------------------------------------------------------------------------------- 1 | 2 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 3 | ! normal distributions of SNP effects 4 | ! Copyright (C) 2014 Gerhard Moser 5 | ! 6 | ! This program is free software: you can redistribute it and/or modify 7 | ! it under the terms of the GNU General Public License as published by 8 | ! the Free Software Foundation, either version 3 of the License, or 9 | ! (at your option) any later version. 10 | ! 11 | ! This program is distributed in the hope that it will be useful, 12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | ! GNU General Public License for more details. 15 | 16 | ! You should have received a copy of the GNU General Public License! 17 | ! along with this program. If not, see = 1.0d0) then 81 | d = shape - 1.0d0/3.0d0 82 | c = 1.0d0/(9.0d0*d)**0.5d0 83 | do while (.true.) 84 | x = rand_normal(0.0d0, 1.0d0) 85 | v = 1.0d0 + c*x 86 | do while (v <= 0.0d0) 87 | x = rand_normal(0.0d0, 1.0d0) 88 | v = 1.0d0 + c*x 89 | end do 90 | v = v*v*v 91 | call random_number(u) 92 | xsq = x*x 93 | if ((u < 1.0d0 -.0331d0*xsq*xsq) .or. (dlog(u) < 0.5d0*xsq + d*(1.0d0 - v + dlog(v))) )then 94 | ans=scale*d*v 95 | return 96 | end if 97 | end do 98 | else 99 | g = rand_gamma(shape+1.0d0, 1.0d0) 100 | call random_number(w) 101 | ans=scale*g*(w)**(1.0d0/shape) 102 | return 103 | end if 104 | end function rand_gamma 105 | ! 106 | ! ## return a random sample from a chi square distribution 107 | ! ## with the specified degrees of freedom 108 | ! 109 | function rand_chi_square(dof) result(ans) 110 | double precision ans,dof 111 | ans=rand_gamma(0.5d0*dof, 2.0d0) 112 | end function rand_chi_square 113 | ! 114 | ! ## return a random sample from a scaled 115 | ! inverse chi square distribution with 116 | ! df and scale parameter 117 | ! 118 | function rand_scaled_inverse_chi_square(dof,scale) result(ans) 119 | double precision ans,dof,scale 120 | ans=rand_inverse_gamma(dble(0.5)*dof, dble(0.5)*dof*scale) 121 | end function rand_scaled_inverse_chi_square 122 | 123 | ! ## return a random sample from an inverse gamma random variable 124 | ! 125 | function rand_inverse_gamma(shape, scale) result(ans) 126 | double precision shape,scale,ans 127 | ! ## If X is gamma(shape, scale) then 128 | ! ## 1/Y is inverse gamma(shape, 1/scale) 129 | ans= 1.0d0 / rand_gamma(shape, 1.0d0 / scale) 130 | end function rand_inverse_gamma 131 | ! 132 | !## return a sample from a Weibull distribution 133 | ! 134 | function rand_weibull(shape, scale) result(ans) 135 | double precision shape,scale,temp,ans 136 | if (shape <= 0.0d0) then 137 | write(*,*) "Shape parameter must be positive" 138 | end if 139 | if (scale <= 0.0d0) then 140 | write(*,*) "Scale parameter must be positive" 141 | end if 142 | call random_number(temp) 143 | ans= scale * (-log(temp))**(1.0d0 / shape) 144 | end function rand_weibull 145 | ! 146 | !## return a random sample from a Cauchy distribution 147 | ! 148 | function rand_cauchy(median, scale) result(ans) 149 | double precision ans,median,scale,p 150 | if (scale <= 0.0d0) then 151 | write(*,*) "Scale parameter must be positive" 152 | end if 153 | call random_number(p) 154 | ans = median + scale*tan(PI*(p - 0.5d0)) 155 | end function rand_cauchy 156 | ! 157 | !## return a random sample from a Student t distribution 158 | ! 159 | function rand_student_t(dof) result(ans) 160 | double precision ans,dof,y1,y2 161 | if (dof <= 0.d0) then 162 | write(*,*) "Degrees of freedom must be positive" 163 | end if 164 | ! 165 | ! ## See Seminumerical Algorithms by Knuth 166 | y1 = rand_normal(0.0d0, 1.0d0) 167 | y2 = rand_chi_square(dof) 168 | ans= y1 / (y2 / dof)**0.50d0 169 | ! 170 | end function rand_student_t 171 | ! 172 | !## return a random sample from a Laplace distribution 173 | !## The Laplace distribution is also known as the double exponential distribution. 174 | ! 175 | function rand_laplace(mean, scale) result(ans) 176 | double precision ans,mean,scale,u 177 | if (scale <= 0.0d0) then 178 | write(*,*) "Scale parameter must be positive" 179 | end if 180 | call random_number(u) 181 | if (u < 0.5d0) then 182 | ans = mean + scale*log(2.0d0*u) 183 | else 184 | ans = mean - scale*log(2.0d0*(1.0d0-u)) 185 | end if 186 | end function rand_laplace 187 | ! 188 | ! ## return a random sample from a log-normal distribution 189 | ! 190 | function rand_log_normal(mu, sigma) result(ans) 191 | double precision ans,mu,sigma 192 | ans= exp(rand_normal(mu, sigma)) 193 | end function rand_log_normal 194 | ! 195 | ! ## return a random sample from a beta distribution 196 | ! 197 | function rand_beta(a, b) result(ans) 198 | double precision a,b,ans,u,v 199 | if ((a <= 0.0d0) .or. (b <= 0.0d0)) then 200 | write(*,*) "Beta parameters must be positive" 201 | end if 202 | ! ## There are more efficient methods for generating beta samples. 203 | ! ## However such methods are a little more efficient and much more complicated. 204 | ! ## For an explanation of why the following method works, see 205 | ! ## http://www.johndcook.com/distribution_chart.html#gamma_beta 206 | u = rand_gamma(a, 1.0d0) 207 | v = rand_gamma(b, 1.0d0) 208 | ans = u / (u + v) 209 | end function rand_beta 210 | 211 | ! Based on rdirichlet function in R {gtools} 212 | function rdirichlet(n,irx) result(x) 213 | integer :: n, i 214 | double precision :: sx 215 | double precision, dimension(n) :: irx, x 216 | do i=1,n 217 | x(i)=rand_gamma(irx(i),1.0d0) 218 | enddo 219 | sx=sum(x) 220 | x=x/sx 221 | end function rdirichlet 222 | 223 | end module RDistributions 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /src/bayesR.f90: -------------------------------------------------------------------------------- 1 | ! Bayesian hierarchical models for complex trait analysis using a mixture of 2 | ! normal distributions of SNP effects 3 | ! Copyright (C) 2014 Gerhard Moser 4 | ! 5 | ! This program is free software: you can redistribute it and/or modify 6 | ! it under the terms of the GNU General Public License as published by 7 | ! the Free Software Foundation, either version 3 of the License, or 8 | ! (at your option) any later version. 9 | ! 10 | ! This program is distributed in the hope that it will be useful, 11 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ! GNU General Public License for more details. 14 | 15 | ! You should have received a copy of the GNU General Public License! 16 | ! along with this program. If not, see 17 | 18 | program bayesR 19 | use parz 20 | use bays 21 | use cmd_parser 22 | use routinez 23 | use RDistributions 24 | #ifdef block 25 | use blockutilz 26 | use omp_lib 27 | #endif 28 | 29 | 30 | implicit none 31 | integer :: i, k, jj, counter, nm 32 | double precision :: ii, wtime 33 | character (len=8) :: cdate 34 | character (len=10) :: ctime 35 | 36 | #ifdef block 37 | wtime = omp_get_wtime() 38 | #endif 39 | 40 | call date_and_time(date=cdate,time=ctime) 41 | call parse 42 | call get_size 43 | call load_phenos 44 | call allocate_data 45 | call parse_covar 46 | 47 | if(mcmc) then 48 | call init_model 49 | call write_log('train',cdate,ctime) 50 | call init_random_seed 51 | gstore=0d0 52 | indiststore=0d0 53 | snptracker(:,3)=2 54 | !starting values 55 | mu=sum(why, mask=trains==0)/dble(nt) 56 | g=dsqrt(sum(varcomp%vara)/(0.5*dble(nloci))) 57 | if(snpout) then 58 | open(unit=14,file=locfil,status='unknown',action='write') 59 | endif 60 | #ifdef block 61 | call omp_set_num_threads(nthreads) 62 | call omp_set_dynamic(.false.) 63 | call init_block 64 | allocate(permvec(n_blocks)) 65 | do i=1,n_blocks 66 | permvec(i)=i 67 | enddo 68 | #else 69 | allocate(permvec(nloci)) 70 | do i=1,nloci 71 | permvec(i)=i 72 | enddo 73 | call load_snp 74 | call xcenter 75 | call compute_residuals 76 | #endif 77 | vare=dot_product(yadj,yadj)/dble(nt)*0.5d0 78 | counter=0 79 | each_cycle : do rep=1,numit 80 | if(.not. VCE) then 81 | vare=dot_product(yadj,yadj)/rand_chi_square(dble(nt)+3.0d0) 82 | endif 83 | yadj=yadj+mu 84 | mu=rand_normal(sum(yadj)/dble(nt), dsqrt(vare/dble(nt))) 85 | yadj=yadj-mu 86 | !Fixed effects 87 | if(covar) then 88 | call update_fixed 89 | endif 90 | !SNP 91 | #ifdef block 92 | call update_bayesR_block 93 | #else 94 | call update_bayesR 95 | #endif 96 | call update_varcomp 97 | call update_segments 98 | 99 | if(rep>burnin .and. mod(rep,thin)==0) then 100 | counter=counter+1 101 | gstore=gstore+g 102 | mu_s=mu_s+mu 103 | vare_s=vare_s+vare 104 | 105 | if(covar) then 106 | ii=dble(counter-1)/dble(counter) 107 | alphastore=alphastore*ii+alpha/dble(counter) 108 | end if 109 | do i=1,nseg 110 | nm=segments%nmix(i) 111 | segments_s%p(i,1:nm)=segments_s%p(i,1:nm)+segments%p(i,1:nm) 112 | segments_s%snpinseg(i,1:nm)=segments_s%snpinseg(i,1:nm)+segments%snpinseg(i,1:nm) 113 | segments_s%varinseg(i,1:nm)=segments_s%varinseg(i,1:nm)+segments%varinseg(i,1:nm) 114 | enddo 115 | do i=1,ncomp 116 | varcomp_s%vara(i)=varcomp_s%vara(i)+varcomp%vara(i) 117 | enddo 118 | do i=1,nloci 119 | jj=snptracker(i,3) 120 | indiststore(i,jj)=indiststore(i,jj)+1 121 | enddo 122 | call output_hyp 123 | if(snpout) call output_snploc 124 | end if 125 | enddo each_cycle 126 | 127 | !posterior means 128 | gstore=gstore/dble(counter) 129 | mu_s=mu_s/dble(counter) 130 | vare_s=vare_s/dble(counter) 131 | segments_s%p=segments_s%p/dble(counter) 132 | segments_s%snpinseg=segments_s%snpinseg/dble(counter) 133 | segments_s%varinseg=segments_s%varinseg/dble(counter) 134 | varcomp_s%vara= varcomp_s%vara/dble(counter) 135 | indiststore=indiststore/dble(counter) 136 | 137 | call output_model 138 | mu=mu_s 139 | call compute_dgv 140 | call write_predval(mbvfil,pred) 141 | if(covar) then 142 | call compute_fitted 143 | call write_predval(fittfil,pred) 144 | endif 145 | else ! prediction 146 | #ifdef block 147 | call init_block 148 | allocate(permvec(n_blocks)) 149 | do i=1,n_blocks 150 | permvec(i)=i 151 | enddo 152 | #else 153 | allocate(permvec(nloci)) 154 | do i=1,nloci 155 | permvec(i)=i 156 | enddo 157 | call load_snp 158 | call xcenter 159 | call compute_residuals 160 | #endif 161 | call write_log('test',cdate,ctime) 162 | call load_param 163 | call compute_dgv 164 | call write_predval(mbvfil,pred) 165 | if(covar) then 166 | call compute_fitted 167 | call write_predval(fittfil,pred) 168 | end if 169 | end if 170 | 171 | call date_and_time(date=cdate,time=ctime) 172 | #ifdef block 173 | wtime= omp_get_wtime() -wtime 174 | write(21,'(a,t32,f20.6)') 'user time = ', wtime/60.0d0 175 | #endif 176 | call write_log('end',cdate,ctime) 177 | end program bayesR 178 | --------------------------------------------------------------------------------