Installation
TiRank supports multiple installation methods. We recommend using a dedicated conda environment.
Method 1: Bioconda Installation (Recommended)
This is the simplest method. It installs the released TiRank package from Bioconda.
Clone the TiRank repository (recommended to access example scripts and the Snakemake workflow):
git clone https://github.com/LenisLin/TiRank.git
cd TiRank
Create a clean Python environment:
conda create -n tirank python=3.9
conda activate tirank
Install TiRank (and required graph dependencies):
conda install -c bioconda -c conda-forge tirank leidenalg python-igraph
Note
TiRank has been tested on Ubuntu 22.04 with Python 3.9.
Method 2: Docker
Install Docker.
Pull the TiRank Docker image:
docker pull lenislin/tirank_v1:latest
Run the Docker container:
docker run -p 8050:8050 lenislin/tirank_v1:latest /bin/bash
Verify TiRank inside the container:
conda activate TiRank
python -c "import tirank; print(tirank.__version__)"
(Optional) Mount a local directory for persistent storage:
docker run -it -v /path/to/local/data:/container/data lenislin/tirank_v1:latest /bin/bash
Method 3: Interactive Web Tool (GUI)
This method runs the TiRank web application locally.
Set up the web server directory:
cd TiRank/Web
mkdir -p data
Download and extract the archived example datasets and pretrained model files from Zenodo:
Zenodo record (ExampleData.zip, ctranspath.pth, GUI tutorial video): https://doi.org/10.5281/zenodo.18275554
Ensure the following directory structure under
Web/:
Web/
├── assets/
├── components/
├── img/
├── layout/
├── data/
│ ├── pretrainModel/
│ │ └── ctranspath.pth
│ ├── ExampleData/
│ │ ├── CRC_ST_Prog/
│ │ └── SKCM_SC_Res/
├── tiRankWeb/
└── app.py
Run the web application:
python app.py
Open a browser at:
http://localhost:8050
Method 4: Snakemake Workflow (Reproducible Execution)
For end-to-end workflow execution with automated environment provisioning, we recommend running the provided Snakemake workflow with integrated conda environment management.
Install a fixed Snakemake version:
conda create -n tirank_smk -c conda-forge -c bioconda python=3.9 snakemake=7.32.4
conda activate tirank_smk
From the TiRank repository root, run:
snakemake --snakefile workflow/Snakefile \
--configfile workflow/config/config.yaml \
--use-conda --cores 8
For details (including recommended folder layout and configuration), see: Snakemake Workflow