tskit icon indicating copy to clipboard operation
tskit copied to clipboard

Routines to generate tree sequences deterministically rather than stochastically for testing

Open szhan opened this issue 3 years ago • 0 comments

In #2384 , I added a test to check that the string representation of a Variant object is correctly formatted. The test involves doing regexp matching (using a predefined pattern) on the output of calling __str__() on a Variant object. The output string shows the alleles in the Variant object. The problem is that the TreeSequence object from which the Variant object is taken is generated stochastically, so the allele list of the Variant object may vary from computer to computer.

As @hyanwong suggested (https://github.com/tskit-dev/tskit/issues/2384#issuecomment-1191972515), it may be helpful to have some routines to generate TreeSequence objects deterministically for testing purposes.

szhan avatar Jul 22 '22 09:07 szhan