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
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")
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,
)
import anndata
import hiclip
dataset = anndata.read_h5ad("dataset")
model = hiclip.HiClip.load(
".hiclip/2024-02-26_16-59-10_val_hiclip_metric/epoch=...",
dataset
)
pred: anndata.AnnData = model.predict(dataset)
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.2.tar.gz
(12.2 kB
view hashes)
Built Distribution
hiclip-0.0.2-py3-none-any.whl
(13.5 kB
view hashes)