Python bindings for hictk: read and write .cool and .hic files directly from Python
Project description
hictkpy
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 simples 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},
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for hictkpy-1.0.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd09112e8177a7190ee11d7d597d1599be849bde46fcf9ec7d25c66039b1b7e |
|
MD5 | ea6ad9dbf65e4458e581fe7bcb5821bf |
|
BLAKE2b-256 | 4843ca05bea163ddd76fe9d5899ca3d5931652576f3ba9fffd6aebfa97d217f0 |
Hashes for hictkpy-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bde2b0d0464af07d99cad7a0f09433f5699488ec15d6314551956bd90446c16 |
|
MD5 | 40c278ed8a9a9e31e6b86ce4d01d63ce |
|
BLAKE2b-256 | 95c450d3061fb6aebcd6372353c2f4e9db46c31b3461b37ba94288ee1e89f7c9 |
Hashes for hictkpy-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a90374a4744854926593a854e344b236f156cd608ff76978d4bcf715f4ad2d93 |
|
MD5 | 681fc7486c673324f49fa2abe89afe6e |
|
BLAKE2b-256 | f8e316dcdde68526c0955f5bed1c6e641e32d017d80d509b9fed5b2f5254c0c7 |
Hashes for hictkpy-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae23b801a6f032d86f493b22293682e38a71af6a02d5520d9873333f605e027c |
|
MD5 | b50f92807810fd89a48f2318127aa0a5 |
|
BLAKE2b-256 | bf70f00c12779cb7205e68e6ee15f6eae0f0a9a403917b637795c9a9db767d24 |
Hashes for hictkpy-1.0.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964c6449b7a394223eb9393b971795fa6bfe57f1aa587847713195fa4c873352 |
|
MD5 | a56e9a09a9a296bf83089e812ab8154f |
|
BLAKE2b-256 | a00a65aab9d2d668ae6980108db6ae8feb4c300e9400e1564980b8a87daa5128 |
Hashes for hictkpy-1.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c164490d8ec97a35984c6313da42d215b615d32475b270cd05b3cf9f3dc6f3 |
|
MD5 | dff669293bee02a1fa3fc16d77243ca5 |
|
BLAKE2b-256 | 6e4b1e083f1c8b6c1969f80a138a0e0be8854017c20bf7fc44e52d258be22e46 |
Hashes for hictkpy-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f387012a74f57850af5c9bef4f3e4c13183d1442aee5dc727d8847cc6aa364 |
|
MD5 | b3d1f3c7d3c57c8efc2f97cacc9a0456 |
|
BLAKE2b-256 | e914ae3276eb7712f787a6026ac6d68540313c2756c231ea4e37cbfcf5003e59 |
Hashes for hictkpy-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 163d740868a88004546d5eeaea7bdb8a7624ea98dab3d19ef0d34083deecff78 |
|
MD5 | 4f06652430d3634bf9e9f1761c8adf27 |
|
BLAKE2b-256 | 07ebf6f8d05b0408410f5921e9b691e7c525253527dcbd8dfb8130b3a255e418 |
Hashes for hictkpy-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12ec8bc8ee9361478a4dd3d885e31514cd751531964e72615968bdc374011ee7 |
|
MD5 | 81acd035e50862ec6e725075a946a6d6 |
|
BLAKE2b-256 | df8ce2778e3841c76e2a2b6e8ca9a297528fad1f6167a2159f07ca1c1e0796a7 |
Hashes for hictkpy-1.0.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eddbd9b629998ea91a81921dd4eba0e26061d00f2d0534b86f75bed06e75d76 |
|
MD5 | d044d555b6ac6011d4986c15b8304d41 |
|
BLAKE2b-256 | d4c17ea43d4f37bd30458f770a8a4de7350304b6ad943f7191a313566e8eaa9b |
Hashes for hictkpy-1.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef7ff3f6f50dd76c1b8ebcfadb367a24bdaf299eac9678447b65d08fbf64bde3 |
|
MD5 | cabb2fa00c2641f3f542e76d3886ada0 |
|
BLAKE2b-256 | 724f5cdd189030eaa73763e211e5b2c866c2cee3b5fdcf7db14475c61197264f |
Hashes for hictkpy-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b786b1001b0dd933108b46b7fb2bf9ffcecddddd0bb76ff6978cff5d45bb397d |
|
MD5 | c83c8c5bb91671c4ab4f996ccd631d69 |
|
BLAKE2b-256 | 807384e0298a1ed6ee3d4568087718c1150836dff33723a56d32d98c9b2f3e3a |
Hashes for hictkpy-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0efe009ea820495e34d4901c90f03db8ea95acf9106a3fced421518a38175e1 |
|
MD5 | 1ba771b616ce74bd8638b62446f3dff6 |
|
BLAKE2b-256 | 538edcd87702334fde9b53163ab71dbbbebf1ef2bf0ad5a38b35f9112ba5c65d |
Hashes for hictkpy-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f70a84fb92b7b8cb0037af4c13224cff5b9236ee0377ff29fe0b745793a286b |
|
MD5 | 66a68e447a50a3f639134cdb4a5aa983 |
|
BLAKE2b-256 | 959a61f9ab47a80c1b28056504e3507dc46315c988dd612736af5c4d2ae3beec |
Hashes for hictkpy-1.0.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d06f992d44c09dc798b5d02be9cc4c7b59a56900f3937e7efdff35266bcbcb8 |
|
MD5 | f27824d11b27428499b6f227710528b2 |
|
BLAKE2b-256 | 1f3dc9c2869529879f859639bf866bdc1736a1cfeee5d9adf9de48b97b031180 |
Hashes for hictkpy-1.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c1505f42c6fb5cb2fdfd3ff8f15e4a2ebde78674e69df010c8485eccf12d98a |
|
MD5 | 8cbd88c796b08432ca597e5f029305b1 |
|
BLAKE2b-256 | 3cb4aff21c0ffcaa61173caed7bfc1c59faf06a39e4c8a1d4ef70287f7457e9c |
Hashes for hictkpy-1.0.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 474c28378476362de850cfc9c43c319d852726fc11ea7a135f5608db6bdcc1e1 |
|
MD5 | 5ca4ce5d93967b9657a073bde4f0798f |
|
BLAKE2b-256 | 753ecd1fc6345bc3ef58b5aa91c8659495aa07d1020c7947b411845a989f758c |
Hashes for hictkpy-1.0.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 116209425c46773174c85d8076419f57eaa875b0e9f2ea5ea4b1e89324286390 |
|
MD5 | 3d56c161d9a317a4bfec10e6ea67ef56 |
|
BLAKE2b-256 | ba4f324b373f00564b796ef77535ef0440e5b2dfa6fa351930f23b63170c8a49 |
Hashes for hictkpy-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5fe675b4038f8e31c2155ca922495e7e89225a0a7eeca32ad6cbf9a1dc771c |
|
MD5 | d370de8bd085341152e7869ac015a925 |
|
BLAKE2b-256 | b7482676c20646affd3ef9c5108ffb1fa269b42c508170f2e1b758d71f1fa6e9 |
Hashes for hictkpy-1.0.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900ed53323c7ae4aab446004efad90d4f762d180708d94faf0e133966d689f6f |
|
MD5 | f4e087ae22220a50765819a2e8b4f128 |
|
BLAKE2b-256 | 74ad1f3fcecf0a66ec21dca2755c751b1093a72109b270ebb378d1c6b37f3a3a |