Skip to content

nmut approximation via rounded expectation can be inaccurate in edge cases. #2

@croth1

Description

@croth1

nmut = int(clade.branch_length * mutation_rate * ncol)

The current implementation uses the rounded expectation over the full sequence as the number of mutations nmut . This can be problematic in edge cases (sequences very short or mutation rate very low).

A better alternative in these cases would be drawing nmut probabilistically:

nmut = np.random.poisson(lam=clade.branch_length*mutation_rate, size=ncol).sum()

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