Data Analysis
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 pixelatorR with
Seurat
.
Installation Requirements
Python
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.
R
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 to your computer.
Then, you can install it with the following instructions. However, if you are in an 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 com.apple.pkg.RosettaUpdateAuto
package-id: com.apple.pkg.RosettaUpdateAuto
version: 1.0.0.0.1.1683279177
volume: /
location: /
install-time: 1684563157
## Xcode Command Line Tools
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 12.5.1.0.1.1623191612
volume: /
location: /
install-time: 1703124789
groups: com.apple.FindSystemFiles.pkg-group
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.
- Shell
(mpx-analysis-r)$ R
- R
install.packages("remotes")
remotes::install_github("PixelgenTechnologies/pixelatorR")
Now, you have prepared the environment to reproduce the Data Analysis tutorials and analyze MPX data in R with pixelatorR.
Each tutorial is written to be a self-contained unit of knowledge that you can use in your Data Analysis journey with MPX to answer your research questions.