Installation

  1. Navigate to the Loki2 source directory and create a conda environment:

    cd ./src
    conda env create -f environment.yaml
    conda activate loki2_env
    
  2. Install Loki2:

    python -m pip install .
    
  3. (Morphology-to-transcriptome retrieval only) create the OmiCLIP environment:

    Transcriptome encoding is done with OmiCLIP, the visual-omics foundation model behind Loki (Nature Methods). It ships its own environment, loki_env, which is separate from loki2_env and is only needed for encode_trans.py; every other step runs in loki2_env.

    Follow the installation instructions of the Loki repository:

    conda create -n loki_env python=3.9
    conda activate loki_env
    cd /path/to/Loki/src
    python -m pip install .
    

    Then download the OmiCLIP checkpoint omiclip.pt and place it in ./src/loki2/.