Skip to content

Confusing definition of VariantData.num_samples #1071

@hyanwong

Description

@hyanwong

"Samples" in a VariantData file normally refer to diploids (i.e. tskit "individuals"). However, vdata.num_samples currently returns the number of sample nodes (i.e. twice the expected number of VariantData samples, in the diploid case). I presume this is to match the SampleData format, but it seems very confusing to me.

I wonder if it would be a good idea to define vdata.num_sample_nodes instead, and raise an error when calling vdata.num_samples that says "this is no longer supported: either use .num_sample_nodes if you want the skit-version. or num_individuals if you want the number of sampled individuals (e.g. diploids)"

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