This skill builds haplotype-resolved diploid and telomere-to-telomere (T2T) genome assemblies from PacBio HiFi reads. HiFi reads are simultaneously long (15-25 kb) and accurate (~Q30), which made phased diploid assembly routine and shifted the field's deliverable from one collapsed reference to two phased haplotypes (and onward to the pangenome). The core tool is hifiasm (HiFi-only, Hi-C, or trio phasing); verkko handles true T2T when HiFi is paired with ultralong ONT and trio/Hi-C. The recurring judgment is that a "primary" assembly is a haplotype mosaic that exists in no cell, and that switch errors - the defining error of phasing - are invisible to N50, BUSCO, and base QV, so k-mer/trio QC (Merqury hap-mer blob plots, switch/hamming error) is the only window onto them.
# Core assembler + trio k-mer tool
conda install -c bioconda hifiasm yak
# GFA-to-FASTA extraction
conda install -c bioconda gfatools
# T2T (HiFi + ultralong ONT); heavy, Snakemake-orchestrated
conda install -c bioconda verkko
# Phasing QC (hap-mers, switch/hamming) - see assembly-qc
conda install -c bioconda merqury meryl
Profile the sample first (k-mer spectrum via GenomeScope) to learn genome size and heterozygosity - this drives the purge setting and whether phasing is even meaningful.
Tell your AI agent what you want to do: - "Assemble my diploid HiFi reads with hifiasm" - "Phase my assembly with Hi-C since I do not have parental data" - "Run a trio-binned assembly with both parents' Illumina reads" - "My sample is an inbred line - assemble it without purging real duplications" - "I have HiFi plus ultralong ONT and want a T2T assembly" - "Convert the hifiasm GFA output to FASTA"
"Assemble my diploid plant HiFi reads with hifiasm, then explain why the primary assembly is not one of the two haplotypes and which output I should hand to a phased variant caller." "I have HiFi plus a Hi-C library and no parents. Run hifiasm Hi-C phasing and tell me whether the resulting hap1/hap2 are globally or partially phased."
"Build yak k-mer databases from the parental Illumina reads at k=31 and run a trio-binned hifiasm assembly of the child. Note that the output uses the .dip. prefix."
"This is a doubled-haploid line. Assemble it with purging disabled so hifiasm does not delete real segmental duplications, and explain why default purging would be wrong here." "My hap1 came out 1.4x the size of hap2. Diagnose this as a coverage-estimate problem and re-run with --hom-cov set from the k-mer histogram."
"I have 40x HiFi, ultralong ONT with a 90 kb N50, and parental reads. Decide whether verkko or hifiasm --ul is the right call for a T2T assembly and justify it."
"I have a phased assembly but only N50 and BUSCO were reported. Explain why those cannot see switch errors and what k-mer QC I need to actually validate the phasing."
--ul if T2T is the genuine goal and ultralong reads exist.-l0 for inbred/homozygous; default otherwise) and pin --hom-cov if haplotype sizes come out unbalanced.S lines to FASTA..bp. = HiFi-only/Hi-C, .dip. = trio) and report which file is the mosaic primary vs the two haplotypes..bp. (balanced phasing) = HiFi-only or Hi-C; .dip. (diploid) = trio.-l3 HiFi-only). That is correct for outbred diploids but DELETES real segmental duplications in inbred/homozygous/mole samples - use -l0 there.--hom-cov from the k-mer histogram.--ul without long UL reads will not close centromeres.S lines (gfatools gfa2fa or awk) before any downstream tool, but keep the GFA for its bubble/alternate-path information.