YosefLab / Cassiopeia

A Package for Cas9-Enabled Single Cell Lineage Tracing Tree Reconstruction
https://cassiopeia-lineage.readthedocs.io/en/latest/
MIT License
77 stars 24 forks source link

Supercellular sampler #97

Closed Lioscro closed 3 years ago

Lioscro commented 3 years ago

SupercellularSampler implementation, along with several utility functions in CassiopeiaTree that are useful in dealing with ambiguous states and branch distances.

Some important changes are the following.

from functools import partial
dissimilarity_function = partial(cluster_dissimilarity, weighted_hamming_distance)
tree.compute_dissimilarity_map(dissimilarity_function)

I had considered whether this should be done automatically in compute_dissimilarity_map, but felt that the arguments should always be explicit for the user.

This PR is big enough for reviews from both @mattjones315 and @richardyz98.

Lioscro commented 3 years ago

Thanks for the helpful reviews @mattjones315! Almost ready for merge. :)

Lioscro commented 3 years ago

@mattjones315 and I went through some extensive reviews, but could you also take a look @richardyz98? Would appreciate any feedback!