Installation
Install Order
Cisformer does not currently use PyPI metadata to install all runtime dependencies automatically. Install the runtime environment first, then install the Cisformer command-line package from PyPI.
Recommended Runtime Environment
Cisformer training and prediction rely on PyTorch, CUDA, Hugging Face Accelerate, Scanpy, pybedtools, flash-attn, torcheval, and tensorboard. We recommend using conda to isolate these dependencies:
conda create -n cisformer python=3.10
conda activate cisformer
bash ./requirement.sh
pip install cisformer
requirement.sh installs the main runtime dependencies. pip install cisformer
installs the cisformer CLI and package files.
You can also install the dependencies manually:
conda create -n cisformer python=3.10
conda activate cisformer
conda install numpy=1.23
conda install pytorch=2.2.1 torchvision=0.17.1 torchaudio=2.2.1 pytorch-cuda=12.1 -c pytorch -c nvidia
conda install -c conda-forge accelerate==0.22.0
conda install -c conda-forge scanpy python-igraph leidenalg
pip install ninja
pip install flash-attn --no-build-isolation
pip install torcheval
conda install tensorboard
conda install pybedtools
pip install cisformer
Verify the Installation
After installation, check the CLI:
cisformer -h
cisformer generate_default_config -h
GPU and Distributed Training
Cisformer uses Hugging Face Accelerate for distributed training. After running
cisformer generate_default_config, edit cisformer_config/accelerate_config.yaml
to match your machine:
gpu_ids: comma-separated GPU IDs.num_processes: number of GPU processes.main_process_port: use a free port, especially when running multiple jobs.
Bedtools Requirement
Preprocessing and link inference use genomic interval operations through
pybedtools. Make sure the system bedtools binary is available in your
environment if pybedtools reports backend errors.