Skip to content

Commit 27297ec

Browse files
committed
Massive refactoring, added SVG export, added names tracks, added converter batch mode, update README, updated years in license text.
1 parent 1980a45 commit 27297ec

File tree

68 files changed

+266
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+266
-72
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2024 Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
3+
Copyright (c) 2021-2026 Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.adoc

Lines changed: 96 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,104 @@ image:https://github.com/AxisAlexNT/HiCT_JVM/actions/workflows/autobuild-release
44

55
== Launching pre-built version
66

7+
8+
== For users of `.jar` distribution
9+
10+
This section is intended for bioinformatics users who download a ready-to-run fat JAR from GitHub Releases.
11+
You need to install Java 21+ (this project is built for Java 21 bytecode).
12+
Download the latest fat JAR from the https://github.com/ctlab/HiCT_JVM/releases[Releases page] (Assets section).
713
**NOTE:** prebuilt native bundles are currently provided for *Windows* (tested on 10/11) and *Linux with glibc* (common Debian/Ubuntu-like distributions). Alpine/musl is not supported by these bundled binaries. Current prebuilt artifacts are AMD64-only. On Windows you might need to install https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170[Microsoft Visual C++ Redistributable].
814

9-
1. Install Java 19+ (this project is built for Java 19 bytecode);
10-
1. Make sure `JAVA_HOME` points to that installation;
11-
1. Download the latest fat JAR from the https://github.com/ctlab/HiCT_JVM/releases[Releases page] (Assets section). The stable default is usually the latest autogenerated build from `master`;
12-
1. Open a terminal in the directory with your downloaded JAR;
13-
1. Run `java -jar hict.jar` and wait for startup logs;
14-
1. Open `http://localhost:8080` (or your configured WebUI port).
15+
=== Quick start
16+
17+
1. Download the latest `-fat.jar` from the Releases page (Assets) and rename it to `hict-fat.jar`.
18+
2. Place your `.hict.hdf5`, `.mcool`, `.cool`, `.agp`, and `.fasta` files under a single directory.
19+
3. Run:
20+
+
21+
```bash
22+
java -jar hict-fat.jar start-server
23+
```
24+
+
25+
Directory with files is set using `DATA_DIR` environment variable, by default it scans subtree of the directory in which `hict-fat.jar` is launched from.
26+
In Linux you may set it as follows:
27+
+
28+
```bash
29+
DATA_DIR=/path/to/data/ java -jar hict-fat.jar start-server
30+
```
31+
+
32+
4. Open WebUI at `http://localhost:8080`.
33+
34+
=== CLI commands (summary)
35+
36+
```bash
37+
# API + WebUI (default mode, includes converters in WebUI as descibed below)
38+
java -jar hict-fat.jar start-server
39+
40+
# API only (no WebUI)
41+
java -jar hict-fat.jar start-api-server
42+
43+
# Convert .mcool -> .hict.hdf5 (CLI mode)
44+
java -jar hict-fat.jar convert mcool-to-hict \
45+
--input /data/sample.mcool \
46+
--output /data/sample.hict.hdf5
47+
48+
# Convert .hict.hdf5 -> .mcool (CLI mode)
49+
java -jar hict-fat.jar convert hict-to-mcool \
50+
--input /data/sample.hict.hdf5 \
51+
--output /data/sample.mcool
52+
```
53+
54+
Get full CLI help:
55+
56+
```bash
57+
java -jar hict-fat.jar --help
58+
java -jar hict-fat.jar start-server --help
59+
java -jar hict-fat.jar start-api-server --help
60+
java -jar hict-fat.jar convert --help
61+
java -jar hict-fat.jar convert mcool-to-hict --help
62+
java -jar hict-fat.jar convert hict-to-mcool --help
63+
```
64+
65+
=== WebUI conversion (Experimental / W.I.P.)
66+
67+
WARNING: WebUI conversion is experimental and may be slower or less stable than the CLI.
68+
69+
1. Open the WebUI.
70+
2. Use *File → Convert Coolers*.
71+
3. Track progress in the conversion window.
72+
73+
=== API access (Experimental / W.I.P.)
74+
75+
WARNING: The API is still evolving. Endpoints, parameters, and response formats may change.
76+
77+
Example (Python) for fetching a submatrix tile as an image:
78+
79+
```python
80+
import requests
81+
82+
host = "http://localhost:5000"
83+
params = {
84+
"version": 0,
85+
"bpResolution": 10000,
86+
"format": "PNG_BY_PIXELS",
87+
"row": 0,
88+
"col": 0,
89+
"rows": 512,
90+
"cols": 512,
91+
}
92+
93+
r = requests.get(f"{host}/get_tile", params=params)
94+
r.raise_for_status()
95+
data = r.json()
96+
png_data_url = data["image"]
97+
print(png_data_url[:64])
98+
```
99+
100+
To apply visualization/normalization settings before fetching tiles:
101+
102+
* POST `/set_visualization_options` with visualization parameters.
103+
* POST `/set_normalization` with normalization settings.
104+
* Then call `/get_tile` as shown above.
15105

16106
=== Supported platforms / JDK details
17107

build.gradle.kts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -25,6 +25,8 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2525
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
2626
import java.io.ByteArrayOutputStream
2727
import java.nio.file.Files
28+
import java.nio.file.StandardCopyOption
29+
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
2830

2931
plugins {
3032
java
@@ -57,6 +59,7 @@ val watchForChange = "src/**/*"
5759
val doOnChange = "${projectDir}/gradlew classes"
5860

5961
val versionFile = file("${project.projectDir}/version.txt")
62+
val webUiPackageJson = file("${project.projectDir}/../HiCT_WebUI/package.json")
6063

6164
val webUICloneDirectory = layout.buildDirectory.dir("webui").get()
6265
val localWebUIRepositoryDirectory = layout.projectDirectory.dir("../HiCT_WebUI")
@@ -349,6 +352,20 @@ tasks.named("clean") {
349352

350353
tasks.named("processResources") {
351354
dependsOn("copyWebUI")
355+
doLast {
356+
Files.copy(
357+
versionFile.toPath(),
358+
layout.buildDirectory.file("resources/main/version.txt").get().asFile.toPath(),
359+
StandardCopyOption.REPLACE_EXISTING
360+
)
361+
if (webUiPackageJson.exists()) {
362+
Files.copy(
363+
webUiPackageJson.toPath(),
364+
layout.buildDirectory.file("resources/main/webui-package.json").get().asFile.toPath(),
365+
StandardCopyOption.REPLACE_EXISTING
366+
)
367+
}
368+
}
352369
}
353370

354371
tasks.named("build") {

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/assembly/AGPProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/assembly/FASTAProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/chunkedfile/ChunkedFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/chunkedfile/Initializers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/chunkedfile/MatrixQueries.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/ru/itmo/ctlab/hict/hict_library/chunkedfile/ScaffoldingOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MIT License
33
*
4-
* Copyright (c) 2021-2024. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
4+
* Copyright (c) 2021-2026. Aleksandr Serdiukov, Anton Zamyatin, Aleksandr Sinitsyn, Vitalii Dravgelis and Computer Technologies Laboratory ITMO University team.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)