Skip to content

How to remove low frequency mutations? #1690

Answered by benjeffery
kliao12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kliao12!

(seems @petrelharp and I were typing at the same time!)

set_mutations was removed way back in 2017 in before tskit was split from msprime 805d745

The tutorial example was removed in 2018: 5b25db2 which would have been released in 0.5.0 in Feb '18

Where were you viewing the tutorial? It would be good to know so we can update it!

The TreeSequence class is now immutable, if you want to modify the mutations table you create a new one via the tskit.TableCollection which provides ways to mutate the underlying data of a tree sequence:

tables = tree_sequence.tables
tables.mutations.clear()
for tree in tree_sequence.trees():
    for mutation in tree.mutations():
        p = tree.get_n…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@petrelharp
Comment options

@hyanwong
Comment options

@benjeffery
Comment options

Answer selected by hyanwong
Comment options

You must be logged in to vote
1 reply
@benjeffery
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1689 on May 26, 2021 17:44.