Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add native support to write .hic files #102

Merged
merged 139 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
20fdb5f
Implement write operations on hic::FileStream
robomics Jan 2, 2024
8ec8296
Refactor FileStream
robomics Jan 3, 2024
d2c429d
Bugfix
robomics Jan 4, 2024
787d09f
WIP
robomics Jan 4, 2024
e53274e
Refactor HiCFileWriter code
robomics Jan 5, 2024
2c65642
Update tests
robomics Jan 5, 2024
2472f2f
WIP
robomics Jan 5, 2024
f2f8c8d
Bugfix
robomics Jan 8, 2024
4329566
Bugfix
robomics Jan 8, 2024
4b023f1
Bugfix
robomics Jan 8, 2024
dc78a7f
Update tests
robomics Jan 8, 2024
0ee5517
Merge branch 'bug/hic-fetch' into feature/hic-write
robomics Jan 8, 2024
73c82cc
wip
robomics Jan 8, 2024
a75e74f
Merge branch 'bug/hic-fetch-expected' into feature/hic-write
robomics Jan 9, 2024
3325a43
Support computing expected vectors
robomics Jan 9, 2024
b9e5c14
Address compiler warnings
robomics Jan 10, 2024
50ae4ef
Write sumCounts to file
robomics Jan 10, 2024
e8bbffb
Support creating multi-resolution .hic files
robomics Jan 10, 2024
db6ee1f
Refactor
robomics Jan 10, 2024
fd896f1
Implement HiCBlockPartitioner class
robomics Jan 11, 2024
a1f94d0
HiCBlockPartitioner: index block ids by chromosome-chromosome
robomics Jan 11, 2024
01e8ca8
Refactor
robomics Jan 11, 2024
7f9cf0b
WIP
robomics Jan 11, 2024
4e6e29e
WIP
robomics Jan 11, 2024
cfbef8a
WIP
robomics Jan 11, 2024
5d5d874
Bugfix
robomics Jan 12, 2024
ad5b6c3
Bugfix
robomics Jan 12, 2024
1812f95
Refactor
robomics Jan 12, 2024
71afea3
Bugfix
robomics Jan 12, 2024
aaa1ef8
Bugfix
robomics Jan 12, 2024
a25097c
Refactor. Reintroduce support to write expected value vectors
robomics Jan 12, 2024
6290924
Update tests
robomics Jan 12, 2024
55efc16
Parallelize interaction block compression
robomics Jan 13, 2024
b6c2fc4
Update conanfile
robomics Jan 13, 2024
3d19928
Bugfix
robomics Jan 13, 2024
114ecde
Refactor and various bugfixes
robomics Jan 13, 2024
f09d5a6
Bugfix
robomics Jan 14, 2024
fa8fdf5
Refactor code to write ALL matrix
robomics Jan 14, 2024
48b4f07
Bugfix
robomics Jan 14, 2024
eb5e321
Performance optimization
robomics Jan 14, 2024
65b96c9
Bugfix
robomics Jan 14, 2024
7513530
Re-enable computing expected values
robomics Jan 14, 2024
e56f989
Update hictk convert to natively convert .[m]cool to .hic
robomics Jan 14, 2024
e35ea0a
Bugfix
robomics Jan 14, 2024
20285f4
Initial support for creating .hic files with hictk load
robomics Jan 15, 2024
50ac8ba
Bugfix
robomics Jan 15, 2024
173ae7b
Bugfix
robomics Jan 15, 2024
d6c4060
Update tests
robomics Jan 15, 2024
7fed1c5
Bugfix
robomics Jan 15, 2024
4562331
Bugfix
robomics Jan 15, 2024
4cb81f9
Update tests
robomics Jan 15, 2024
f7ecac0
Refactor integration tests
robomics Jan 15, 2024
e1b738c
Update CI
robomics Jan 15, 2024
a6aaef7
Bugfix
robomics Jan 15, 2024
4689083
Refactor
robomics Jan 15, 2024
8f9b237
Improve logging
robomics Jan 15, 2024
273edbb
Allow tweaking compression level used to create Cooler files
robomics Jan 15, 2024
7f8b3b9
hictk: improve handling of custom compression levels
robomics Jan 15, 2024
4f74567
Make compression levels always std::uint32_t
robomics Jan 15, 2024
7d368d0
Support writing interaction blocks as dense matrices
robomics Jan 15, 2024
c98b44b
Refactor
robomics Jan 16, 2024
e63bc47
Initial implementation of zoomify on .hic files
robomics Jan 16, 2024
909ca79
Bugfix
robomics Jan 16, 2024
36ebbb5
Update tests
robomics Jan 16, 2024
05d691c
Bugfix
robomics Jan 16, 2024
2c3f5a4
Bugfix
robomics Jan 16, 2024
72c5859
Update hictk zoomify to work with .hic files
robomics Jan 16, 2024
301506c
Update hictk load
robomics Jan 16, 2024
f05f324
Update unit tests
robomics Jan 16, 2024
36c5a51
Improve logging
robomics Jan 16, 2024
06f4203
Bugfix
robomics Jan 16, 2024
dfb30f1
Fix broken tests
robomics Jan 16, 2024
904f33b
Bugfix
robomics Jan 16, 2024
7585f64
Address compiler warnings
robomics Jan 16, 2024
687e33d
Fix broken integration test
robomics Jan 16, 2024
7cb4483
Fix typo
robomics Jan 16, 2024
7ecb3e9
Bugfix
robomics Jan 16, 2024
0fd1c23
Update test dataset
robomics Jan 17, 2024
8de3c9b
Fix broken test
robomics Jan 17, 2024
3430be2
Implement hic::utils::merge()
robomics Jan 17, 2024
a4da7ca
Refactor hictk
robomics Jan 17, 2024
3b4af15
Update hictk merge to support .hic files
robomics Jan 17, 2024
b9977b3
Update integration test fot hictk merge
robomics Jan 17, 2024
12cb538
Rename --batch-size to --chunk-size
robomics Jan 17, 2024
5fe0c8b
Bugfix
robomics Jan 17, 2024
1c06c12
Bugfix
robomics Jan 18, 2024
5ce289a
Initial support for adding normalization vectors to .hic files
robomics Jan 18, 2024
51aee6c
Update tests
robomics Jan 19, 2024
88584da
Update test scripts
robomics Jan 19, 2024
a875dbb
Update test_docker_image.sh
robomics Jan 19, 2024
7782e7e
Bugfix
robomics Jan 19, 2024
9fa8d7f
Bugfix
robomics Jan 20, 2024
40fc4fd
Support adding gw normalization vector to .hic files
robomics Jan 20, 2024
aaee8a5
Bugfix
robomics Jan 20, 2024
395de62
Update tests
robomics Jan 20, 2024
c5dfd65
Update hictk convert
robomics Jan 20, 2024
d0b0441
Address compiler warnings
robomics Jan 20, 2024
b5282a9
Bugfix
robomics Jan 21, 2024
ddbaab1
Refactor
robomics Jan 21, 2024
a69a6c4
Support computing normalized expected vectors
robomics Jan 21, 2024
4d8bcf4
Bugfix
robomics Jan 21, 2024
23e4523
Bugfix
robomics Jan 21, 2024
0633542
Address compiler warnings
robomics Jan 21, 2024
8a1ade6
Merge branch 'main' into feature/hic-write
robomics Jan 21, 2024
d0b4026
Update tests
robomics Jan 21, 2024
ca10b88
Increase test timeout
robomics Jan 21, 2024
792a1bc
Improve error handling when (de)serializing objects during .hic creation
robomics Jan 22, 2024
8476d7f
Improve error handling when writing .hic files
robomics Jan 22, 2024
8de6ee2
Print status updates when adding pixels to .hic files
robomics Jan 22, 2024
a6f067b
Update hictk balance to drop the dependency on juicer_tools
robomics Jan 22, 2024
3766a79
Bugfix
robomics Jan 22, 2024
b3da46b
Update test dataset
robomics Jan 22, 2024
b2e56bb
Avoid needlessly recomputing norm. expected values
robomics Jan 22, 2024
b3de553
Bugfix
robomics Jan 22, 2024
f992faf
Parallelize computation of (normalized) expected value vectors
robomics Jan 22, 2024
94c9cdd
Fix broken tests
robomics Jan 22, 2024
2f4cf83
Remove unnecessary runtime dependencies from Dockerfile
robomics Jan 22, 2024
fd5d06e
Fix broken test
robomics Jan 22, 2024
3b293f6
Bugfix
robomics Jan 22, 2024
af9ef8e
Fix windows builds
robomics Jan 23, 2024
0f325dd
Fix windows CI
robomics Jan 23, 2024
d6ac864
Increase timeout for ubuntu CI
robomics Jan 23, 2024
45c36af
Make handling of --tmpdir option consistent across subcommands
robomics Jan 23, 2024
ed0f79e
Change default compression level of .hic files from 12 to 9
robomics Jan 23, 2024
570037c
Update CLI reference doc
robomics Jan 23, 2024
6848775
Improve performance of hictk load when processing .hic with many chro…
robomics Jan 23, 2024
ba367e8
Raise an error when trying to balance .hic v8 or older
robomics Jan 23, 2024
888aafb
Update hictk's docs
robomics Jan 23, 2024
e2e3cad
Refactor
robomics Jan 23, 2024
222de6b
Address test failures on Windows
robomics Jan 23, 2024
69ab738
Bugfix
robomics Jan 23, 2024
8dd0f90
Bugfix [ci full]
robomics Jan 23, 2024
91d651f
Address clang-tidy warnings
robomics Jan 24, 2024
3faf615
Update docs for the C++ API
robomics Jan 24, 2024
293ea6e
Fix computation of All_All matrix
robomics Jan 24, 2024
d4d8512
Bugfix
robomics Jan 24, 2024
cbd982e
Optimize list_avail_normalizations() for .hic v9
robomics Jan 25, 2024
458f9dd
Ensure chromosomes maps in All_All matrix align with the chromosome grid
robomics Jan 25, 2024
22494b4
Change default compression level of .hic files from 9 to 10
robomics Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
--schedule-random \
--output-on-failure \
--no-tests=error \
--timeout 90 \
--timeout 240 \
-j $(nproc) |&
head -n 1000

Expand All @@ -174,26 +174,12 @@ jobs:

python3 -m pip install 'cooler>=0.9.2'

- name: Cache hic_tools
id: cache-hictools
uses: actions/cache@v4
with:
key: hic_tools
path: hic_tools.jar

- name: Download hic_tools
if: steps.cache-hictools.outputs.cache-hit != 'true'
run: |
apt-get install -y --no-install-recommends curl
curl -L 'https://github.com/aidenlab/HiCTools/releases/download/v3.30.00/hic_tools.3.30.00.jar' \
-o hic_tools.jar

- name: Run integration tests
run: |
test/scripts/hictk_balance.sh build/src/hictk/hictk hic_tools.jar
test/scripts/hictk_balance.sh build/src/hictk/hictk

test/scripts/hictk_convert_hic2cool.sh build/src/hictk/hictk
test/scripts/hictk_convert_cool2hic.sh build/src/hictk/hictk hic_tools.jar
test/scripts/hictk_convert_cool2hic.sh build/src/hictk/hictk

test/scripts/hictk_dump_chroms.sh build/src/hictk/hictk
test/scripts/hictk_dump_bins.sh build/src/hictk/hictk
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
--schedule-random \
--output-on-failure \
--no-tests=error \
--timeout 180 2>&1 |
--timeout 240 2>&1 |
head -n 1000

run-integration-tests:
Expand Down Expand Up @@ -327,19 +327,6 @@ jobs:
- name: Install test dependencies
run: pip install -r requirements.txt

- name: Cache hic_tools
id: cache-hictools
uses: actions/cache@v4
with:
key: hic_tools
path: hic_tools.jar

- name: Download hic_tools
if: steps.cache-hictools.outputs.cache-hit != 'true'
run: |
curl -L 'https://github.com/aidenlab/HiCTools/releases/download/v3.30.00/hic_tools.3.30.00.jar' \
-o hic_tools.jar

- name: Restore test dataset
uses: actions/cache/restore@v4
with:
Expand All @@ -364,15 +351,15 @@ jobs:

- name: Test hictk balance
run: |
test/scripts/hictk_balance.sh bin/hictk hic_tools.jar
test/scripts/hictk_balance.sh bin/hictk

- name: Test hictk convert (hic2cool)
run: |
test/scripts/hictk_convert_hic2cool.sh bin/hictk

- name: Test hictk convert (cool2hic)
run: |
test/scripts/hictk_convert_cool2hic.sh bin/hictk hic_tools.jar
test/scripts/hictk_convert_cool2hic.sh bin/hictk

- name: Test hictk dump chroms
run: |
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ jobs:
--schedule-random \
--output-on-failure \
--no-tests=error \
--timeout 200 \
--timeout 360 \
-j $(nproc) |&
head -n 1000

Expand Down Expand Up @@ -383,20 +383,6 @@ jobs:

python3 -m pip install 'cooler>=0.9.2'

- name: Cache hic_tools
id: cache-hictools
uses: actions/cache@v4
with:
key: hic_tools
path: hic_tools.jar

- name: Download hic_tools
if: steps.cache-hictools.outputs.cache-hit != 'true'
run: |
apt-get install -y --no-install-recommends curl
curl -L 'https://github.com/aidenlab/HiCTools/releases/download/v3.30.00/hic_tools.3.30.00.jar' \
-o hic_tools.jar

- name: Restore test dataset
uses: actions/cache/restore@v4
with:
Expand All @@ -421,15 +407,15 @@ jobs:

- name: Test hictk balance
run: |
test/scripts/hictk_balance.sh bin/hictk hic_tools.jar
test/scripts/hictk_balance.sh bin/hictk

- name: Test hictk convert (hic2cool)
run: |
test/scripts/hictk_convert_hic2cool.sh bin/hictk

- name: Test hictk convert (cool2hic)
run: |
test/scripts/hictk_convert_cool2hic.sh bin/hictk hic_tools.jar
test/scripts/hictk_convert_cool2hic.sh bin/hictk

- name: Test hictk dump chroms
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ jobs:
--schedule-random \
--output-on-failure \
--no-tests=error \
--timeout 180 \
--exclude-regex 'Cooler: dataset large read\/write.*' |&
--timeout 240 \
--exclude-regex '.*(dataset large read\/write|HiCFileWriter).*' |&
tail -n 1000

windows-ci-status-check:
Expand Down
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,6 @@ RUN if [ -z "$BUILD_BASE_IMAGE" ]; then echo "Missing BUILD_BASE_IMAGE --build-a
&& if [ -z "$GIT_SHORT_HASH" ]; then echo "Missing GIT_SHORT_HASH --build-arg" && exit 1; fi \
&& if [ -z "$CREATION_DATE" ]; then echo "Missing CREATION_DATE --build-arg" && exit 1; fi

# Install runtime dependencies
RUN apt-get update \
&& apt-get install -y ca-certificates-java \
&& apt-get install -y \
openjdk-19-jre-headless \
pigz \
&& rm -rf /var/lib/apt/lists/*

# Export project binaries to the final build stage
COPY --from=builder "$staging_dir" "$install_dir"

Expand Down
4 changes: 2 additions & 2 deletions cmake/FetchTestDataset.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# cmake-format: off
file(
DOWNLOAD https://zenodo.org/records/10289491/files/hictk_test_data.tar.xz?download=1
EXPECTED_HASH SHA256=5e69dceb8789d923a38aed7add8fc18abfdfe531aea6effcdb7efe3c9bcf5246
DOWNLOAD https://zenodo.org/records/10552012/files/hictk_test_data.tar.xz?download=1
EXPECTED_HASH SHA256=f49c9fdd6e27f3d318cc0544510d89ed57ddd4d56b71ad32bb499895e94f396b
"${PROJECT_SOURCE_DIR}/test/data/hictk_test_data.tar.xz")
# cmake-format: on

Expand Down
1 change: 1 addition & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[requires]
boost/1.83.0#7825569cd0622461dec7bc87dfdf47ae
bshoshany-thread-pool/3.5.0#5aaea7ccf37107d3c1ba9ca9ab246e42
concurrentqueue/1.0.4#1e48e1c712bcfd892087c9c622a51502
cli11/2.3.2#1424b9b1d9e3682a7122f415b078b4d7
eigen/3.4.0#2e192482a8acff96fe34766adca2b24c
fast_float/6.0.0#6c8a953c57879453982a6ce69c0ba87c
Expand Down
2 changes: 1 addition & 1 deletion docs/balancing_matrices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ It should be noted that when using a large number of threads (e.g. more than 16)

When the ``--in-memory`` option is not used, ``hictk`` will create a temporary file under the default temporary folder. This file stores interactions using a layout and compression that are optimized for the access pattern used by ``hictk balance``. When balancing large matrices, this file can be quite large (sometimes tens of GBs). If this is the case, it may be appropriate to change the temporary folder using the ``--tmpdir`` option.

Finally, when balancing .hic files, ``hictk`` depends on `JuicerTools <https://github.com/aidenlab/Juicebox/releases/latest>`_ or `HiCTools <https://github.com/aidenlab/HiCTools/releases/latest>`_ to write balancing weights back to the file. Thus, when balancing .hic files, the JAR file to one of the tools should be specified through the ``--juicer-tools-jar`` option. You should use JuicerTools when balancing .hic files in .hic v8 format or older and HiCTools when balancing .hic v9 files.
Finally, when balancing .hic files, only .hic v9 files and newer are supported.
93 changes: 58 additions & 35 deletions docs/cli_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Subcommands
convert Convert HiC matrices to a different format.
dump Dump data from .hic and Cooler files to stdout.
fix-mcool Fix corrupted .mcool files.
load Build .cool files from interactions in various text formats.
merge Merge coolers.
load Build .cool and .hic files from interactions in various text formats.
merge Merge multiple Cooler or .hic files into a single file.
rename-chromosomes, rename-chroms
Rename chromosomes found in a Cooler file.
validate Validate .hic and Cooler files.
Expand Down Expand Up @@ -62,7 +62,10 @@ hictk balance
Maximum number of iterations.
--rescale-weights,--no-rescale-weights{false}
Rescale weights such that rows sum approximately to 2.
--name TEXT [weight] Name to use when writing weights to file.
--name TEXT Name to use when writing weights to file.
Defaults to ICE, INTER_ICE and GW_ICE when --mode is cis, trans and gw, respectively.
--create-weight-link Create a symbolic link to the balancing weights at clr::/bins/weight.
Ignored when balancing .hic files
--in-memory Store all interactions in memory (greatly improves performance).
--stdout Write balancing weights to stdout instead of writing them to the input file.
--chunk-size UINT:POSITIVE [10000000]
Expand All @@ -71,12 +74,8 @@ hictk balance
Set verbosity of output to the console.
-t,--threads UINT:UINT in [1 - 16] [1]
Maximum number of parallel threads to spawn.
-l,--compression-level UINT:INT in [0 - 19] []
-l,--compression-lvl UINT:INT in [0 - 19] []
Compression level used to compress temporary files using ZSTD.
--juicer-tools-jar TEXT:FILE
Path to juicer_tools or hic_tools JAR.
--juicer-tools-memory UINT:SIZE [b, kb(=1000b), kib(=1024b), ...]:POSITIVE [256MB]
Max heap size used by juicer_tools.
-f,--force Overwrite existing files and datasets (if any).

hictk convert
Expand All @@ -98,8 +97,6 @@ hictk convert
- cool
- mcool
- hic
-j,--juicer-tools-jar TEXT:FILE
Path to juicer_tools or hic_tools JAR.
-r,--resolutions UINT:POSITIVE ...
One or more resolutions to be converted. By default all resolutions are converted.
--normalization-methods TEXT [ALL] ...
Expand All @@ -108,17 +105,17 @@ hictk convert
Pass NONE to avoid copying normalization vectors.
--fail-if-norm-not-found Fail if any of the requested normalization vectors are missing.
-g,--genome TEXT Genome assembly name. By default this is copied from the .hic file metadata.
--juicer-tools-memory UINT:SIZE [b, kb(=1000b), kib(=1024b), ...]:POSITIVE [32GB]
Max heap size used by juicer_tools. Only used when converting from cool to hic
--tmpdir TEXT Path where to store temporary files.
--chunk-size UINT:POSITIVE [10000000]
Batch size to use when converting .[m]cool to .hic.
-v,--verbosity UINT:INT in [1 - 4] []
Set verbosity of output to the console.
-t,--threads UINT:UINT in [2 - 16] [2]
Maximum number of parallel threads to spawn.
When converting from hic to cool, only two threads will be used.
-l,--compression-level UINT:INT in [0 - 9] []
Compression level used to compress temporary files.
Pass 0 to disable compression.
-l,--compression-lvl UINT:INT in [1 - 12] [6]
Compression level used to compress interactions.
Defaults to 6 and 10 for .cool and .hic files, respectively.
-f,--force Overwrite existing files (if any).

hictk dump
Expand All @@ -134,7 +131,7 @@ hictk dump
Options:
-h,--help Print this help message and exit
--resolution UINT:NONNEGATIVE
HiC matrix resolution (ignored when file is not in .hic format).
HiC matrix resolution (ignored when file is in .cool format).
--matrix-type ENUM:value in {expected->2,observed->0,oe->1} OR {2,0,1} [observed]
Matrix type (ignored when file is not in .hic format).
--matrix-unit ENUM:value in {BP->0,FRAG->1} OR {0,1} [BP]
Expand Down Expand Up @@ -181,7 +178,7 @@ hictk fix-mcool
Set verbosity of output to the console.
-t,--threads UINT:UINT in [1 - 16] [1]
Maximum number of parallel threads to spawn (only applies to the balancing stage).
-l,--compression-level UINT:INT in [0 - 19] []
-l,--compression-lvl UINT:INT in [0 - 19] []
Compression level used to compress temporary files using ZSTD (only applies to the balancing stage).
-f,--force Overwrite existing files (if any).

Expand All @@ -190,18 +187,18 @@ hictk load

.. code-block:: text

Build .cool files from interactions in various text formats.
Usage: hictk load [OPTIONS] chrom-sizes output-uri
Build .cool and .hic files from interactions in various text formats.
Usage: hictk load [OPTIONS] chrom-sizes output-path
Positionals:
chrom-sizes TEXT:FILE REQUIRED
Path to .chrom.sizes file.
output-uri TEXT REQUIRED Path to output Cooler (URI syntax supported).
output-path TEXT REQUIRED Path to output file.
Options:
-h,--help Print this help message and exit
-b,--bin-size UINT:POSITIVE Excludes: --bin-table
Bin size (bp).
Required when --bin-table is not used.
-t,--bin-table TEXT:FILE Excludes: --bin-size
--bin-table TEXT:FILE Excludes: --bin-size
Path to a BED3+ file with the bin table.
-f,--format TEXT:{4dn,validpairs,bg2,coo} REQUIRED
Input format.
Expand All @@ -214,29 +211,44 @@ hictk load
--count-as-float Interactions are floats.
--assume-sorted,--assume-unsorted{false}
Assume input files are already sorted.
--chunk-size UINT [10000000]
Number of pixels to buffer in memory.
-l,--compression-lvl UINT:INT bounded to [1 - 12]
Compression level used to compress interactions.
Defaults to 6 and 10 for .cool and .hic files, respectively.
-t,--threads UINT:UINT in [1 - 16] [1]
Maximum number of parallel threads to spawn.
When loading interactions in a .cool file, only a single thread will be used.
--tmpdir TEXT [/tmp] Path to a folder where to store temporary data.
-v,--verbosity UINT:INT in [1 - 4] []
Set verbosity of output to the console.
--batch-size UINT [20000000]
Number of pixels to buffer in memory.
Only used when processing unsorted interactions or pairs.

hictk merge
-----------

.. code-block:: text

Merge coolers.
Usage: hictk merge [OPTIONS] input-coolers...
Merge multiple Cooler or .hic files into a single file.
Usage: hictk merge [OPTIONS] input-files...
Positionals:
input-coolers TEXT:Cooler x 2 REQUIRED
Path to two or more Cooler files to be merged (URI syntax supported).
input-files TEXT:(Cooler) OR (HiC) x 2 REQUIRED
Path to two or more Cooler or .hic files to be merged (Cooler URI syntax supported).
Options:
-h,--help Print this help message and exit
-o,--output-cooler TEXT Output Cooler (URI syntax supported).
When not specified, merged interactions will be printed to stdout.
-f,--force Force overwrite output cooler.
--chunk-size UINT [5000000]
-o,--output-file TEXT REQUIRED
Output Cooler or .hic file (Cooler URI syntax supported).
--resolution UINT:NONNEGATIVE
HiC matrix resolution (ignored when input files are in .cool format).
-f,--force Force overwrite output file.
--chunk-size UINT [10000000]
Number of pixels to store in memory before writing to disk.
-l,--compression-lvl UINT:INT bounded to [1 - 12]
Compression level used to compress interactions.
Defaults to 6 and 10 for .cool and .hic files, respectively.
-t,--threads UINT:UINT in [1 - 16] [1]
Maximum number of parallel threads to spawn.
When merging interactions in Cooler format, only a single thread will be used.
--tmpdir TEXT [/tmp] Path to a folder where to store temporary data.
-v,--verbosity UINT:INT in [1 - 4] []
Set verbosity of output to the console.

Expand Down Expand Up @@ -282,10 +294,11 @@ hictk zoomify
.. code-block:: text

Convert single-resolution Cooler file to multi-resolution by coarsening.
Usage: hictk zoomify [OPTIONS] cooler [mcool]
Usage: hictk zoomify [OPTIONS] cooler/hic mcool/hic
Positionals:
cooler TEXT:Cooler REQUIRED Path to a .cool file (Cooler URI syntax supported).
mcool TEXT Output path.
cooler/hic TEXT:(Cooler) OR (HiC) REQUIRED
Path to a .cool or .hic file (Cooler URI syntax supported).
mcool/hic TEXT REQUIRED Output path.
Options:
-h,--help Print this help message and exit
--force Force overwrite existing output file(s).
Expand All @@ -298,5 +311,15 @@ hictk zoomify
Base resolution: 1000
Pow2: 1000, 2000, 4000, 8000...
Nice: 1000, 2000, 5000, 10000...
-l,--compression-lvl UINT:INT bounded to [1 - 12] [6]
Compression level used to compress interactions.
Defaults to 6 and 12 for .mcool and .hic files, respectively.
-t,--threads UINT:UINT in [1 - 16] [1]
Maximum number of parallel threads to spawn.
When zoomifying interactions from a .cool file, only a single thread will be used.
--chunk-size UINT [10000000]
Number of pixels to buffer in memory.
Only used when zoomifying .hic files.
--tmpdir TEXT [/tmp] Path to a folder where to store temporary data.
-v,--verbosity UINT:INT in [1 - 4] []
Set verbosity of output to the console.
Loading