This repository primarily contains scripts and computational code used to calculate Hi-C scaffolding index and to perform data simulation, scaffolding, evaluation, and processing, as described in the manuscript.
Author: Zijie Jiang
Email: jiangzijie@sjtu.edu.cn
HSI is defined as the ratio of cis- to trans-interactions across the whole-genome interaction matrix and is computed in three main steps. First, the whole-genome interaction matrix is extracted from the input file, which can be provided in either dense (.hic) or sparse (.bed) format. This matrix serves as the basis for subsequent calculations. Second, the matrix is partitioned into submatrices according to the user-specified resolution and scaffold size to facilitate localized counting. Finally, the HSI is calculated using predefined formulas
First, the whole-genome interaction matrix is extracted from the Hi-C results based on the specified resolution.
juicer_tool=/paht/juicer/scripts/common/juicer_tools.jar
hic_path=sample_scaffolder.hic
resolution=500000
output=sample_scaffolderr_500K.txt
java -Xmx100g -jar $juicer_tool dump observed KR $hic_path assembly assembly BP $resolution $outputNots:
-
juicer_tools.jaris from https://github.com/aidenlab/juicer -
The
.hicfile is generated from the scaffolding results; please refer to the respective scaffolders' tutorials for more information. -
The
resolutionused in this article were 100kb, 500kb, and 2.5Mb. Higher resolutions require more time to extract the matrix and calculate the Hi-C scaffolding index. It is recommended to calculate the Hi-C scaffolding index at multiple resolutions (here use 500kb for example).
python3 ./HSI/hsi.py <matrix_file> <chrom_lengths_file> <bin_size> <outdir>Nots:
matrixfrom the preceding preprocessing step.chrom_lengths_filecontains the lengths of each sequence in the scaffolds (format: name /t length).- The
bin_sizeused in this article were 100kb, 500kb, and 2.5Mb. It is recommended to calculate at multiple resolutions (here use 500kb for example).
Visualizing the index curve for each scaffold allows for the identification of potential intra-scaffold misassemblies.
python ./HSI/plot_index.py <index.txt> <outdir>Nots:
index.txtfrom calculate Hi-C scaffolding index step.
Details regarding the data simulation can be found in simulation.
Details regarding the scaffolding can be found in scaffolding.
Details regarding the performance evaluation can be found in evaluation.
If you used Hi-C scaffolding index in your research, please cite us:
Zijie Jiang, Chaochun Wei, Systematic benchmarking of Hi-C-based scaffolding methods in genome assembly, Briefings in Bioinformatics, Volume 27, Issue 6, November 2026, bbag647, https://doi.org/10.1093/bib/bbag647
This software is distributed under the GNU General Public License v3.0.
