|
| 1 | +# config.py configuration examples |
| 2 | + |
| 3 | +We have a handful of standard workflows we follow in a stereotyped fashion when running the Cell Painting Assay. |
| 4 | +We have listed below the standard way that we configure `config.py` for each workflow. |
| 5 | +You can read more information about the pipelines in the context of the Cell Painting Assay [here](https://www.biorxiv.org/content/10.1101/2022.07.13.499171v1.full). |
| 6 | + |
| 7 | +- **Z-projection** creates a new image with each pixel containing the maximum value from any of the z-planes, effectively condensing the contents of multiple focal planes into one. |
| 8 | +Generally, we perform projection on all images with multiple z-planes and downstream processing and analysis is performed on the projected images. |
| 9 | + |
| 10 | +- **Illumination Correction** is batched by plate and generates a function that corrects for light path irregularities as described [here](https://onlinelibrary.wiley.com/doi/abs/10.1111/jmi.12178). |
| 11 | +Note that this pipeline depends upon having a large number of images. |
| 12 | +A standard pipeline can be found [here](https://github.com/broadinstitute/imaging-platform-pipelines/blob/master/JUMP_production/JUMP_illum_LoadData_v1.cppipe). |
| 13 | + |
| 14 | +- **Quality Control** provides metrics on the quality of the input images. |
| 15 | +It is not a necessary step but can provide helpful information, particularly for improving wetlab workflows and for comparing across datasets. |
| 16 | +A standard pipeline can be found [here](https://github.com/broadinstitute/imaging-platform-pipelines/blob/master/JUMP_production/JUMP_QC_Drag-and-Drop_v1.cppipe). |
| 17 | + |
| 18 | +- **Assay Dev/Segmentation** is a quick pipeline that outputs segmentation outlines overlaid on a multichannel image rescaled for visual inspection. |
| 19 | +We often stitch the output into a pseudo-plate view as described [here](https://currentprotocols.onlinelibrary.wiley.com/doi/10.1002/cpz1.89) to confirm we have chosen segmentation parameters that work across our dataset. |
| 20 | +A standard pipeline can be found [here](https://github.com/broadinstitute/imaging-platform-pipelines/blob/master/JUMP_production/JUMP_segment_LoadData_v1.cppipe). |
| 21 | + |
| 22 | +- **Analysis** is where illumination correction is applied, actual segmentation occurs, and all of the measurements used for generating image-based profiles are taken. |
| 23 | +Note that large images may require more memory than our default parameters listed below. |
| 24 | +If you don't have enough memory, reduce the number of copies of CellProfiler runnning at one time by decreasing DOCKER_CORES. |
| 25 | +A standard pipeline can be found [here](https://github.com/broadinstitute/imaging-platform-pipelines/blob/master/JUMP_production/JUMP_analysis_v3.cppipe). |
| 26 | + |
| 27 | +Our internal configurations for each pipeline are as follows: |
| 28 | + |
| 29 | +| | Z-Projection | Illumination Correction | Quality Control | Assay Dev | Analysis | Notes | |
| 30 | +|---|---|---|---|---|---|---| |
| 31 | +| APP_NAME | 'PROJECT_NAME_Zproj' |'PROJECT_NAME_Illum' | 'PROJECT_NAME_QC' |' PROJECT_NAME_AssayDev' | 'PROJECT_NAME_Analysis' | If the PROJECT_NAME is excessively long you can enter a truncated version of it here but you will need to be careful to use the correct version in subsequent steps in the protocol. (e.g. 2021_06_08_WCPC_Zproj) | |
| 32 | +| DOCKERHUB_TAG | 'cellprofiler/distributed-cellprofiler:2.0.0_4.2.4' | 'cellprofiler/distributed-cellprofiler:2.0.0_4.2.4' | 'cellprofiler/distributed-cellprofiler:2.0.0_4.2.4' | 'cellprofiler/distributed-cellprofiler:2.0.0_4.2.4' | 'cellprofiler/distributed-cellprofiler:2.0.0_4.2.4' | Ensure the CP tag number matches the version of CellProfiler for your pipeline (can easily see by opening the pipeline in a text editor and looking for the 3rd line “DateRevision: 413”). | |
| 33 | +| AWS_REGION | 'us-east-1' | 'us-east-1' | 'us-east-1' | 'us-east-1' | 'us-east-1' | | |
| 34 | +| AWS_PROFILE | 'default' | 'default' | 'default' | 'default' | 'default' | | |
| 35 | +| SSH_KEY_NAME | 'YOURPEM.pem' | 'YOURPEM.pem' | 'YOURPEM.pem' | 'YOURPEM.pem' | 'YOURPEM.pem' | | |
| 36 | +| AWS_BUCKET | 'BUCKET' | 'BUCKET' | 'BUCKET' | 'BUCKET' | 'BUCKET' | | |
| 37 | +| ECS_CLUSTER | 'default' | 'default' | 'default' | 'default' | 'default' | Most of the time we all just use the default cluster but if there are multiple jobs being run at once you can create your own cluster by changing default to YOURNAME so that the correct dockers go on the correct machines. | |
| 38 | +| CLUSTER_MACHINES | 100-200 | number of plates / CPUs and rounded up | 25-100 | 25-100 | 100-200 | AWS has limits on the number of machines you can request at a time. 200 is generally the largest we request for a single job to ensure there is some capacity for other users in the team. | |
| 39 | +| TASKS_PER_MACHINE | 1 | 1 | 1 | 1 | 1 | | |
| 40 | +| MACHINE_TYPE | ['c5.xlarge'] | ['c5.xlarge'] | ['c5.xlarge'] | ['c5.xlarge'] | ['c5.xlarge'] | Historically we have used m4.xlarge and then m5.xlarge however very recently we have been having a hard time getting m class machines so we have switched to c class. Note that they have different memory sizes so you need to make sure MEMORY is set correctly if changing between classes. | |
| 41 | +| MACHINE_PRICE | .10 | .10 | .10 | .10 | .10 | Will be different for different size/classes of machines. | |
| 42 | +| EBS_VOL_SIZE | 22 | 22 | 22 | 22 | 22 | You might need to make this larger if you set DOWNLOAD_FILES = True | |
| 43 | +| DOWNLOAD_FILES | 'False' | 'False' | 'False' | 'False' | 'False' | | |
| 44 | +| DOCKER_CORES | 4 | 4 | 4 | 4 | 4 | If using c class machines and large images (2k + pixels) then you might need to reduce this number. | |
| 45 | +| CPU_SHARES | DOCKER_CORES * 1024 | DOCKER_CORES * 1024 | DOCKER_CORES * 1024 | DOCKER_CORES * 1024 | DOCKER_CORES * 1024 | We never change this. | |
| 46 | +| MEMORY | 7500 | 7500 | 7500 | 7500 | 7500 | This must match your machine type. m class use 15000, c class use 7500. | |
| 47 | +| SECONDS_TO_START | 60 | 3*60 | 60 | 3*60 | 3*60 | | |
| 48 | +| SQS_QUEUE_NAME | APP_NAME + 'Queue' | APP_NAME + 'Queue' | APP_NAME + 'Queue' | APP_NAME + 'Queue' | APP_NAME + 'Queue' | We never change this. | |
| 49 | +| SQS_MESSAGE_VISIBILITY | 3*60 | 720*60 | 15*60 | 10*60 | 120*60 | About how long you expect a job to take * 1.5 in seconds | |
| 50 | +| SQS_DEAD_LETTER_QUEUE | 'YOUR_DEADMESSAGES_ARN' | 'YOUR_DEADMESSAGES_ARN' | 'YOUR_DEADMESSAGES_ARN' | 'YOUR_DEADMESSAGES_ARN' |'YOUR_DEADMESSAGES_ARN' | | |
| 51 | +| LOG_GROUP_NAME | APP_NAME | APP_NAME | APP_NAME | APP_NAME |APP_NAME | We never change this. | |
| 52 | +| CHECK_IF_DONE_BOOL | 'True' | 'True' | 'True' | 'True' | 'True' | Can be turned off if wanting to overwrite old data. | |
| 53 | +| EXPECTED_NUMBER_FILES | 1 (an image) | number channels + 1 (an .npy for each channel and isdone) | 3 (Experiment.csv, Image.csv, and isdone) | 1 (an image) | 5 (Experiment, Image, Cells, Nuclei, and Cytoplasm .csvs) | Better to underestimate than overestimate. | |
| 54 | +| MIN_FILE_SIZE_BYTES | 1 | 1 | 1 | 1 | 1 | Count files of any size. | |
| 55 | +| NECESSARY_STRING | '' | '' | '' | '' | '' | Not necessary for standard workflows. | |
| 56 | +| USE_PLUGINS | 'False' | 'False' | 'False' | 'False' | 'False' | Not necessary for standard workflows. | |
| 57 | +| UPDATE_PLUGINS | 'False' | 'False' | 'False' | 'False' | 'False' | Not necessary for standard workflows. | |
| 58 | +| PLUGINS_COMMIT | '' | '' | '' | '' | '' | Not necessary for standard workflows. | |
| 59 | +| INSTALL_REQUIREMENTS | 'False' | 'False' | 'False' | 'False' | 'False' | Not necessary for standard workflows. | |
| 60 | +| REQUIREMENTS_FILE | '' | '' | '' | '' | '' | Not necessary for standard workflows. | |
0 commit comments