Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BUG: Fix batch mode with CellProfiler "Group"
- Set group to Well + Plate.
- Cleaned up pipeline.
  • Loading branch information
pan14001 committed Mar 22, 2017
1 parent b18ee8b commit 4aeceea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions Makefile
Expand Up @@ -8,7 +8,7 @@

# Overwritable paths to executables
CELLPROFILER := cellprofiler
PARALLEL := parallel
PARALLEL := parallel --eta
PYTHON := python
RSCRIPT := Rscript

Expand All @@ -31,14 +31,27 @@ TARGETS_cellprofiler_batch := results/cellprofiler/Batch_data.h5
SOURCES_cellprofiler_commands := $(TARGETS_cellprofiler_batch)
TARGETS_cellprofiler_commands := results/cellprofiler/batch_commands.sh
SOURCES_cellprofiler_headless := $(TARGETS_cellprofiler_commands)
TARGETS_cellprofiler_db := results/cellprofiler/all-plates.db
TARGETS_cellprofiler_prop := results/cellprofiler/all-plates.properties
TARGETS_cellprofiler_db := results/cellprofiler/rnai-screen-tf.db
TARGETS_cellprofiler_prop := results/cellprofiler/rna-screen-tf.properties
TARGETS_cellprofiler := $(TARGETS_cellprofiler_db) $(TARGETS_cellprofiler_prop)
define CELLPROFILER_OPTS
--pipeline=$(SOURCES_cellprofiler_pipe) \
define CELLPROFILER_OPTS_COMMON
--file-list=$(SOURCES_cellprofiler_filelist) \
--output-directory=$(dir $(TARGETS_cellprofiler_db))
endef
define CELLPROFILER_OPTS_GUI
$(CELLPROFILER_OPTS_COMMON) \
--pipeline=$(SOURCES_cellprofiler_pipe)
endef
define CELLPROFILER_OPTS_BATCH
$(CELLPROFILER_OPTS_COMMON) \
--pipeline=$(SOURCES_cellprofiler_pipe) \
--run-headless
endef
define CELLPROFILER_OPTS_HEADLESS
$(CELLPROFILER_OPTS_COMMON) \
--pipeline=$(SOURCES_cellprofiler_commands) \
--run-headless
endef
SOURCES_signif_wells := $(TARGETS_cellprofiler_db)
TARGETS_signif_wells := results/tables/rnai-p_values.csv
SOURCES_plot_overlap := $(TARGETS_signif_wells)
Expand Down Expand Up @@ -82,14 +95,14 @@ $(call singleton,$(TARGETS_cellprofiler)) : $(SOURCES_cellprofiler_headless)
$(PARALLEL) :::: $<

$(TARGETS_cellprofiler_commands) : $(SOURCES_cellprofiler_commands)
$(CELLPROFILER) --get-batch-commands=$< | sed 's#^CellProfiler#$(CELLPROFILER)#' | sort -nk 8.14 > $@
$(CELLPROFILER) $(CELLPROFILER_OPTS_HEADLESS) --get-batch-commands=$< | sed 's#^CellProfiler#$(CELLPROFILER)#' | sort -nk 8 > $@

$(TARGETS_cellprofiler_batch) : $(SOURCES_cellprofiler)
$(CELLPROFILER) $(CELLPROFILER_OPTS) --run-headless
$(CELLPROFILER) $(CELLPROFILER_OPTS_BATCH)

.PHONY : gui-cellprofiler
gui-cellprofiler : $(SOURCES_cellprofiler) ## Interactively run CellProfiler.
$(CELLPROFILER) $(CELLPROFILER_OPTS)
$(CELLPROFILER) $(CELLPROFILER_OPTS_GUI)

$(TARGETS_img_filelist) : $(abspath $(SOURCES_img_filelist))
find $< -type f | sort > $@
Expand Down
Binary file modified src/image-processing-pipeline.cpproj
Binary file not shown.

0 comments on commit 4aeceea

Please sign in to comment.