2019-12-28 16:18:50 -05:00
2019-11-13 20:18:11 -05:00
2019-12-26 09:41:15 -05:00
2019-12-28 04:45:53 -05:00
2019-12-28 04:45:53 -05:00
2019-12-28 16:18:50 -05:00
2019-12-28 04:45:53 -05:00
2019-12-26 09:40:35 -05:00
2019-12-26 02:26:24 -05:00
2019-12-26 02:26:24 -05:00
2019-12-26 02:26:24 -05:00
2019-11-13 20:18:11 -05:00
2019-05-10 16:14:01 -04:00
2019-12-26 02:26:24 -05:00
2019-11-13 20:18:11 -05:00
2019-12-26 02:26:24 -05:00
2019-11-13 20:18:11 -05:00
2019-11-13 20:18:11 -05:00
2019-12-26 02:26:24 -05:00
2019-12-26 09:40:35 -05:00
2019-05-09 15:34:58 -04:00
2019-12-28 04:45:53 -05:00
2019-12-26 02:26:24 -05:00
2019-12-26 02:26:24 -05:00
2019-07-14 21:13:50 -04:00
2019-12-28 04:45:53 -05:00
2019-12-28 04:45:53 -05:00
2019-12-26 02:26:24 -05:00
2019-12-28 04:45:53 -05:00
2019-12-28 04:45:53 -05:00
2019-12-28 04:45:53 -05:00
2019-12-28 16:18:50 -05:00

Getting Started

# Install hifiasm (requiring g++ and zlib)
git clone https://github.com/chhylp123/hifiasm.git
cd hifiasm && make
# Assembly
./hifiasm -t 32 NA12878.fq.gz

Introduction

Hifiasm is an ultrafast haplotype-resolved de novo assembler based on PacBio Hifi reads. Unlike most existing assemblers, hifiasm starts from uncollapsed genome. Thus, it is able to keep the haplotype information as much as possible. The input of hifiasm is the PacBio Hifi reads in fasta/fastq format, and its outputs consist of:

  1. Haplotype-resolved assembly unitig graph in GFA format (hifiasm.asm.utg.gfa in dafault).
  2. Haplotype-resolved assembly unitig graph in GFA format without small bubbles (hifiasm.asm.wsb.utg.gfa in dafault). Small bubbles might be caused by somatic mutations, which are useless for some applications.
  3. Primary assembly contig graph in GFA format (hifiasm.asm.ctg.gfa in dafault).
  4. Alternate assembly contig graph in GFA format (hifiasm.asm.alter.ctg.gfa in dafault).
  5. Haplotype-aware error corrected reads in fasta format (hifiasm.asm.ec.fa in dafault).
  6. All-to-all overlaps in paf format (hifiasm.asm.paf).

So far hifiasm is still in early development stage, it will output phased chromosome-level high-quality assembly in the near future. In addition, hifiasm also outputs three binary files that save all overlap inforamtion (hifiasm.asm.gfa.aux.bin/hifiasm.asm.gfa.aux.reverse.bin/hifiasm.asm.gfa.aux.source.bin in dafault). With these files, hifiasm can avoid the time-consuming all-to-all overlap calculation step, and do the assembly directly and quickly. This might be helpful when you want to get an optimized assembly by multiple round of experiments with different parameters.

Hifiasm is a standalone and lightweight assembler, which does not need external libraries (except zlib). For large genomes, it can generate high-quality assembly in a few hours. Hifiasm has been tested on the following datasets:

Dataset GSize Cov Asm options CPU time Wall time RAM unitig/contig N50[1]
[Human NA12878] 3Gb x28 -k 40 -t 42 -r 2 200h 5h32m ?114G 93.5Kb/18.6Mb
[Human HG002] 3Gb x43 -k 40 -t 42 -r 2 ?405h ?10h12m ?122G 320kb/29Mb
[Human CHM13] 3Gb x27 -k 40 -t 42 -r 2 ? ? ? NA[2]/39.8Mb
[Butterfly] 358Mb x35 -k 40 -t 42 -r 2 -z 20 17.1h 36m 16G 7.5Mb/NA[3]

[1] unitig N50 is the N50 of assembly graph with haplotype information (i.e., bubbles), while the contig N50 is the N50 of haplotype collapsed assembly (i.e., without bubbles). [2] CHM13 is a homozygous sample, so that unitig N50 makes no sense. [3] Butterfly has high heterozygous rate, so that most chromosomes have been fully separated into two haplotypes. In this case, contig N50 makes no sense.

Usage

For Hifi reads assembly, a typical command line looks like:

./hifiasm -o NA12878.asm -k 40 -t 32 -r 2 NA12878.fq.gz

where NA12878.fq.gz is the input reads and -o specifies the output files. In this example, all output files can be found at NA12878.asm.*. -k, -t and -r specify the length of k-mer, the number of CPU threads, and the number of correction rounds, respectively. Note that at first run, hifiasm will save all overlaps to disk, which can avoid the time-consuming all-to-all overlap calculation next time. For hifiasm, once the overlap information has been obtained during the previous run in advance, it is able to load all overlaps from disk and then directly do assembly. If you want to ignore the pre-computed overlap information, please specify -i or simply delete *gfa.aux.bin, *gfa.aux.reverse.bin and *gfa.aux.source.bin.

Please note that some old Hifi reads may consist of short adapters. To improve the assembly quality, adapters should be removed by -z as follow:

./hifiasm -k 40 -t 42 -r 2 -z 20 butterfly.fq.gz

In this example, hifiasm will remove 20 bases from both ends of each read.

Getting Help

The -h option of hifiasm provides detailed description of options. If you have further questions, please raise an issue at the issue page.

Limitations and future works

  1. For genome with low heterozygous rate, hifiasm only outputs haplotype-resolved assembly graph, instead of the phased chromosome-level assembly (will support such output in the near future).

  2. The running time and memory usage should be further reduced.

  3. The N50 should be further improved.

Description
Hifiasm: a haplotype-resolved assembler for accurate Hifi reads
Readme MIT 21 MiB
Languages
C++ 93.2%
C 6.5%
Roff 0.2%