Closed ArtPoon closed 5 years ago
> log <- read.table('28467.log', header=T, comment.char='#') > dim(log) [1] 10001 40 > log[1,] state posterior prior likelihood treeModel.rootHeight skyline.popSize1 1 0 -63409.69 -10219.26 -53190.43 827.585 1 skyline.popSize2 skyline.popSize3 skyline.popSize4 skyline.popSize5 1 1 1 1 1 skyline.popSize6 skyline.popSize7 skyline.popSize8 skyline.popSize9 1 1 1 1 1 skyline.popSize10 skyline.groupSize1 skyline.groupSize2 skyline.groupSize3 1 1 6 5 5 skyline.groupSize4 skyline.groupSize5 skyline.groupSize6 skyline.groupSize7 1 5 5 5 5 skyline.groupSize8 skyline.groupSize9 skyline.groupSize10 kappa1 kappa2 1 5 5 5 2 2 frequencies1 frequencies2 frequencies3 frequencies4 alpha ucld.mean 1 0.25 0.25 0.25 0.25 0.5 1 ucld.stdev meanRate coefficientOfVariation covariance treeLikelihood 1 0.3333333 1.034891 0.3219494 -0.003427711 -53190.43 branchRates skyline 1 -471.7472 -4919.259 > log2 <- log[seq(1, nrow(log), 1001), ] > dim(log2) [1] 10 40 > log2 <- log[seq(1, nrow(log), length.out=1001), ] > dim(log2) [1] 1001 40 > log2[1,] state posterior prior likelihood treeModel.rootHeight skyline.popSize1 1 0 -63409.69 -10219.26 -53190.43 827.585 1 skyline.popSize2 skyline.popSize3 skyline.popSize4 skyline.popSize5 1 1 1 1 1 skyline.popSize6 skyline.popSize7 skyline.popSize8 skyline.popSize9 1 1 1 1 1 skyline.popSize10 skyline.groupSize1 skyline.groupSize2 skyline.groupSize3 1 1 6 5 5 skyline.groupSize4 skyline.groupSize5 skyline.groupSize6 skyline.groupSize7 1 5 5 5 5 skyline.groupSize8 skyline.groupSize9 skyline.groupSize10 kappa1 kappa2 1 5 5 5 2 2 frequencies1 frequencies2 frequencies3 frequencies4 alpha ucld.mean 1 0.25 0.25 0.25 0.25 0.5 1 ucld.stdev meanRate coefficientOfVariation covariance treeLikelihood 1 0.3333333 1.034891 0.3219494 -0.003427711 -53190.43 branchRates skyline 1 -471.7472 -4919.259 > tail(log2) state posterior prior likelihood treeModel.rootHeight 9951 99500000 -5967.684 -3058.559 -2909.125 595.8296 9961 99600000 -6004.771 -3098.322 -2906.449 619.9427 9971 99700000 -5994.841 -3089.954 -2904.887 595.9836 9981 99800000 -6015.126 -3087.454 -2927.672 606.4756 9991 99900000 -5981.411 -3063.076 -2918.335 607.9006 10001 100000000 -5968.741 -3060.749 -2907.992 597.9549 skyline.popSize1 skyline.popSize2 skyline.popSize3 skyline.popSize4 9951 361.8352 694.24670 18.76469 29.977883 9961 335.4437 537.63488 264.88775 69.617331 9971 276.1276 144.46751 219.75201 176.027739 9981 666.9793 31.14599 55.89602 19.070647 9991 1593.4224 442.79325 412.74945 45.899772 10001 396.5224 380.66288 266.51632 5.671572 skyline.popSize5 skyline.popSize6 skyline.popSize7 skyline.popSize8 9951 58.21581 100.498314 2.789057 2.044690 9961 26.82285 29.638086 115.084115 56.900828 9971 470.33605 103.524940 101.480720 48.108153 9981 30.31274 36.727237 81.260858 60.588094 9991 29.93916 6.122359 3.891336 7.288111 10001 21.77147 26.249395 18.232590 49.522034 skyline.popSize9 skyline.popSize10 skyline.groupSize1 skyline.groupSize2 9951 1.360791 1.7579874 12 2 9961 17.004628 28.4907909 1 7 9971 3.713107 0.6467948 7 1 9981 8.666943 3.8234620 12 3 9991 19.426274 9.1993900 1 8 10001 10.220474 7.2631493 10 4 skyline.groupSize3 skyline.groupSize4 skyline.groupSize5 9951 6 11 10 9961 9 2 10 9971 2 2 3 9981 1 8 2 9991 3 19 6 10001 2 5 1 skyline.groupSize6 skyline.groupSize7 skyline.groupSize8 9951 4 2 2 9961 1 2 6 9971 1 10 21 9981 12 4 5 9991 2 5 2 10001 6 8 5 skyline.groupSize9 skyline.groupSize10 kappa1 kappa2 frequencies1 9951 1 1 4.030420 4.962840 0.3672668 9961 11 2 7.163937 5.049222 0.3726325 9971 1 3 5.671278 8.899290 0.3624253 9981 1 3 4.748575 5.603581 0.3476034 9991 2 3 6.171755 6.685988 0.3602663 10001 7 3 11.961481 10.736765 0.3570339 frequencies2 frequencies3 frequencies4 alpha ucld.mean 9951 0.1757972 0.2256664 0.2312696 0.019072310 3.677866e-05 9961 0.1493547 0.2263697 0.2516431 0.092555592 3.393505e-05 9971 0.1622222 0.2335000 0.2418525 0.003648157 3.632225e-05 9981 0.1751568 0.2446308 0.2326089 0.035697052 3.027913e-05 9991 0.1575727 0.2300344 0.2521265 0.090586958 4.573713e-05 10001 0.1723874 0.2238327 0.2467459 0.060721660 3.530217e-05 ucld.stdev meanRate coefficientOfVariation covariance 9951 4.310939e-06 3.627788e-05 0.1110135261 0.06542983 9961 9.908434e-06 3.379512e-05 0.3027701603 -0.01740424 9971 5.772738e-06 3.654773e-05 0.1511855129 -0.03175182 9981 1.037722e-05 2.919618e-05 0.3283346036 0.04813477 9991 2.430427e-08 4.573139e-05 0.0004744421 -0.01534604 10001 8.963592e-06 3.541841e-05 0.2351818155 -0.07793663 treeLikelihood branchRates skyline 9951 -2909.125 -471.7472 -243.5211 9961 -2906.449 -471.7472 -271.4506 9971 -2904.887 -471.7472 -264.0880 9981 -2927.672 -471.7472 -267.9321 9991 -2918.335 -471.7472 -241.9591 10001 -2907.992 -471.7472 -236.1945 > write.table(log2, file='28467.thinned.log', sep='\t', quote=F, row.names=F) >
Already implemented code into a new R script titled tree_thinning.R
tree_thinning.R