Skip to content

Output order of individuals from write_vcf #3109

You must be logged in to vote

Hi @mountainmanjared!

The tsk_X numbers refer to indexes into tskit's individual table, so we can check by looking at the individuals_time array:

>>> import msprime
>>> temporal_samples = [
...     msprime.SampleSet(num_samples=6, population=0, time=0),
...     msprime.SampleSet(num_samples=1, population=0, time=3),
... ]
>>> ts = msprime.sim_ancestry(
...     samples=temporal_samples,
...     population_size=1000,
...     sequence_length=10000,
...     recombination_rate=1e-8,
... )
>>> ts.individuals_
ts.individuals_flags       ts.individuals_population  
ts.individuals_location    ts.individuals_time        
>>> ts.individuals_time
array([0., 0., 0., 0., 0., 0., 3.])

So yes, tsk_6 is t…

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@mountainmanjared

Answer selected by mountainmanjared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants