• Home
  • Accessing Our Facilities
    • Apply for Access
    • HPC Resource List
    • Our Staff
    • Our Research Projects
    • Our Research Software

    • Contributions & Costings
    • HPC Driving Test
  • Documentation
    • Documentation Home
    • Getting Started
    • Advanced Topics
    • Training & Workshops
    • FAQ
    • Policies & Procedures
    • Using the Wiki

    • Data & Report Terminology
    • About this website

    • Reports
  • My Account
    • My HPC Projects
HPC Support
Trace: • muspan

MuSpAn

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.
  • See more information: https://www.muspan.co.uk/
  • MuSpAn documentation: https://docs.muspan.co.uk/latest/Documentation.html

Installing MuSpAn on Comet

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.

Option 1. Using Python Module + Pip

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*):

$ 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.


Option 2. Using Python Module + Virtual Env

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:

$ 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>
$

To test:

$ 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

$

To run in your own scripts afterwards:

$ 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.


Option 3. Using Conda/Mamba Environment

Use Miniforge to create a new conda (or mamba) environment. This will create the new folder ./muspan_env within $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

Previous Next

HPC Support

Table of Contents

Table of Contents

  • MuSpAn
    • Installing MuSpAn on Comet
    • Option 1. Using Python Module + Pip
    • Option 2. Using Python Module + Virtual Env
    • Option 3. Using Conda/Mamba Environment

HPC Service

  • News & Changes

Main Content Sections

  • Documentation Home
  • Getting Started
  • Advanced Topics
  • Training & Workshops
  • FAQ
  • Policies & Procedures
  • Using the Wiki
  • Contact us & Get Help

Documentation Tools

  • Wiki Login
  • RSE-HPC Team Area
Developed and operated by
Research Software Engineering
Copyright © Newcastle University
Contact us @rseteam