Skip to main content

This section contains tutorials and code examples to help you get started with MPX data analysis. We support downstream analysis in Python using pixelator together with Scanpy, and analysis in R using Seurat.

Installation Requirements


To complete the following sections, you will need to install pixelator as a library if you are working in Python. In order to achieve that, follow the instructions in our installation guide.


For R programmers, we offer the pixelatorR package.

We recommend that you complete the following steps to set up a conda environment and install the R package. Our preference is to install the Miniforge distribution of conda and mamba.

Download and save the environment yml file file in your computer. Then, you can install it with the following instructions. However, if you are in a ARM chipset (Apple M series or AWS Graviton), follow the alternative ARM instructions below.

conda create -n mpx-analysis-r -f path/to/your/environment*.yml
conda activate mpx-analysis-r

Once this is completed, you can continue with the installation of pixelatorR.

Mac with ARM chipsets


The necessary R-packages to follow the tutorials cannot be installed on macOS systems with an ARM chipset natively. Some of the packages don't have any supported ARM image.

Make sure you have installed Rosetta and Xcode Command Line Tools. Otherwise, install them: Rosetta, Xcode Command Line Tools.

## Rosetta
$ pkgutil --pkg-info
volume: /
location: /
install-time: 1684563157

## Xcode Command Line Tools
$ pkgutil
volume: /
location: /
install-time: 1703124789

You can install the packages on macOS systems with ARM chipsets using a workaround by emulating x84_64 with Rosetta. These commands should make sure that conda uses the appropriate x84_64 channels.

## install the packages from the yaml file
CONDA_SUBDIR=osx-64 conda env create -n mpx-analysis-r -f environment*.yml

## activate the environment
conda activate mpx-analysis-r

## use x86_64 architecture channel(s)
conda config --env --set subdir osx-64

Once this is completed, you can continue with the installation of pixelatorR.

PixelatorR Installation


Our R package is still considered a Beta release.

Once the environment is created and activated, you can install pixelatorR from an R session running inside the environment You just created.

(mpx-analysis-r)$ R

install.packages("remotes") remotes::install_github("PixelgenTechnologies/pixelatorR")

Now, you have prepared the environment to reproduce the MPX Data Analysis tutorials and analyze MPX data in R with pixelatorR. Continue to download the tutorials required datasets.

Data Requirements

To complete the following tutorials, you should download the following pxl files to a folder data:


mkdir data && cd data

## Datasets download
curl -O$PIXELATOR_VERSION/1k-human-pbmcs-v1.0-immunology-I/Sample01_human_pbmcs_unstimulated.dataset.pxl
curl -O$PIXELATOR_VERSION/1k-human-pbmcs-v1.0-immunology-I/Sample02_human_pbmcs_unstimulated.dataset.pxl
curl -O$PIXELATOR_VERSION/uropod-t-cells-v1.0-immunology-I/Uropod_control.dataset.pxl
curl -O$PIXELATOR_VERSION/uropod-t-cells-v1.0-immunology-I/Uropod_CD54_fixed_RANTES_stimulated.dataset.pxl

cd ..