Installation
Navigate to the Loki2 source directory and create a conda environment:
cd ./src conda env create -f environment.yaml conda activate loki2_env
Install Loki2:
python -m pip install .
(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 fromloki2_envand is only needed forencode_trans.py; every other step runs inloki2_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.ptand place it in./src/loki2/.