Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential to use .frequencies() method in /tutorial.html #336

Open
hyanwong opened this issue Nov 16, 2023 · 0 comments
Open

Potential to use .frequencies() method in /tutorial.html #336

hyanwong opened this issue Nov 16, 2023 · 0 comments

Comments

@hyanwong
Copy link
Member

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():

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant