No project description provided
Project description
HiClip
Installation
hiclip can be installed using pip.
pip install hiclip
Then, install the appropriate version of PyTorch. After experimental verification, hiclip works well in the environment of pytorch 2.0.1 + CUDA 11.7.
# This is just an example, you can find the appropriate version in https://pytorch.org/get-started/previous-versions/
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
Tutorial
generate train dataset
import hiclip
# uri also support .cool file
dataset = hiclip.setup_data(
main_cooler_uri="main/K562.mcool::/resolutions/5000",
sub_cooler_uri="sub/K562.mcool::/resolutions/5000",
target_cooler_uri="target/K562.mcool::/resolutions/5000",
)
dataset.write(filename="dataset", compression="gzip")
train
import anndata
import hiclip
dataset = anndata.read_h5ad("dataset")
hiclip.HiClip.setup_anndata(dataset)
model = hiclip.HiClip(dataset)
model.train(
max_epochs=200,
save_ckpt_every_n_epoch=2,
plan_kwargs={"lr": 1e-3, "weight_decay": 0},
batch_size=4,
num_workers=16,
)
predict or observe
import anndata
import hiclip
dataset = anndata.read_h5ad("dataset")
model = hiclip.HiClip.load(
".hiclip/202X-XX-XX_XX-XX-XX_val_hiclip_metric/epoch=...",
dataset
)
# if predict
pred: anndata.AnnData = model.predict(dataset)
# if observe
pred = model.observe(main_cooler_uri, sub_cooler_uri, chrom, start, end)
The specific case is in the examples folder.
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
hiclip-0.0.6.tar.gz
(912.5 kB
view details)
Built Distribution
hiclip-0.0.6-py3-none-any.whl
(959.2 kB
view details)
File details
Details for the file hiclip-0.0.6.tar.gz
.
File metadata
- Download URL: hiclip-0.0.6.tar.gz
- Upload date:
- Size: 912.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84fa83cffda1cdfcb9df8476aa712b13db141be89511d0d35d53ae92591b6ac2 |
|
MD5 | 3257924ad4f2b5036105f0da00f36a79 |
|
BLAKE2b-256 | 27b4f2fe55e7a1161305925796048638fe353e15fd048fb91ff7a0e7b7631def |
Provenance
The following attestation bundles were made for hiclip-0.0.6.tar.gz
:
Publisher:
ci.yml
on LMH0066/HiClip
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
hiclip-0.0.6.tar.gz
- Subject digest:
84fa83cffda1cdfcb9df8476aa712b13db141be89511d0d35d53ae92591b6ac2
- Sigstore transparency entry: 148841221
- Sigstore integration time:
- Predicate type:
File details
Details for the file hiclip-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: hiclip-0.0.6-py3-none-any.whl
- Upload date:
- Size: 959.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54ce70248c465d41ddab7fdf5cec1fbec6d8b89520c95b6b08d540767b6e9b38 |
|
MD5 | c419372b788bb6215a04f34b03dd055c |
|
BLAKE2b-256 | 007a9314e12ff9f1e80a10159650be6269c713523f22749f1165e9adde18de7d |
Provenance
The following attestation bundles were made for hiclip-0.0.6-py3-none-any.whl
:
Publisher:
ci.yml
on LMH0066/HiClip
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
hiclip-0.0.6-py3-none-any.whl
- Subject digest:
54ce70248c465d41ddab7fdf5cec1fbec6d8b89520c95b6b08d540767b6e9b38
- Sigstore transparency entry: 148841229
- Sigstore integration time:
- Predicate type: