HilbertCurve
Hilbert curve is a type of space-filling curves that fold one dimensional axis into a two dimensional space, but with still preserves the locality. This package aims to provide an easy and flexible way to visualize data through Hilbert curve.
Cite this software
Description
HilbertCurve
Hilbert curve is a type of space-filling curves
that fold one dimensional axis into a two dimensional space, but with still keeping the locality.
It has advantages to visualize data with long axis in following two aspects:
- greatly improve resolution for the visualization;
- easy to visualize clusters because generally data points in the cluster will also be close in the Hilbert curve.
This package aims to provide an easy and flexible way to visualize data through Hilbert curve.
The implementation and example figures are based on following sources:
- http://mkweb.bcgsc.ca/hilbert/
- http://corte.si/posts/code/hilbert/portrait/index.html
- http://bioconductor.org/packages/devel/bioc/html/HilbertVis.html
Citation
Zuguang Gu, et al., HilbertCurve: an R/Bioconductor package for high-resolution visualization of genomic data.
Bioinformatics 2016
Install
The package is at Bioconductor now
and you can install the newest version by:
library(devtools)
install_github("jokergoo/ComplexHeatmap") # in order to get the newest version of ComplexHeatmap
install_github("jokergoo/HilbertCurve")
Usage
Basically, there are two steps to make a Hilbert curve.
- Initialize the curve and also map the one-dimensional axis to the curve.
- add low-level graphics by
hc_points(),hc_segments(), ... by giving the positions of the graphics.
hc = HilbertCurve(1, 100, level = 4)
hc_points(hc, ...)
hc_segments(hc, ...)
hc_rect(hc, ...)
hc_text(hc, ...)
There is another 'pixel' mode which provides a high resolution for visualizing genomic data by the Hilbert curve.
hc = HilbertCurve(1, 100000000000, level = 10)
hc_layer(hc, ...) # this can be repeated several times to add multiple layers on the curve
hc_png(hc, ...)
Examples
Rainbow color spectrum:

Chinese dynasty:

GC percent and genes on chromosome 1:

Association between H3K36me3 histone modification and gene bodies:

Methylation on chromosome 1:

Copy number alterations in 22 chromosomes:

License
MIT @ Zuguang Gu
Participating organisations
Reference papers
Mentions
- 1.Author(s): Oluwademilade Nuga, Kristin Richardson, Nikhil C Patel, Xusheng Wang, Vishwajeeth Pagala, Anna Stephan, Junmin Peng, Fabio Demontis, Sokol V TodiPublished in G3: Genes, Genomes, Genetics by Oxford University Press (OUP) in 202410.1093/g3journal/jkae209
- 2.Author(s): Camilo Valdes, Vitalii Stebliankin, Daniel Ruiz-Perez, Ji In Park, Hajeong Lee, Giri NarasimhanPublished in Frontiers in Bioinformatics by Frontiers Media SA in 202310.3389/fbinf.2023.1154588
- 3.Author(s): Cuifang Liu, Juan Yu, Aoqun Song, Min Wang, Jiansen Hu, Ping Chen, Jicheng Zhao, Guohong LiPublished in Nature Communications by Springer Science and Business Media LLC in 202310.1038/s41467-023-39846-y
- 4.Author(s): Giulia Unali, Giovanni Crivicich, Isabel Pagani, Monah Abou‐Alezz, Filippo Folchini, Erika Valeri, Vittoria Matafora, Julie A Reisz, Anna Maria Sole Giordano, Ivan Cuccovillo, Giacomo M Butta, Lorena Donnici, Angelo D'Alessandro, Raffaele De Francesco, Lara Manganaro, Davide Cittaro, Ivan Merelli, Carolina Petrillo, Angela Bachi, Elisa Vicenzi, Anna Kajaste‐RudnitskiPublished in The EMBO Journal by Springer Science and Business Media LLC in 202310.15252/embj.2022112234
- 5.Author(s): Aditeya Pandey, Sehi L'Yi, Qianwen Wang, Michelle A. Borkin, Nils GehlenborgPublished in IEEE Transactions on Visualization and Computer Graphics by Institute of Electrical and Electronics Engineers (IEEE) in 2023, page: 570-58010.1109/tvcg.2022.3209407
- 6.Author(s): Satya D. Pandey, John D. Perpich, Kendall S. Stocke, Jillian M. Mansfield, Yuichiro Kikuchi, Lan Yakoumatos, Artur Muszyński, Parastoo Azadi, Hervé Tettelin, Marvin Whiteley, Silvia M. Uriarte, Juhi Bagaitkar, Margaret Vickerman, Richard J. LamontPublished in mBio by American Society for Microbiology in 202310.1128/mbio.00658-23
- 7.Author(s): Weizhi Ouyang, Xiwen Zhang, Minrong Guo, Jing Wang, Xiaoting Wang, Runxin Gao, Meng Ma, Xu Xiang, Shiping Luan, Feng Xing, Zhilin Cao, Jiapei Yan, Guoliang Li, Xingwang LiPublished in Cell Reports by Elsevier BV in 2023, page: 11235010.1016/j.celrep.2023.112350
- 8.Author(s): Sehi LYi, Qianwen Wang, Fritz Lekschas, Nils GehlenborgPublished in IEEE Transactions on Visualization and Computer Graphics by Institute of Electrical and Electronics Engineers (IEEE) in 2022, page: 140-15010.1109/tvcg.2021.3114876
- 9.Author(s): Leroy Bondhus, Angela Wei, Valerie A. ArboledaPublished in BMC Bioinformatics by Springer Science and Business Media LLC in 202210.1186/s12859-022-04899-1
- 10.Author(s): R. A. Greenstein, Henry Ng, Ramon R. Barrales, Catherine Tan, Sigurd Braun, Bassem Al-SadyPublished in PLOS Genetics by Public Library of Science (PLoS) in 2022, page: e101020110.1371/journal.pgen.1010201
- 11.Author(s): GenYi Qu, Zhengsheng Liu, Guang Yang, Yong Xu, Maolin Xiang, Cheng TangPublished in Aging by Impact Journals, LLC in 2021, page: 12099-1211210.18632/aging.202917
- 12.Author(s): Elisa Espinet, Zuguang Gu, Charles D. Imbusch, Nathalia A. Giese, Magdalena Büscher, Mariam Safavi, Silke Weisenburger, Corinna Klein, Vanessa Vogel, Mattia Falcone, Jacob Insua-Rodríguez, Manuel Reitberger, Vera Thiel, Steffi O. Kossi, Alexander Muckenhuber, Karnjit Sarai, Alex Y.L. Lee, Elyne Backx, Soheila Zarei, Matthias M. Gaida, Manuel Rodríguez-Paredes, Elisa Donato, Hsi-Yu Yen, Roland Eils, Matthias Schlesner, Nicole Pfarr, Thilo Hackert, Christoph Plass, Benedikt Brors, Katja Steiger, Dieter Weichenhan, H. Efsun Arda, Ilse Rooman, Janel L. Kopp, Oliver Strobel, Wilko Weichert, Martin R. Sprick, Andreas TrumppPublished in Cancer Discovery by American Association for Cancer Research (AACR) in 2021, page: 638-65910.1158/2159-8290.cd-20-1202
- 13.Author(s): Valerie Anne Galton, Maria Elena Martinez, Julie A. Dragon, Donald L. St Germain, Arturo HernandezPublished in Thyroid by SAGE Publications in 2021, page: 528-54110.1089/thy.2020.0508
- 14.Author(s): S. Nusrat, T. Harbig, N. GehlenborgPublished in Computer Graphics Forum by Wiley in 2019, page: 781-80510.1111/cgf.13727
- 15.Author(s): George E. Gentsch, Nick D.L. Owens, James C. SmithPublished in iScience by Elsevier BV in 2019, page: 485-49810.1016/j.isci.2019.06.013
- 16.Author(s): Piotr Przanowski, Shamba S. Mondal, Aleksandra Cabaj, Konrad J. Dębski, Bartosz Wojtas, Bartłomiej Gielniewski, Beata Kaza, Bozena Kaminska, Michal DabrowskiPublished in Glia by Wiley in 2019, page: 2312-232810.1002/glia.23686
- 17.Author(s): Peter Sona, Jong Hui Hong, Sunho Lee, Byong Joon Kim, Woon-Young Hong, Jongcheol Jung, Han-Na Kim, Hyung-Lae Kim, David Christopher, Laurent Herviou, Young Hwan Im, Kwee-Yum Lee, Tae Soon Kim, Jongsun JungPublished in BMC Bioinformatics by Springer Science and Business Media LLC in 201810.1186/s12859-018-2499-1
- 18.Author(s): George Gentsch, Nick D. L. Owens, James C. SmithPublished in SSRN Electronic Journal by Elsevier BV in 201810.2139/ssrn.3305587
- 19.Author(s): Fushun Chen, Qingzheng Zhang, Xiaodi Deng, Xia Zhang, Chengjun Chen, Dekang Lv, Yulong Li, Dan Li, Yu Zhang, Peiying Li, Yunpeng Diao, Lan Kang, Gareth I. Owen, Jun Chen, Zhiguang LiPublished in Epigenetics by Informa UK Limited in 2018, page: 721-74110.1080/15592294.2018.1500057
- 20.Author(s): Frederic Koch, Manuela Scholze, Lars Wittler, Dennis Schifferl, Smita Sudheer, Phillip Grote, Bernd Timmermann, Karol Macura, Bernhard G. HerrmannPublished in Developmental Cell by Elsevier BV in 2017, page: 514-526.e710.1016/j.devcel.2017.07.021
- 1.Author(s): Eric Cheng, Shuxin Chi, Huan Zhong, Robin Coope, Leonard J Foster, Karen C CheungPublished in 202510.1101/2025.10.27.684859
- 2.Author(s): Oluwademilade Nuga, Kristin Richardson, Nikhil Patel, Xusheng Wang, Vishwajeeth Pagala, Anna Stephan, Junmin Peng, Fabio Demontis, Sokol V. TodiPublished by Cold Spring Harbor Laboratory in 202410.1101/2024.05.09.593206
- 3.Author(s): Aditeya Pandey, Sehi L'Yi, Qianwen Wang, Michelle Borkin, Nils GehlenborgPublished by Center for Open Science in 202210.31219/osf.io/rscb4
- 4.Author(s): GenYi Qu, Guang Yang, Yong Xu, Maolin Xiang, Cheng TangPublished by Research Square Platform LLC in 202110.21203/rs.3.rs-135671/v1
- 5.Author(s): Zuguang Gu, Daniel HübschmannPublished by Cold Spring Harbor Laboratory in 202110.1101/2021.03.08.434289
- 6.Author(s): Zuguang Gu, Daniel HübschmannPublished by Cold Spring Harbor Laboratory in 202110.1101/2021.06.30.450482
- 7.Author(s): Leroy Bondhus, Angela Wei, Valerie A. ArboledaPublished by Cold Spring Harbor Laboratory in 202110.1101/2021.02.03.428187
- 8.Author(s): Sehi L'Yi, Qianwen Wang, Fritz Lekschas, Nils GehlenborgPublished by Center for Open Science in 202110.31219/osf.io/6evmb
- 9.Author(s): Camilo Valdes, Vitalii Stebliankin, Daniel Ruiz-Perez, Ji In Park, Hajeong Lee, Giri NarasimhanPublished by Cold Spring Harbor Laboratory in 202110.1101/2021.03.22.436520
- 10.Author(s): R.A. Greenstein, Henry Ng, Ramon R. Barrales, Catherine Tan, Sigurd Braun, Bassem Al-SadyPublished by Cold Spring Harbor Laboratory in 202010.1101/2020.05.26.117143
- 11.Author(s): Meng ZhuPublished by The Company of Biologists in 201910.1242/prelights.8852
- 12.Author(s): Songyuan JiPublished in 2019
- 13.Author(s): George E. Gentsch, Nick D. L. Owens, James C. SmithPublished by Cold Spring Harbor Laboratory in 201810.1101/488056