Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Feb 25, 2024
1 parent e8c8849 commit 0cb2daa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/tests/beagle_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,9 @@ def compute_alt_allele_frequencies():

def write_vcf(ref_ts, imputed_alleles, imputed_allele_probs, out_file, chr_name="1"):
"""
n = number of diploid individuals
h = number of query haplotypes in the individuals (2 * n)
x = number of imputed sites
n = number of diploid individuals
q = number of query haplotypes in the individuals (2 * n)
:param tskit.TreeSequence ref_ts: Tree sequence with reference haplotypes.
:param numpy.ndarray imputed_site_pos: Physical positions of imputed sites.
Expand All @@ -709,8 +709,8 @@ def write_vcf(ref_ts, imputed_alleles, imputed_allele_probs, out_file, chr_name=
"""
assert imputed_alleles.shape == imputed_allele_probs.shape
assert imputed_alleles.shape % 2 == 0, "Even number of haplotypes is expected."
h = imputed_alleles.shape[0] # Number of query haplotypes
n = h / 2 # Number of diploid individuals
q = imputed_alleles.shape[0] # Number of query haplotypes
n = q / 2 # Number of diploid individuals
x = imputed_alleles.shape[1] # Number of imputed sites.
_HEADER = [
"##fileformat=VCFv4.2",
Expand Down

0 comments on commit 0cb2daa

Please sign in to comment.