Skip to content

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

Open

Description

@hyanwong

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions