hictkpy
Python bindings for hictk: read and write .cool and .hic files directly from Python
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 10 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.6%) to scientific vocabulary
Keywords
Repository
Python bindings for hictk: read and write .cool and .hic files directly from Python
Basic Info
- Host: GitHub
- Owner: paulsengroup
- License: mit
- Language: C++
- Default Branch: main
- Homepage: https://hictkpy.readthedocs.io
- Size: 31.9 MB
Statistics
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 6
- Releases: 9
Topics
Metadata Files
README.md
hictkpy
| Downloads |
|
| Documentation |
|
| License |
|
| CI |
|
| CodeQL |
|
| Fuzzy Testing |
|
Python bindings for hictk, a blazing fast toolkit to work with .hic and .cool files.
If you are looking for the R API, checkout the hictkR repository.
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
```python3 import hictkpy
pathtoclr = "file.mcool" # "file.hic"
clr = hictkpy.File(pathtoclr, 100_000) sel = clr.fetch("chr1")
df = sel.todf() # Get interactions as a pandas.DataFrame m1 = sel.tonumpy() # Get interactions as a numpy matrix m2 = sel.tocsr() # Get interactions as a scipy.sparse.csrmatrix ```
For more detailed examples refer to the Quickstart section in the documentation.
The complete documentation for the hictkpy API is available here.
Citing
If you use hictkpy in your 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
```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}, } ```Owner
- Name: paulsengroup
- Login: paulsengroup
- Kind: organization
- Repositories: 3
- Profile: https://github.com/paulsengroup
Citation (CITATION.cff)
# Copyright (C) 2024 Roberto Rossini <roberros@uio.no>
#
# SPDX-License-Identifier: MIT
cff-version: 1.2.0
message: 'If you use this software, please cite it using the metadata from this file.'
authors:
- given-names: Roberto
family-names: Rossini
orcid: 'https://orcid.org/0000-0003-3096-1470'
email: roberros@uio.no
affiliation: 'Department of Biosciences, University of Oslo'
title: hictkpy
abstract: 'Python bindings for hictk: read and write .cool and .hic files directly from Python.'
doi: '10.5281/zenodo.8220299'
url: 'https://github.com/paulsengroup/hictkpy'
repository-code: 'https://github.com/paulsengroup/hictkpy'
type: software
license: MIT
keywords:
- bindings
- bioinformatics
- conversion
- cooler
- hic
- hictk
- python
preferred-citation:
type: article
authors:
- given-names: Roberto
family-names: Rossini
orcid: 'https://orcid.org/0000-0003-3096-1470'
email: roberros@uio.no
affiliation: 'Department of Biosciences, University of Oslo'
- given-names: Jonas
family-names: Paulsen
orcid: 'https://orcid.org/0000-0002-7918-5495'
email: jonas.paulsen@ibv.uio.no
affiliation: 'Department of Biosciences, University of Oslo'
doi: '10.1093/bioinformatics/btae408'
url: 'https://academic.oup.com/bioinformatics/article/40/7/btae408/7698028'
journal: 'Bioinformatics'
year: 2024
month: 06
title: 'hictk: blazing fast toolkit to work with .hic and .cool files'
abstract: >
Hi-C is gaining prominence as a method for mapping genome organization.
With declining sequencing costs and a growing demand for higher-resolution data, efficient tools for processing Hi-C datasets at different resolutions are crucial.
Over the past decade, the .hic and Cooler file formats have become the de-facto standard to store interaction matrices produced by Hi-C experiments in binary format.
Interoperability issues make it unnecessarily difficult to convert between the two formats and to develop applications that can process each format natively.
We developed hictk, a toolkit that can transparently operate on .hic and .cool files with excellent performance.
The toolkit is written in C++ and consists of a C++ library with Python and R bindings as well as CLI tools to perform common operations directly from the shell, including converting between .hic and .mcool formats. We benchmark the performance of hictk and compare it with other popular tools and libraries.
We conclude that hictk significantly outperforms existing tools while providing the flexibility of natively working with both file formats without code duplication.
The hictk library, Python bindings and CLI tools are released under the MIT license as a multi-platform application available at github.com/paulsengroup/hictk.
Pre-built binaries for Linux and macOS are available on bioconda.
Python bindings for hictk are available on GitHub at github.com/paulsengroup/hictkpy, while R bindings are available on GitHub at github.com/paulsengroup/hictkR.
GitHub Events
Total
- Create event: 93
- Release event: 5
- Issues event: 25
- Watch event: 6
- Delete event: 88
- Issue comment event: 30
- Push event: 342
- Pull request event: 169
Last Year
- Create event: 93
- Release event: 5
- Issues event: 25
- Watch event: 6
- Delete event: 88
- Issue comment event: 30
- Push event: 342
- Pull request event: 169
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 5
- Total pull requests: 38
- Average time to close issues: 10 days
- Average time to close pull requests: 3 days
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 1.0
- Average comments per pull request: 0.34
- Merged pull requests: 23
- Bot issues: 0
- Bot pull requests: 10
Past Year
- Issues: 5
- Pull requests: 38
- Average time to close issues: 10 days
- Average time to close pull requests: 3 days
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 1.0
- Average comments per pull request: 0.34
- Merged pull requests: 23
- Bot issues: 0
- Bot pull requests: 10
Top Authors
Issue Authors
- robomics (13)
- bskubi (5)
- i-pletenev (2)
- obikenobi23 (1)
Pull Request Authors
- robomics (114)
- dependabot[bot] (16)
- pre-commit-ci[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,612 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
- Total maintainers: 1
pypi.org: hictkpy
Python bindings for hictk: read and write .cool and .hic files directly from Python
- Documentation: https://hictkpy.readthedocs.io/
- License: mit
-
Latest release: 1.3.0
published 9 months ago
Rankings
Maintainers (1)
Dependencies
- actions/cache/restore v3 composite
- actions/cache/save v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite