镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

simulate_genotype_call_dataset creates duplicate alleles #1221

Closed

Description

@hyanwong

E.g. we can get 2 "C" values in ds['variant_allele']:

import sgkit as sg
import numpy as np

ds = sg.simulate_genotype_call_dataset(n_variant=10, n_sample=4, missing_pct=0, phased=True, seed=1)
for i, alleles in enumerate(ds['variant_allele'].values):
    print(f"Site {i}: {alleles}")
    assert len(np.unique(alleles)) == len(alleles)

Fails on site 6:

Site 6: [b'T' b'T']
---------------------------------------------------------------------------
AssertionError

This can cause much confusion in downstream analysis. See tskit-dev/tsinfer#927

Activity

  1. changed the title [-]simulate_genotype_call_dataset created duplicate alleles[/-] [+]simulate_genotype_call_dataset creates duplicate alleles[/+] on Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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