Skip to content

Commit 1c91147

Browse files
shntnuclaude
andcommitted
docs(starrynight): consolidate fiji setup and update markdown linting
- Move Fiji installation instructions from getting-started.md to example-pipeline-cli.md where they are contextually needed for stitching - Update markdownlint config to disable MD040 and MD046 rules - Fix stitchcrop command parameters and add warning for failing SBS step 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 90e8a68 commit 1c91147

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

.markdownlint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ MD038: true
105105
MD039: true
106106

107107
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
108-
MD040: true
108+
# MD040: true
109109

110110
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md042.md
111111
MD042: true
@@ -114,8 +114,8 @@ MD042: true
114114
MD045: true
115115

116116
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md046.md
117-
MD046:
118-
style: "fenced"
117+
# MD046:
118+
# style: "fenced"
119119

120120
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md047.md
121121
MD047: true

docs/user/example-pipeline-cli.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ export CP_PLUGINS="$(pwd)/scratch/CellProfiler-plugins/active_plugins/"
8686
# Add new environment variable needed for the complete workflow
8787
export INPUT_WKDIR="$(pwd)/scratch/fix_s1_input/Source1/workspace"
8888

89-
# Add path to your fiji executable. This varies from system to system
90-
export FIJI_PATH=""
89+
# FIJI_PATH will be set up later when needed for stitching
9190
```
9291

9392
You should already have:
@@ -158,7 +157,24 @@ starrynight segcheck cppipe \
158157
starrynight cp \
159158
-p ${WKDIR}/cellprofiler/cppipe/cp/segcheck/segcheck_painting.cppipe \
160159
-l ${WKDIR}/cellprofiler/loaddata/cp/segcheck \
161-
-o ${WKDIR}/segcheck/cp/
160+
-o ${WKDIR}/segcheck/cp/ \
161+
--uow batch_id,plate_id,well_id
162+
```
163+
164+
## Download and Setup Fiji (Required for Stitching)
165+
166+
Before running the stitch and crop steps, you need to download and set up Fiji/ImageJ:
167+
168+
!!! info "Fiji Installation"
169+
Fiji (Fiji Is Just ImageJ) is required for the stitching and cropping steps in both the CP and SBS tracks. CellProfiler cannot handle the large image sizes from stitched 6-well plates, so Fiji is used for this memory-intensive processing.
170+
171+
Download Fiji from the [official download page](https://imagej.net/software/fiji/downloads) and extract it. Then set the path to the executable:
172+
173+
```sh
174+
# Set the path to your Fiji executable
175+
export FIJI_PATH="/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx"
176+
# Linux: export FIJI_PATH="/path/to/Fiji.app/ImageJ-linux64"
177+
# Windows: export FIJI_PATH="/path/to/Fiji.app/ImageJ-win64.exe"
162178
```
163179

164180
## CP Stitch and Crop
@@ -173,24 +189,20 @@ Stitch multi-site Cell Painting images together and crop them for analysis. This
173189
mkdir -p ${WKDIR}/fiji/pipeline/cp/stitchcrop
174190
mkdir -p ${WKDIR}/fiji_temp
175191

176-
# Generate Fiji pipeline files
177-
# FIXME: TBD whether the uow below is needed
178-
# The default appears to be batch_id,plate_id,well_id,site_id, which is likely the wrong grouping for this step
192+
# Generate fiji pipeline
179193
starrynight stitchcrop pipeline \
180194
-i ${WKDIR}/index/index.parquet \
181195
-o ${WKDIR}/fiji/pipeline/cp/stitchcrop \
182-
-w ${WKDIR} \
196+
-w ${WKDIR}/stitchcrop \
183197
--images ${WKDIR}/illum/cp/illum_apply \
184198
--exp_config ${WKDIR}/experiment.json \
185199
--use_legacy \
186200
--uow batch_id,plate_id,well_id
187201

188-
# Execute the stitching and cropping with Fiji
189-
# This will create stitched/, cropped/, and downsampled/ subdirectories
190-
# FIXME: This is currently failing
202+
# Execute fiji
191203
starrynight stitchcrop fiji \
192-
-p ${WKDIR}/fiji/pipeline/cp/stitchcrop \
193-
-j 20 # Number of parallel jobs
204+
-p ${WKDIR}/fiji \
205+
-f ${FIJI_PATH}
194206
```
195207

196208
## SBS Illumination Calculation
@@ -298,15 +310,22 @@ starrynight cp \
298310

299311
## SBS Stitch and Crop
300312

313+
!!! warning "Failing"
314+
This step is currently failing, so skip it for now
315+
301316
Stitch multi-site SBS images together and crop them for analysis. Similar to the CP track, this step combines multiple fields of view from each well into stitched images suitable for barcode calling and analysis:
302317

303318
```sh
319+
# Create necessary directories
320+
mkdir -p ${WKDIR}/fiji/pipeline/sbs/stitchcrop
321+
mkdir -p ${WKDIR}/fiji_temp
322+
304323
# Generate fiji pipeline
305324
starrynight stitchcrop pipeline \
306325
-i ${WKDIR}/index/index.parquet \
307326
-o ${WKDIR}/fiji \
308327
-w ${WKDIR}/stitchcrop \
309-
--images ${WKDIR}/illum/cp/illum_apply \
328+
--images ${WKDIR}/illum/sbs/illum_apply \
310329
--exp_config ${WKDIR}/experiment/experiment.json \
311330
--use_legacy \
312331
--uow batch_id,plate_id,well_id

docs/user/getting-started.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ cd ..
113113

114114
```
115115

116-
## Download and Setup Fiji
117-
118-
Please refer to the Fiji download page [here](https://imagej.net/software/fiji/downloads)
119-
120116
## Setup environment variables
121117

122118
```sh
@@ -125,9 +121,6 @@ export DATADIR="$(pwd)/scratch/fix_s1_input"
125121
export WKDIR="$(pwd)/scratch/fix_s1_output/workspace"
126122
export CP_PLUGINS="$(pwd)/scratch/CellProfiler-plugins/active_plugins/"
127123

128-
# Add path to fiji executable. This varies from system to system
129-
export FIJI_PATH=""
130-
131124
# Additional environment variable needed for the complete workflow
132125
export INPUT_WKDIR="$(pwd)/scratch/fix_s1_input/Source1/workspace"
133126
```
@@ -139,7 +132,6 @@ export INPUT_WKDIR="$(pwd)/scratch/fix_s1_input/Source1/workspace"
139132
- `WKDIR`: Points to your working directory where outputs will be generated
140133
- `INPUT_WKDIR`: Points to the input workspace folder, within which barcode files are located
141134
- `CP_PLUGINS`: Points to CellProfiler plugins needed for advanced processing
142-
- `FIJI_PATH`: Points to Fiji executable needed for advanced processing
143135

144136
## Create Experiment Configuration
145137

0 commit comments

Comments
 (0)