Jerome Kelleher

Results 828 comments of Jerome Kelleher
trafficstars

> I'm a bit old school and don't use Jupyter (Vim + shell for me :) ), but I can try to adapt to the 2020's Likewise! vim+tmux is the...

Great, thanks @gtsambos and @agladstein --- can you coordinate with each other on this please? We'll want the simple version definitely, and if the complicated version is generally useful and...

This sounds like a topic much more suited to the "tskit tutorials" site. See proposal here: https://github.com/tskit-dev/tutorials/issues/10 Shall we migrate this issue to the "tutorials" repo?

Transferred from msprime. This would be a good tutorial.

I've been working on this: it's absolutely awesome what numba can do, and it works *beautifully* with the array based tree representation. I'll post some comments here on what I've...

# Total branch length Let's see how we do with a longer running function that takes a bit more computation. We'll compute the total branch length, but doing a simple...

# Postorder sum Since preorder via recursion was fast, let's try postorder (which is *much* easier to do via recursion). Propagating a sum up the tree is a fundamental operation....

OK, let's try something a bit more complicated. We can compute the Sankoff parsimony score of an assigment of genotypes to a particular tree. ```python @numba.njit() def _sankoff_score_numba(parent, cost_matrix, S):...

# Parsimonious assignments ```python ts = ts1m tree = ts.first() parent = np.zeros(ts.num_nodes, dtype=np.int32) right_child = np.zeros(ts.num_nodes, dtype=np.int32) left_sib = np.zeros(ts.num_nodes, dtype=np.int32) time = ts.tables.nodes.time flags = ts.tables.nodes.flags for u...

An update here: https://github.com/tskit-dev/tskit/pull/1320 adds support for the tree arrays, which works very well. I'll need to do a bit of experimentation to see what's the best way of passing...