Installation

TiRank supports multiple installation methods. It is recommended to create a dedicated conda environment to ensure compatibility.

Method 2: Docker

  1. Install Docker

    Ensure Docker is installed on your system.

  2. Pull the TiRank Docker Image

    docker pull lenislin/tirank_v1:latest
    
  3. Run the Docker Container

    docker run -p 8050:8050 lenislin/tirank_v1:latest /bin/bash
    
  4. Verify Container Execution

    After running the above command, you should be inside the container’s terminal. Verify the setup by activating the environment and checking the TiRank version:

    conda activate TiRank
    
    python -c "import tirank; print(tirank.__version__)"
    
  5. Persistent Data Storage (Optional)

    To mount a local directory to retain data inside the container:

    docker run -it -v /path/to/local/data:/container/data lenislin/tirank_v1:latest /bin/bash
    
  6. Stop and Remove the Docker Container

    Use the following commands to manage containers:

    docker stop <container_id>
    docker rm <container_id>
    

Method 3: Interactive Web Tool (GUI)

This method is for running the TiRank web application locally.

  1. Set Up the Web Server

    Navigate to the Web directory and create a data folder:

    cd TiRank/Web
    mkdir data
    

    Download the required datasets and pretrained models into the newly created data directory:

  2. Set Up Directory Structure

    Ensure the following directory structure is maintained within the Web folder:

    Web/
    ├── assets/
    ├── components/
    ├── img/
    ├── layout/
    ├── data/
    │   ├── pretrainModel/
    │   │   └── ctranspath.pth
    │   ├── ExampleData/
    │   │   ├── CRC_ST_Prog/
    │   │   └── SKCM_SC_Res/
    ├── tiRankWeb/
    └── app.py
    
  3. Run the Web Application

    Execute the following command from within the Web directory:

    python app.py
    
  4. Access the Web Interface

    Open a web browser and navigate to http://localhost:8050 to access the TiRank GUI.