"At time of writing, we don’t have a built-in allele_frequency method, so we’ll use the following snippet"
But now we have Variant.frequencies():
import msprime
ts = msprime.sim_mutations(msprime.sim_ancestry(10, sequence_length=10, random_seed=1), rate=1, random_seed=1)
for v in ts.variants(samples=np.arange(5)):
print(v.frequencies())
I didn't fully look at the example, but would this make the whole thing easier, @petrelharp ?
At the moment the tutorial.html page says:
"At time of writing, we don’t have a built-in allele_frequency method, so we’ll use the following snippet"
But now we have
Variant.frequencies()
:I didn't fully look at the example, but would this make the whole thing easier, @petrelharp ?