Applying hard-masking to tree sequences will result in many split small edges, especially if the mask is fine-scale. It'd be better for the EP algorithm to collapse equivalent edges---those with the same parent and child node---prior to EP, by summing the observed and expected mutational target. This is trivial to do, and will both reduce the runtime and make EP more stable. The catch is that singleton edges need to be handled separately because of how the phase-agnostic algorithm works.
Applying hard-masking to tree sequences will result in many split small edges, especially if the mask is fine-scale. It'd be better for the EP algorithm to collapse equivalent edges---those with the same parent and child node---prior to EP, by summing the observed and expected mutational target. This is trivial to do, and will both reduce the runtime and make EP more stable. The catch is that singleton edges need to be handled separately because of how the phase-agnostic algorithm works.