Repository navigation
Output
Tatianabellagio edited this page Sep 29, 2026
·
6 revisions
kmate run writes a tab-separated table with a header, one row per variant in the
panel:
chrom pos ref_len alt_len alt_freq info n_called se
| column | meaning |
|---|---|
chrom, pos
|
position, 1-based |
ref_len, alt_len
|
length of the REF and ALT alleles |
alt_freq |
frequency of the ALT allele in the pool, 0-1 |
info |
how much haplotype mass had a genotype call here |
n_called |
how many founder haplotypes had a genotype call here |
se |
binomial standard error of alt_freq from n_called
|
Alongside it, *.h_per_chrom.npz holds the estimated founder-haplotype mixture: one
value per haplotype, summing to 1.
Derive it from the lengths:
| type | rule |
|---|---|
| SNP | ref_len == 1 and alt_len == 1 |
| indel |
ref_len != alt_len and max(ref_len, alt_len) < 50
|
| structural variant | max(ref_len, alt_len) >= 50 |
import pandas as pd
df = pd.read_csv("MYPOOL_Chr1.tsv", sep="\t")
snp = (df.ref_len == 1) & (df.alt_len == 1)
sv = df[["ref_len", "alt_len"]].max(axis=1) >= 50Every sample run against the same panel produces the same rows in the same order, so they stack directly:
import pandas as pd
a = pd.read_csv("POOL_A_Chr1.tsv", sep="\t")
b = pd.read_csv("POOL_B_Chr1.tsv", sep="\t")
delta = b.alt_freq - a.alt_freq # row-wise, no merge neededDo not merge on
chromandpos. A position can carry several variants (a SNP and an indel starting at the same base), so a position key matches the wrong allele. Join row-wise, or on all four ofchrom, pos, ref_len, alt_len.
-
n_calledis the support behind each estimate: a frequency from few haplotypes is weak regardless ofse. Filter on it. -
alt_freqis a frequency among called haplotypes. Founder haplotypes missing at a variant are excluded rather than counted as reference. -
Check the founder-haplotype mixture before trusting per-variant numbers. Collapse
onto a handful of haplotypes where many were expected indicates a problem upstream:
coverage, the panel, or
--unit.