Skip to content

LRpz/SpaceM

Repository files navigation

SpaceM - method for single-cell metabolomics

SpaceM integrates microscopy data with MALDI-imaging microscopy to enable high precision estimation of which cells have been sampled.
This repository contains the source code for the paper SpaceM method for single-cell metabolomics characterizes metabolic heterogeneity states.

Installation

We support python3. To install the dependencies run:

pip install -r requirements.txt

Download and install CellProfiler 3.0.0 Download and install Fiji release of December 22 2015

In paths.json add the path of CellProfiler to "CellProfiler path" and the path of Fiji to "Fiji path"

Data requirement

The Main Folder MF for SpaceM analysis is created manually and should be organized as follow:

MF
|
└─ Input
    |
    └─ MALDI
    |    *.RAW
    |    *.UDP
    |    *.imzML
    |    *.ibd
    |        
    └─ Microscopy
         |
         └─ preMALDI
         |    tile_1.tif
         |    tile_2.tif
         |    ...
         |    out.txt
         |   
         |
         └─ postMALDI
              tile_1.tif
              tile_2.tif
              ...
              out.txt

MALDI-imaging

The .RAW, .UDP, .imzML and .ibd files are required. The data should be uploaded and analyzed in METASPACE It is imperative that ablation marks are visible and non-overlapping in the post-MALDI microsocpy. For more details, see the Methods section in the paper.

Microscopy

For both pre- and post-MALDI images, a tiled acquisition of the cell culture area with black penmarks are required. The individual tiles should be stored with a text file out.txt containing the upper left pixel x-y coordinates in um of each tile. At the moment, SpaceM does the stitching and is optimized for the Nikon Ti-E instrument output format. Soon SpaceM will be updated to only accept pre-stitched images, thus removing the requirement for Nikon instrument.

Once complete, add the path of the Main folder MF to the "MF" entry in the path.json file.

A working CellProfiler (CP) pipeline and project files able to segment the cells are required. Both the path of the CP pipeline and project should be added to the "CellProfiler pipeline path" and "CellProfiler project path" in paths.json, respectively.

Execute SpaceM

Run python runAnalysis.py and follow instructions when prompted. During analysis the Main folder will be added an Analysis sub-folder containing the results. The final spatio-molecular matrix will be stored as MORPHnMOL.csv and can be found at

MF
|
└─ Analysis
    |
    └─ scAnalysis
    |    MORPHnMOL.csv
    
    ...

The SpaceM datasets presented in the paper are available on MetaboLights.

All analysis used to generate the results present in this manuscript from the spatio-molecular matrices generated by SpaceM on Google Collab.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages