Skip to content

paulsengroup/hictkpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

249717f · Mar 24, 2025
Mar 23, 2025
Oct 20, 2024
Mar 23, 2025
Oct 22, 2024
Mar 24, 2025
Mar 24, 2025
Oct 20, 2024
Oct 14, 2024
Oct 16, 2024
Mar 23, 2025
Oct 14, 2024
Oct 14, 2024
Jun 18, 2024
Mar 23, 2025
Mar 23, 2025
Mar 23, 2025
Oct 18, 2024
Nov 30, 2024
Jul 29, 2023
Oct 23, 2024
Nov 28, 2024
Mar 23, 2025
Oct 14, 2024

Repository files navigation

hictkpy

License CI Download from Bioconda docs Zenodo DOI


Python bindings for hictk, a blazing fast toolkit to work with .hic and .cool files.

Installing hictkpy

hictkpy can be installed in various ways. The simplest method is using pip: pip install hictkpy[all].

Refer to Installation for alternative methods.

Using hictkpy

import hictkpy

path_to_clr = "file.mcool"  # "file.hic"

clr = hictkpy.File(path_to_clr, 100_000)
sel = clr.fetch("chr1")

df = sel.to_df()     # Get interactions as a pd.DataFrame
m1 = sel.to_numpy()  # Get interactions as a numpy matrix
m2 = sel.to_coo()    # Get interactions as a scipy.sparse.coo_matrix

For more detailed examples refer to Quickstart.

The complete documentation for hictkpy API is available here.

Citing

If you use hictkpy in you research, please cite the following publication:

Roberto Rossini, Jonas Paulsen, hictk: blazing fast toolkit to work with .hic and .cool files Bioinformatics, Volume 40, Issue 7, July 2024, btae408, https://doi.org/10.1093/bioinformatics/btae408

BibTex
@article{hictk,
    author = {Rossini, Roberto and Paulsen, Jonas},
    title = "{hictk: blazing fast toolkit to work with .hic and .cool files}",
    journal = {Bioinformatics},
    volume = {40},
    number = {7},
    pages = {btae408},
    year = {2024},
    month = {06},
    issn = {1367-4811},
    doi = {10.1093/bioinformatics/btae408},
    url = {https://doi.org/10.1093/bioinformatics/btae408},
    eprint = {https://academic.oup.com/bioinformatics/article-pdf/40/7/btae408/58385157/btae408.pdf},
}