From https://www.muspan.co.uk:
MuSpAn is a multiscale spatial analysis toolbox for analysing complex imaging data. It uses cutting-edge mathematical and statistical approaches to data analysis to provide the most comprehensive spatial analysis available. MuSpAn is being continually expanded, with a team of quantitative researchers constantly developing new methodology to tackle problems in analysing spatial transcriptomics, multiplex immunohistochemistry, imaging mass cytometry and more.
First you will need to complete the MuSpAn application form and confirm that the software is only to be used for academic purposes. The username and password you receive will be used later to install the software, regardless of which method you choose.
After getting the MuSpAn download credentials, you have three possible options to install the software on Comet.
Use the basic Python module as included on Comet and the provided pip command to do a user level install of MuSpAn into your own local Python modules folder (this resides within your $HOME directory under $HOME/.local/lib/python*):
pip
$HOME
$HOME/.local/lib/python*
$ module load Python/3.12.3 $ pip install --user https://docs.muspan.co.uk/code/latest.zip <prompted for MuSpAn username> <prompted for MuSpAn password> $
To test:
$ module load Python/3.12.3 $ python -c "import muspan as ms; print('MuSpAn module available')" MuSpAn module available $
To run in your own scripts afterwards:
$ module load Python/3.12.3 $ python <script_name.py>
Although easiest, the disadvantage is that MuSpAn (and all of its dependencies installed by pip) are always present, even if you decide you need a different pandas or numpy. We therefore recommend Option 2, or Option 3, below.
Create a new Python virtual environment using the built-in Python module commands. The folder ./muspan_venv will be created in whichever directory you run the commands below:
./muspan_venv
$ module load Python/3.12.3 $ python -m venv muspan_venv
Activate that new environment:
$ cd muspan_venv $ source bin/activate
Now use pip to install MuSpAn in that environment:
$ pip install https://docs.muspan.co.uk/code/latest.zip <prompted for MuSpAn username> <prompted for MuSpAn password> $
$ module load Python/3.12.3 $ cd muspan_venv $ source bin/activate $ python -c "import muspan as ms; print('MuSpAn module available')" MuSpAn module available $
$ module load Python/3.12.3 $ cd muspan_venv $ source bin/activate $ python <script_name.py>
This keeps MuSpAn and all of its extra dependencies contained within the muspan_venv folder so that it does not conflict with any other Python software you have installed or use.
muspan_venv
Use Miniforge to create a new conda (or mamba) environment. This will create the new folder ./muspan_env within $HOME/miniforge3/venvs/:
./muspan_env
$HOME/miniforge3/venvs/
$ module load Miniforge $ conda create -n muspan_env -c conda-forge
Activate the new environment:
$ conda activate muspan_env
Ensure the new environment has pip installed:
$ conda install pip
Then use pip from the environment to install MuSpAn.
$ pip install https://docs.muspan.co.uk/code/latest.zip
Test MuSpAn is installed:
$ python -c "import muspan as ms; print('MuSpAn module available')" MuSpAn module available $
You can then use MuSpAn afterwards in your own Python scripts by running:
$ module load Miniforge $ conda activate muspan_env $ python <name_of_script.py>
Back to Software
Table of Contents
HPC Service
Main Content Sections
Documentation Tools