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/
โ”‚   โ”œโ”€โ”€ image1_frames/
โ”‚   โ”œโ”€โ”€ image2_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/.

๐Ÿฆ  Olympus

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

๐Ÿฉธ RareCyte

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

๐Ÿ› ๏ธ 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! ๐Ÿ”ฌ

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcmicroprep-0.2.3.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcmicroprep-0.2.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file mcmicroprep-0.2.3.tar.gz.

File metadata

  • Download URL: mcmicroprep-0.2.3.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for mcmicroprep-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e0a7761f7c75142829fccce02334cc4fdd26c32955f686386f2d8b8dc6a4e04b
MD5 00c0d7eba6f7bd545670e16b1cdea8b0
BLAKE2b-256 20a14cbae07c0e9b894eaff1cf1b9ffc54d683b433ade26a48dc1d33d6a1d980

See more details on using hashes here.

File details

Details for the file mcmicroprep-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcmicroprep-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef515358023663859f74713e24b3f3c7dd833adfbd6424f518b29cfeffdf4b93
MD5 46590398b816e7a890d219d153e210ea
BLAKE2b-256 b7202816dfcf293892d064a4f0f58dd4ba8c235c49df65bfce1cd0eaef9bc952

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page