BayesTyper icon indicating copy to clipboard operation
BayesTyper copied to clipboard

If executed multiple times, will the result of the data generated be the same each time?

Open 123xyl opened this issue 1 year ago • 5 comments

If executed multiple times, will the result of the data generated be the same each time?

123xyl avatar Mar 16 '23 07:03 123xyl

If you use the same seed (option --random-seed) the results should be the same between each run.

jonassibbesen avatar Mar 23 '23 10:03 jonassibbesen

But I have the same data, and each time I execute it, the file is different.

123xyl avatar Mar 23 '23 11:03 123xyl

Strange. Did you use the same seed for each run? Are you able to share the command line you are using?

jonassibbesen avatar Mar 23 '23 11:03 jonassibbesen

image

123xyl avatar Mar 23 '23 11:03 123xyl

In order to get the same results each run you need to use the same seed for the pseudo-random number generator. By default, the seed will be set using the Unix time when you started the run. It will therefore be different between each run except if you started the runs at exactly the same time. You can provide a seed to both bayesTyper cluster and bayesTyper genotype using the option random-seed.

jonassibbesen avatar Mar 23 '23 12:03 jonassibbesen