vibansal / ancestry

program to estimate admixture coefficients from individual genotype or sequence data
Other
33 stars 16 forks source link

Does this tool involve seeding? #10

Closed djmce closed 4 years ago

djmce commented 4 years ago

Does this tool involve some kind of random seeding or do you expect it to produce identical results each time it is run with the same input data?

vibansal commented 4 years ago

The admixture coefficients are initialized with random values, therefore, the tool may not produce the exact same results. There is a variable 'RANDOM_START' that can be set to 0 to change this behavior.

djmce commented 4 years ago

Excellent, thanks @vibansal
I cloned the repo, found this variable in ancestry-gll.c, set it to 0, ran make all and tested it; confirmed via md5sum that identical outputs were obtained.

djmce commented 4 years ago

FYI, to get repeatable behaviour I also had to fix the seed to srand48() on line 416 of ancestry-gll.c

vibansal commented 4 years ago

Thanks for this update.