Skip to content

Return "alleles" as a numpy ragged array #2168

@hyanwong

Description

@hyanwong

I thought I might have brought this up before, but can't find the issue. Is there a performance reason why we return the "alleles" for a variant as a tuple rather than a numpy array? It's handy to be able to get our the allelic states by doing variant.alleles[variant.genotypes] but at the moment this needs to be wrapped like this:

np.array(variant.alleles)[variant.genotypes]

which is a tad messy.

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