Package: hifieval
Getting startedInstall through pip:pip install hifievalInstall through conda:conda install hifievalInstall one error correction/assembly tool:hifiasmfor exampleInstallminimap2# get test data
wget https://zenodo.org/record/7799845/files/ecoli.reads.fastq?download=1  # simulated raw reads
wget https://zenodo.org/record/7799845/files/ecoli.ref.fasta?download=1  # reference genome

# get error corrected reads
hifiasm -o ecoli.asm.hifiasm --primary -t 10 --write-ec ecoli.reads.fastq 2> ecoli.asm.hifiasm.log

# get alignment paf files
minimap2 -t 8 -cx map-hifi --secondary=no --paf-no-hit --cs ecoli.ref.fasta ecoli.reads.fastq > ecoli.raw.paf
minimap2 -t 8 -cx map-hifi --secondary=no --paf-no-hit --cs ecoli.ref.fasta ecoli.asm.hifiasm.ec.fa > ecoli.hifiasm.paf

# get evaluation files
hifieval.py -o ecoli.hifiasm -r ecoli.raw.paf -c ecoli.hifiasm.pafUsers' Guidehifieval [options] -r <raw.paf> -c <corrected.paf>Hifieval is a tool to evaluate long-read error correction mainly with PacBio High-Fidelity Reads (HiFi reads). Use commandhifievalto see available options.The input of this tool takes in two .paf files: one is raw reads aligned to reference genome; the other is corrected reads aligned to reference genome. PAF is a text format describing the approximate mapping positions between two set of sequences.The paf file will encodes difference of sequence alignments in the short form, indication substitution, insertion, and deletion. The metrics of error correction are:OC: (over-correction) The errors appeared in corrected reads but not in raw readsUC: (under-correction) The errors in raw reads that are still in corrected readsCC: (correct-correction) The errors that are in raw reads but not corrected readsGeneral usageExamples of Error Correction (EC) tools to output error corrected readshifiasm:hifiasm -o <prefix> --write-ec -t32 <read_files> 2> <prefix>.logLJA:lja -o <output_dir> --reads <reads_file> [--reads <reads_file2> …]Verkko:verkko -d <output_dir> --hifi <reads_files>If the EC tool produce HPC corrected reads, useseqtkto perform homopolymer-compression (HPC) on raw reads and the reference:seqtk hpc <file>Minimap2is used to generate the paf files using the command, the --cs tag is required:./minimap2 -t8 -cx map-hifi --secondary=no --paf-no-hit --cs <ref_fasta_file> <read_files>  > <prefix>.pafAdvanced featuresOn top of FPR and TPR for the corrections, errors in homopolymer (HP) regions can be further incorporated if the assembly tool does not perform HPC on the raw reads during the error correction step using the command:hifieval [options] -h <reference_file> -r <raw.paf> -c <corrected.paf>HP regions of different lengths are identified, and UC/OC that fall within these regions is calculated. Here the error rate is calculated by ${\verb|#|HP_{x,with,error}}/{\verb|#|HP_{x}}$. for HP with length $x$. However, since most of the assembly tools use HPC reads during their error correction step, HP evaluation is optional.Output overviewsummary.tsv: the most detailed summary of EC performance for any downstream analysiscontains 12 columns: readName, raw_mapped_chr, raw_start, raw_end, raw_mq, corrected_mapped_chr, corrected_start, corrected_end, corrected_mq,  num_oc, num_uc, num_ccrdlvl.eval.tsvcounts how many corrected reads have 1 oc/uc, 2 oc/uc, etc. for each chromosome and all chromosomesmetric.eval.tsvoverall metrics for each chromosome and all chromosomeshp.ErrorRate.tsvcontains the error rates for each length of the homopolymers