Closed petrelharp closed 2 years ago
This sometimes doesn't it, actually, since we want to take a subsample of diploids. From the Tutorial:
alive_inds = rts.individuals_alive_at(0)
keep_indivs = np.random.choice(alive_inds, 100, replace=False)
keep_nodes = []
for i in keep_indivs:
keep_nodes.extend(rts.individual(i).nodes)
This will be easier than doing
ts.individuals_alive_at( )
because individuals might not be samples.