Skip to content

Span normalise argument to 'TreeSequence.genetic_relatedness_vector` does nothing #3241

@nspope

Description

@nspope
import msprime
import tskit
import numpy as np

print(tskit.__version__)  # 0.6.5.dev0

ts = msprime.sim_ancestry(10, recombination_rate=1e-8, sequence_length=1e6, population_size=1e4)
for centre in [True, False]:
    grm0 = ts.genetic_relatedness_vector(np.eye(ts.num_samples), mode='branch', span_normalise=True, centre=centre)
    grm1 = ts.genetic_relatedness_vector(np.eye(ts.num_samples), mode='branch', span_normalise=False, centre=centre)
    np.testing.assert_allclose(grm0, grm1)

and based on the scaling, what comes out is not span normalised

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions