Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

0. Image QC

scripts/0.image-qc.py

Generates QC plots and reports from the CellProfiler Image.csv of each site: cell count and confluency, stack alignment between phenotyping and SBS images, segmentation thresholds, image focus, and image saturation. Also infers which sites are empty (completely black) so later steps do not count them as errors.

Does not respect overwrite_files; outputs are always regenerated.

Inputs

InputDescription
{file_location}/{batch}/{plate}-{well}-{site}/Image.csvCellProfiler image-level measurements for every site in data_sets
{file_location}/{batch}/{plate}-{well}-{site}/{compartments[0]}.csvOnly read to decide if a site that failed to load is empty (header-only)

Config used: file_location, data_sets, compartments (experiment); qc.allowed_skips, qc.infer_empty_sites, qc.stack_alignment_chans (defaults). See Configuration.

Outputs

Per {data_set_name}:

OutputDescription
single_cell/{plate}_alignments_{data_set_name}.csvAlign_* columns of every site, used to add alignment info to by-gene normalized output
summary_figures/plate_layout_cells_count_{data_set_name}.pngCell count per site, laid out as the plate
summary_figures/plate_layout_percent_confluent_{data_set_name}.pngPercent confluent regions per site
summary_figures/plate_layout_image_stack_alignment_{data_set_name}.pngCorrelation between phenotyping and SBS images
summary_figures/plate_layout_compartment_threshold_{compartment}_{data_set_name}.pngFinal segmentation threshold per site for each compartment
summary_figures/Image_Focus_{data_set_name}.pngPowerLogLogSlope (focus proxy) per site, channel, and well
summary_figures/Image_Saturation_phenotyping_{data_set_name}.pngPercent saturated vs. intensity spread per channel (only if any site is saturated)
summary_figures/Image_Saturation_SBS_{data_set_name}.pngSame, per SBS cycle (only if any site is saturated)
summary_data/Sites_With_Confluent_Regions_{data_set_name}.csvSites with Math_PercentConfluent > 0
summary_data/Sites_With_Saturation_{data_set_name}.csvSites failing saturation thresholds (phenotyping >1% saturated, SBS >0.2% saturated)
summary_data/Inferred_Empty_Sites_{data_set_name}.csvSites whose Image.csv could not be used and whose parent compartment file is header-only. Read by steps 1 and 2 to skip these sites. A stale file is removed if no empty sites are found.

Failure to make an individual plot or table is logged and does not stop the step.