Hi-C guided genome assembly
Project description
Hi-C scaffolding tool to assemble contigs/scaffolds into complete chromosomes
This software uses Hi-C sequencing data to assemble contigs/scaffolds into complete chromosomes. The assembly process consists of the following steps:
creation of corrected Hi-C contact matrix
detection of mis-assemblies (automatic and/or manual)
creation of initial path graph
iterative joining of high-confidence scaffold paths
addition of scaffolds that were not used yet
saving of scaffolds fasta file and liftover chain file
HiCAssembler automatically visualizes the assembly process to inform the user on the assembly status
![HiCAssembler assembly](./docs/content/images/HiCAssembler_assembly.png)
Installation
HiCAssembler works with python 2.7 and requires that [HiCExplorer](https://hicexplorer.readthedocs.io/) is installed
To install HiCAssembler use pip.
`bash $ pip install HiCAssembler `
If you want to install the latest version use:
`bash $ pip install git+https://github.com/maxplanck-ie/HiCAssembler.git `
Usage
Before running HiCAssembler, creation of a corrected Hi-C matrix in h5 format is required. This file format is the output created by HiCExporer (http://hicexplorer.readthedocs.io/). Hi-C reads need to be mapped to your pre-assembled contigs/scaffolds and then the Hi-C matrix needs to be created and corrected. An example usage of HiCExporer for these steps can be found at http://hicexplorer.readthedocs.io/en/latest/content/example_usage.html.
Afterwards, you can start to assemble your pre-assembled contigs/scaffolds into chromosomes using HiCAssembler.
`bash $ assemble -m Hi_C_matrix_corrected.h5 -o ./assembly_output \ --min_scaffold_length 100000 --bin_size 5000 --misassembly_zscore_threshold -1.0 \ --num_iterations 3 --num_processors 16 `
–min_scaffold_length 100000 sets the minimal length of pre-assembled scaffolds to 100 kb. Scaffolds smaller than 100 kb are added after the iterative correction.
–bin_size 5000 sets the Hi-C bin size to 5 kb. This would be the size of high-resolution bins referred to in the algorithm description.
–misassembly_zscore_threshold -1.0 sets the threshold deciding if a TAD-separation score is strong enough to be considered a mis-assembly.
–num_iterations 3 sets the number of assembly iterations to 3.
In case your final result contains assembly errors, you can manually correct them. The position of assembly errors can be specified and added as a position to cut your pre-assembled contigs/scaffolds before the assembly using the –split_positions_file split.bed parameter. The exact position of the error in the pre-assembled contigs/scaffolds can be identified by using the tool plotScaffoldInteractive.
`bash $ plotScaffoldInteractive scaffold_123 `
The position of the assembly error is displayed by moving your cursor over it.
Citation
Prepring in preparation
Examples
(A small corrected Hi-C matrix can be found in the data/ folder)
A minimal example of the assembly of several scaffolds:
`bash $ assemble -m /data/hic_small.h5 -o ./assembly_output \ --min_scaffold_length 100000 --bin_size 5000 --misassembly_zscore_threshold -1.0 \ --num_iterations 3 --num_processors 16 `
Each step of the assembly is automatically visualized.
![HiCAssembler visualization](./docs/content/images/HiCAssembler_visualization.png)
Now, let’s see how scaffolds with and without mis-assemblies look like:
![HiCAssembler assembly errors](./docs/content/images/Assembly_errors.png)
Assembly errors can easily be detected as an abrupt change in the Hi-C signal. HiCAssembler automatically splits scaffolds at minima of the Hi-C score as shown here:
![HiCAssembler score](./docs/content/images/Assembly_errors_score.png)
Strong TAD boundaries with a low TAD-separation score can wrongly be considered as mis-assemblies. The threshold of the score where scaffolds get split needs to be chosen using the –misassembly_zscore_threshold parameter. A balance between too many splits and thus very small scaffolds after splitting and too many left-over mis-assemblies needs to be found. We identified a score of -1 as a good starting point for assemblies but we recommend to test several settings. Some scaffolds will be split at TAD boundaries. This is no problem because they will be connected again by the assembly process afterwards.
If not all mis-assemblies are split automatically, splits can be added manually using the –split_positions_file split.bed parameter. The exact position of the error in the pre-assembled contigs/scaffolds can be identified by using the tool plotScaffoldInteractive.
`bash $ plotScaffoldInteractive scaffold_123 `
The position of the assembly error is displayed by moving your cursor over it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file HiCAssembler-1.1.1.tar.gz
.
File metadata
- Download URL: HiCAssembler-1.1.1.tar.gz
- Upload date:
- Size: 93.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.12.4 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fc4e49c11454d17eb7e6e8a835515077afd4abceb7b6c1b5080780b428f46e2 |
|
MD5 | 086d39f2f7631ba0a9f96fbc24220322 |
|
BLAKE2b-256 | ec1e83f428ebc7b53abab7098c42c107536a088c2d8707baa3df26c229d77a37 |