hybridLambda / hybrid-Lambda

Hybrid-Lambda is a software package that can simulate gene trees within a rooted species network or a rooted species tree under the Kingman's coalescent or Lambda coalescent process.
http://hybridlambda.github.io/
GNU General Public License v3.0
6 stars 4 forks source link

random number generator seeding is not right #17

Closed shajoezhu closed 8 years ago

shajoezhu commented 9 years ago

run script of

#!/bin/bash                                                                     

for((i=1; i<=10; i++))
do
#R CMD BATCH ST4.r
./hybrid-Lambda -spcu temp1 -num 1 -seed $i\55
#rm -f temp
#cp temp4 temp
cat temp1 >> tempST
cat OUT_coal_unit >> tempGT
R CMD BATCH bal.r
cat output.out >> foo
echo $i
echo $i >> log
echo 4 >> log
done

tempGT returns

((t2_1:0.967026,(t3_1:0.698811,t4_1:0.698811):0.268215):0.190127,t1_1:1.157153);
((t2_1:0.528222,(t3_1:0.317560,t4_1:0.317560):0.210662):0.388938,t1_1:0.917160);
((t2_1:0.379231,(t3_1:0.375773,t4_1:0.375773):0.003458):2.841594,t1_1:3.220825);
((t2_1:1.284799,(t3_1:0.349129,t4_1:0.349129):0.935671):0.398095,t1_1:1.682895);
((t2_1:0.343714,(t3_1:0.283673,t4_1:0.283673):0.060041):2.890867,t1_1:3.234581);
((t2_1:0.857172,(t3_1:0.469486,t4_1:0.469486):0.387686):2.711487,t1_1:3.568659);
((t2_1:0.446177,(t3_1:0.395222,t4_1:0.395222):0.050955):1.163103,t1_1:1.609280);
((t2_1:1.154513,(t3_1:0.619523,t4_1:0.619523):0.534990):1.036833,t1_1:2.191346);
((t2_1:0.926482,(t3_1:0.701243,t4_1:0.701243):0.225239):0.259924,t1_1:1.186406);
((t2_1:0.821960,(t3_1:0.293566,t4_1:0.293566):0.528394):1.998747,t1_1:2.820707);

all of the first tree have the same topology ( regardless what seed was given)

shajoezhu commented 8 years ago

Now have

((t4_1:0.832282,t2_1:0.832282):0.859600,(t1_1:0.316393,t3_1:0.316393):1.375489);
((t1_1:0.544294,(t4_1:0.386338,t3_1:0.386338):0.157956):1.825456,t2_1:2.369749);
((t2_1:0.322866,t3_1:0.322866):0.725854,(t1_1:0.854780,t4_1:0.854780):0.193939);
(((t2_1:0.483901,t1_1:0.483901):0.092867,t4_1:0.576768):1.333598,t3_1:1.910366);
(t2_1:0.594218,((t4_1:0.401223,t1_1:0.401223):0.004955,t3_1:0.406178):0.188039);
(t3_1:2.980504,(t4_1:0.710475,(t1_1:0.486581,t2_1:0.486581):0.223894):2.270030);
(t2_1:1.859109,((t4_1:0.599927,t3_1:0.599927):0.269167,t1_1:0.869094):0.990015);
((t2_1:0.504199,(t1_1:0.347676,t3_1:0.347676):0.156522):0.465348,t4_1:0.969546);
(t1_1:1.546567,(t4_1:1.480790,(t2_1:0.463331,t3_1:0.463331):1.017459):0.065777);
(((t3_1:0.283030,t2_1:0.283030):0.294397,t1_1:0.577427):1.062168,t4_1:1.639595);