Repository navigation
LongPhase v2.1.2
Summary
LongPhase v2.1.2 includes two changes:
- Large deletions from split alignments (#136). They are now phased, including two overlapping heterozygous deletions on different haplotypes.
- Less memory and time (#135). This applies to
phase,modcallandhaplotag.
It also fixes bugs in haplotag and modcall, and makes command-line options match the help.
With --sv-file, an SV is no longer the only link between two phase blocks, and --sv-threshold defaults to 0.20 with --ont. Without an SV file, phase output is the same as v2.1.1.
Main
1. Large deletions from split alignments (#136, fixes #126)
- Split alignments. Since v2.0, a deletion whose supporting reads are split by the aligner (about 20 kb or more with minimap2 defaults) was not phased, and two overlapping deletions could end up on the same haplotype. For reads that end at the SV, the SA junction is now used, or INFO/RNAMES when the SV VCF has it.
- CNV filter. SV alleles are no longer erased by the CNV mismatch filter.
- GNN correction. Deletions of at least 10 kb with unanimous votes keep their phase.
2. SVs and phase blocks, --sv-threshold by platform
- Phase blocks. A variant whose votes all come from SVs now starts a new block. SVs still vote inside a block and are phased in it.
--sv-join-blocksgives the old behaviour (longer blocks, more wrong joins). --sv-threshold. The default is 0.20 with--ontand stays 0.10 with--pb;-hstill sets it.- Results. HG002 nanopore 10–60× and HiFi 10–50×, scored against GIAB v4.2.1 (SNVs) and the HG002 T2T assembly (SVs):
- Switch and Hamming errors fall at every coverage.
- SVs phased wrong fall at every coverage.
- Fewer than 0.03% of phased SNVs and at most 2% of block N50 are lost.
- The same holds on HG005 nanopore (chr12–22, trio-phased truth).
- Per-coverage tables are in #135.
3. Memory and time (#135)
- What changed. Phase graph, read and vote storage, GNN forward pass, VCF writing, reference handling, and
modcallandhaplotaginternals. Output is identical apart from the fixes below. - Measurements. HG002 nanopore 10×
phase, compared with v2.1.1:- peak memory 19.9 → 1.4 GiB (HDD,
-t 24); - wall time 542 → 189 s (HDD,
-t 1); - wall time 93 → 48 s (NVMe,
-t 24).
- peak memory 19.9 → 1.4 GiB (HDD,
modcall. Nanopore 10× on NVMe,-t 24: 63.0 → 5.9 GiB and 79 → 42 s.
4. Fixes (output changes)
haplotagvotes at phased deletions went to the wrong haplotype, since 1.7. Read-tagging error with aphase --indelsVCF: nanopore 30× 6.56 → 6.48%, HiFi 30× 2.53 → 2.42%.- A SNP inside a read's deletion no longer votes.
- The homopolymer check now covers the last phase block of each chromosome.
modcall --allstopped writing a chromosome at its first position that is not written, since 2.0. Now every position is written.modcallcalls at CIGAR operation boundaries were taken with the operation before, since 1.5.1. Calls not on the expected base fall from 8.07 to 6.56 million at 10×.
5. Options as documented
- Option names.
--sv-window,--sv-thresholdandmodcall --bam-filework as in the help. The earlier names are still accepted. - Short options.
modcall -aand-care accepted. - Argument checks.
phasestops on a missing-bor BAM,haplotagchecks-r, andphaseandmodcallstop on an unknown option. - Help text.
modcalldefaults are corrected.-xis noted as unused since 2.0. The GNN break threshold default is 0.35.
Speed and memory
Release binary, SNVs only, phase --ont -t 24, HG002 nanopore 10–60× replicate 1. One run per coverage, with the page cache cleared and inputs and outputs on ext4 (Crucial T710):
- wall time 15–51 s, where v2.1 took 67–240 s;
- peak memory 2.5–4.5 GiB, where v2.1 used 20–31 GiB.
Download
longphase_linux-x64.tar.xzis a static Linux x86-64 binary built from this release.- Its output is identical to a dynamic build for
phasewith SNVs, indels, SVs and 5mC, formodcalland forhaplotag. - SNV-only
phaseoutput at 10–60× is identical to v2.1.1.
- Its output is identical to a dynamic build for
- SHA256:
longphase_linux-x64.tar.xz:02fd88966d7d8e1a21a05e75bf135cdb1670c463c1700b16d06f9d2f69db89f1longphase_linux-x64:d61a744bdbbdd3144a05f6924b1d482d351a803f9f068193758ad1621de6ae5b
- When building from source in an existing directory, run
make clean && make; the Makefile does not track header dependencies.
Code Changes
- #137 – Release v2.1.2 (develop → main).
- #136: phase large deletions from split alignments, including overlapping heterozygous deletions (#126).
- #135:
- less memory and time for
phase,modcallandhaplotag; - #136 merged into the speed-up branch;
- SV block joins off by default (
--sv-join-blocks) and--sv-thresholdby platform; - the
haplotagandmodcallfixes; - options as documented;
- the version bump to 2.1.2.
- less memory and time for
- README download link and speed table for 2.1.2 (ac5e283).