Repository navigation
Troubleshooting
Real errors kMate produces, and what they mean.
The k-mer counter is missing. On conda-forge, jellyfish is an unrelated Python
library. The program you need is kmer-jellyfish:
mamba install -c conda-forge -c bioconda kmer-jellyfishkMate 0.1.0 on bioconda depended on the wrong one; use 0.1.2 or newer (see Installation).
The pool has too little sequence matching the panel for a stable estimate. Check the library's depth first (a failed library looks like flat, very low coverage on every chromosome), then that the reads come from a pool of this panel's founders. The estimates are still written, but treat them as noise.
Nothing in the reads matched the panel on that chromosome, so the mixture and every
allele frequency there are written as NaN. Usually the reads are not from a pool of
this panel's founders, or the library failed.
You have kMate 0.1.4 or older: its kmate build-index used jellyfish's Python
bindings, which bioconda's kmer-jellyfish ships only for Python 3.9–3.12. On a newer
Python (a fresh solve picks the newest) the bindings do not load. Upgrade: from 0.1.5
kMate uses only the jellyfish program and runs on any Python.
mamba create -n kmate -c conda-forge -c bioconda kmate "python<3.13"
kmate --version # 0.1.5 or newerYour VCF has diploid genotypes. A kMate panel column is a haplotype (see Haplotypes and windows), so one allele per genotype is required:
kmate decompose --haploidize --het missing ... # inbred founders
kmate decompose --haploidize --het split ... # outbred, phased foundersSee Building a panel.
Your VCF has records with several ALTs. Decompose with kmate decompose. Do not use
bcftools norm -m -any, which silently loses carriers on a pangenome graph.
You asked to split samples into haplotypes, but a genotype is unphased (0/1). kMate
refuses rather than guess, because guessing invents haplotypes. Either phase the VCF,
or use --het missing if your founders are inbred lines.
annotate_vcf.py needs phased or haploid genotypes (0|1, 1), and stops on an
unphased one (0/1). A Minigraph-Cactus VCF is always phased, so this usually means the
VCF you passed is not the graph's own VCF. Use the --annotated-vcf /
--biallelic-catalog route for VCFs genotyped on the graph by another tool.
Something is wrong with the install itself; fix this before anything else. The usual
cause is the jellyfish mix-up above. Check kmate --version is 0.1.2 or newer.
The k-mer matrix is loaded densely: roughly 20 GB for a few hundred founder haplotypes on one chromosome. Request ~32 GB and run one chromosome at a time.
Almost always the k-mer databases sitting on shared network storage. Put them on
node-local disk or RAM ($TMPDIR, /dev/shm). We measured queries up to 48×
slower when many jobs read their databases off a shared filesystem simultaneously.
Check these in order:
- Coverage. Below ~1× the estimates are mostly noise. QC and drop failed libraries before estimating.
-
--unit. Selfing/inbred pools need--unit chrom; recombinant pools need--unit bp. The wrong one produces plausible-looking but wrong numbers; see Running kMate. -
The founder-haplotype mixture (
*.h_per_chrom.npz). If it collapsed onto a few haplotypes when you expected many, the problem is upstream of the frequencies. -
How you joined samples. Merging on
chrom/posalone matches the wrong allele where a position carries more than one variant. Join row-wise. -
n_called. Low-support variants are weak regardless of whatsesays.
Open an issue at https://github.com/Tatianabellagio/kMate/issues with the command
you ran, the full error, and kmate --version.