Skip to main content

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.8.tar.gz (908.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hiclip-0.0.8-py3-none-any.whl (959.4 kB view details)

Uploaded Python 3

File details

Details for the file hiclip-0.0.8.tar.gz.

File metadata

  • Download URL: hiclip-0.0.8.tar.gz
  • Upload date:
  • Size: 908.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hiclip-0.0.8.tar.gz
Algorithm Hash digest
SHA256 252a6df5ebc18b0a2c199c79007017dac3f44ac695453ec670cb4ab7666f9aee
MD5 4743f617f5992e858fca32da5e85372f
BLAKE2b-256 f3552f29d1851c5589e9ca0df5f4c05bcd80423b9a3ddc8f0c8edc94f666a22f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hiclip-0.0.8.tar.gz:

Publisher: ci.yml on LMH0066/HiClip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hiclip-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: hiclip-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 959.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hiclip-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e347db40da19f420656fe9cb1d132f57b8bb11395fac1c638e3437a3fb0938
MD5 8ebb6446eded39cbbf16c5204c0949fd
BLAKE2b-256 d8a58832cbd6704368cae9fe5423ba21256ef69979f4c39594f361ec3cf8162a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hiclip-0.0.8-py3-none-any.whl:

Publisher: ci.yml on LMH0066/HiClip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page