Skip to content
MJS-708Public

About

Tools for analyzing multimodal DESI-MRM mass spectrometry imaging data integrated with other spatial modalities including histochemistry, spatial transcriptomics, and spatial proteomics (from `.zarr` SpatialData objects).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

corrMSI

corrMSI

Spatial analysis of targeted DESI-MRM imaging integrated with histology ROIs, cell annotations and targeted spatial transcriptomics, from SpatialData Zarr stores to CSV results and an HTML report.

Layout

Location Purpose
corrmsi.bat The one entry point (check / processing / stats_report / tests).
corrmsi/ Python package: desi_spatial_helpers.py (algorithms), run_desi_from_config.py (processing), publication_utils.py (masks, permutations, provenance), biological_summary.py (donor/animal contrasts), study_workbook.py (study .xlsx), run_corrmsi.py (launcher).
report/ R Markdown stats report: spatial_report.Rmd, spatial_structure.R, spatial_reading_guide.R, render_report.R, environment check.
templates/ Starting YAMLs: processing_example.yaml, processing_focused_lisa.yaml, stats_report_template.yaml.
tests/ Regression, tiny-processing and report smoke checks (corrmsi.bat tests).
docs/ Settings guide, method notes, change history, collaborator handover.
_local/ Local working files (figures, old notebooks/outputs); not part of the package, not tracked.

Study-specific YAMLs, the study workbook and bats live in each study, not here: <study>/scripts/spatial_stats/. Results go to <study>/results/spatial_stats/.

Running a study

corrmsi.bat check        <study>\scripts\spatial_stats\<dataset>_processing.yaml
corrmsi.bat processing   <study>\scripts\spatial_stats\<dataset>_processing.yaml
corrmsi.bat stats_report <study>\scripts\spatial_stats\<dataset>_stats_report.yaml

A study folder can wrap these in one bat per run (e.g. <dataset>_processing.bat, <dataset>_stats_report.bat, check.bat). The older words pipeline / report and the key pipeline_config still work.

  • processing: io.out_dir is the dataset results folder; every run creates <io.out_dir>/<YYYYMMDD-HHMMSS>/analysis/ with all CSVs and LISA maps, plus the frozen config, log and manifest. Nothing is overwritten.
  • stats_report: uses the newest complete run (or --input-dir <run>), writes donor/animal contrasts to <run>/analysis/biological/, and the HTML to results/spatial_stats/reports/ as <output stem>_<run>.html. p_values: true (the default) shows p-values, stars and intervals; false keeps the report descriptive.
  • study workbook (<study>_study.xlsx, study_workbook: in both YAMLs): sheets samples, features, cells and pairs. In pairs, map chooses the LISA maps that processing computes and show the maps the report always shows. Each run keeps a copy of what it used.
  • tests: corrmsi.bat tests writes to .test-output/ (not tracked).

Environment: the spatial_analysis mamba environment and R 4.6.2 (override with CORRMSI_PYTHON / CORRMSI_RSCRIPT). Permutation p-values are validated for esda 2.8.1 only. Developers can still run python -m corrmsi.run_desi_from_config config.yaml from the repo root.

Notes

  • Raw x/y are native lattice coordinates, not micrometres; declare the pitch per acquisition.
  • p-values are shown or hidden with p_values in the stats-report YAML, not by a tissue mask. An optional independent mask (analysis.mask_path) still restricts which pixels are analysed.
  • In bivariate local Moran maps, significance depends only on the second map's neighbourhood; the first map sets the quadrant colour.
  • See settings, spatial-structure method, notebook notes and change history. docs/ALL_CHANGES, HANDOVER_FOR_COLLABORATOR and VALIDATION_AND_ROLLBACK describe the 24 Nov 2026 revision as handed over, i.e. before the package restructure.

About

Tools for analyzing multimodal DESI-MRM mass spectrometry imaging data integrated with other spatial modalities including histochemistry, spatial transcriptomics, and spatial proteomics (from `.zarr` SpatialData objects).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages