🧪 mcmicroprep 🚀
A command-line tool for preparing multiplexed imaging datasets (🦠 Olympus, 🩸 RareCyte) for the MCMICRO Nextflow pipeline.
🛠️ Installation
-
Prerequisites
- Conda or Miniconda installed 🐍
- Python 3.10+ environment 🌟
- SLURM & Nextflow (
labsyspharm/mcmicro) on your$PATH
-
Create Conda env
conda create -n mcmicroprep python=3.12 conda activate mcmicroprep
-
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
Segmentation Tool
Segmentation defaults to mccellpose with no tool parameters. For a new dataset,
use any of the commands above without a segmentation flag. For example, to
prepare registered images on Nucleus with McCellpose:
preparemcmicro \
--image-root /path/to/dataset \
--input-stage registered \
--profile MGB
To explicitly select McCellpose, including when updating an existing params.yml:
preparemcmicro \
--image-root /path/to/dataset \
--input-stage registered \
--profile MGB \
--segmentation mccellpose
To use UnMicst with the template parameters for a new dataset:
preparemcmicro \
--image-root /path/to/dataset \
--input-stage registered \
--segmentation unmicst
For raw data, replace --input-stage registered with --microscope olympus
or --microscope rarecyte. Use --profile MGB for Nucleus; omit --profile
for the default O2LSP profile.
New datasets use segmentation: mccellpose under workflow in params.yml,
with no segmentation-channel, UnMicst options, or McCellpose parameters. The flag also works with raw
inputs. An explicit flag updates an existing params.yml; omitting it keeps
the existing segmentation settings.
These commands prepare the dataset and generate the launch script. After editing
markers.csv, submit the pipeline from the dataset directory on your cluster:
cd /path/to/dataset
sbatch mcmicro_template.sh
🛠️ Next Steps for Users
- ✏️ Edit
markers.csvin the dataset root to include your experiment-specific cycle-to-marker mappings. - 📤 Upload the entire processed dataset folder to the O2 cluster if you ran this locally.
- 🚀 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.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcmicroprep-0.2.10.tar.gz | 13.6 kB | Without provenance | Details for mcmicroprep-0.2.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcmicroprep-0.2.10-py3-none-any.whl | Python 3 | none | any | Details for mcmicroprep-0.2.10-py3-none-any.whl |
Total release size: 33.5 kB
Release files / mcmicroprep-0.2.10.tar.gz
| Download URL | mcmicroprep-0.2.10.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73aa89146ab5c17e06295bdca0069f5532a92b874403b50b400e7329126fc638
|
|
BLAKE2b-256 checksum How to use checksums |
2157a0b2568ebce3ed6372a3acede5724f2ca9236c9a066fc9fcb322f9546db5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / mcmicroprep-0.2.10-py3-none-any.whl
| Download URL | mcmicroprep-0.2.10-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20d0dfa0a9df4cdd3aeb9c0df160501358790114e363108c4c7184923a1a7c0b
|
|
BLAKE2b-256 checksum How to use checksums |
345a617658d857410c940f7bd20c6b62a710510c353fc406e44b728522293dae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Security for mcmicroprep 0.2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.