Skip to main content

🧪 mcmicroprep 🚀

A command-line tool for preparing multiplexed imaging datasets (🦠 Olympus, 🩸 RareCyte) for the MCMICRO Nextflow pipeline.

🛠️ Installation

  1. Prerequisites

    • Conda or Miniconda installed 🐍
    • Python 3.10+ environment 🌟
    • SLURM & Nextflow (labsyspharm/mcmicro) on your $PATH
  2. Create Conda env

    conda create -n mcmicroprep python=3.12
    conda activate mcmicroprep
    
  3. Install package

    pip install mcmicroprep
    

📁 Expected Dataset Structure

Your dataset root should contain one subdirectory per slide. Structures vary by vendor:

🦠 Olympus

Each slide directory must contain at least one *_frames/ folder (at any depth) —-- this is the minimum required structure. Additional files or folders may be present and do not need to be removed.

Important: For stitching/registration, each image (per cycle) should have exactly one *_frames/ folder. If you have multiple ROIs, separate them into separate image folders before running the pipeline; otherwise stitching/registration will produce non-legible results.

.DATASET FOLDER
├── slide1/
│   ├── cycle1_frames/
│   ├── cycle2_frames/
├── slide2/
└── slideN/

After running for Olympus, the dataset is reorganized into:

DATASET/
├── raw/
│   ├── slide1/             # non-Overview image*_frames/
│   ├── slide2/
│   └── slideN/
├── misc_files/
│   ├── slide1/             # everything else (+ Overview *_frames/)
│   ├── slide2/
│   └── slideN/
├── mcmicro_template.sh    # Nextflow template
├── base.config
├── markers.csv
└── params.yml            

🩸 RareCyte

Slide dirs may contain *.rcpnl at any depth: —-- this is the minimum required structure. Additional files or folders may be present and do not need to be removed.

/path/to/dataset/
├── slide1/
│   ├── img001.rcpnl
│   ├── subA/img002.rcpnl
│   └── other files
└── slideN/

After running for RareCyte, the dataset is reorganized into:

DATASET/
├── raw/
│   ├── slide1/             # all .rcpnl files (flattened)
│   ├── slide2/
│   └── slideN/
├── misc_files/
│   ├── slide1/             # everything else
│   ├── slide2/
│   └── slideN/
├── mcmicro_template.sh
├── base.config
├── markers.csv
└── params.yml

🚀 Usage

Note: Configured for the HMS O2 cluster (SLURM). Generalize by editing SLURM directives in templates/common/.

Optional: use --input-stage registered for existing registration/*.ome.tif[f] outputs, --profile <profile> to override O2LSP, or --profile MGB for Nucleus. --microscope is required for raw inputs and optional for registered inputs.

🦠 Olympus

preparemcmicro \
  --microscope olympus \
  --image-root /path/to/dataset

🩸 RareCyte

preparemcmicro \
  --microscope rarecyte \
  --image-root /path/to/dataset

Registered Images

preparemcmicro \
  --image-root /path/to/dataset \
  --input-stage registered

🛠️ Next Steps for Users

  1. ✏️ Edit markers.csv in the dataset root to include your experiment-specific cycle-to-marker mappings.
  2. 📤 Upload the entire processed dataset folder to the O2 cluster if you ran this locally.
  3. 🚀 Start the job on O2:
    cd /n/scratch/users/${USER:0:1}/$USER/<DATASET FOLDER>
    sbatch mcmicro_template.sh
    

Happy processing! 🔬

Metadata

Release files for mcmicroprep 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcmicroprep 0.2.6
File Size Uploaded
mcmicroprep-0.2.6.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcmicroprep 0.2.6
File Interpreter ABI Platform
mcmicroprep-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / mcmicroprep-0.2.6.tar.gz

Download URL mcmicroprep-0.2.6.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
04457d1f0e5f7da6183126b8fbb4d3c68789c19a7510f418ac05bc50b4005f92
BLAKE2b-256 checksum
How to use checksums
291c3de121e7061290de7acd2cb99391d9510896b7e25080539036d55087da0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Release files / mcmicroprep-0.2.6-py3-none-any.whl

Download URL mcmicroprep-0.2.6-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eef42313a864c9d43ac460fdcfff1f4411542f1ba43aa7a162e189e6abac917
BLAKE2b-256 checksum
How to use checksums
f3378bc85c5a972bb79a9d96dfecfac06f9fb60db55fdb11fe273f69ac220a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Release history Release notifications | RSS feed

0.2.8

2 release files

0.2.7

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page