What it does¶
A microscope does not light its field of view evenly. BaSiCPy calculates, for every channel of every cycle, a flat-field image of that unevenness, so stitching can correct each tile before it is placed in the mosaic.
Parameters¶
BaSiCPy has no parameters of its own in this pipeline. Two things decide whether it runs:
use_preprocessing: BaSiCPy runs only when the pipeline starts from raw cycles.The
dfpandffpcolumns of the samplesheet: profiles from an earlier run are used as they are, and BaSiCPy does not run for those cycles. Give them for every cycle of a sample or for none.
How it works¶
Without correction, each tile is brighter in some parts than others, so a stitched mosaic shows seams, and a cell’s measured intensity depends on where in the tile it sat.
BaSiC models a measured tile as the true image times a flat-field (the uneven illumination) plus a dark-field (camera offset and thermal noise). It estimates both from the tiles themselves, without extra reference images. Stacked together, the tiles split into a low-rank part, the shading they all share, and a sparse residual, where the tissue and debris that differ between tiles end up. It improves image quality from as few as five tiles Peng et al., 2017.

(a) A whole-slide mosaic with seams from uneven illumination. (c) The BaSiC workflow: tiles are decomposed into shared shading and a residual. (d) The corrected mosaic. Panels (b) and (e) show time-lapse correction, which this pipeline does not use. Reproduced from Peng et al., 2017, CC BY 4.0.
In this pipeline, BaSiCPy fits only the flat-field; the dark-field file it writes holds no fitted dark-field.
Inputs and outputs. In: the raw tiles of one cycle, as one OME-TIFF (or another
Bio-Formats file such as .czi, read tile by tile). Out: two OME-TIFFs per cycle,
{sample}_cycle{n}-ffp.ome.tif (flat-field) and -dfp.ome.tif (dark-field), one plane per
channel, under preprocessing/illumination/. Ashlar reads them while stitching. See
Preprocessing outputs.
Similar tools¶
CIDRE also estimates shading from the images themselves (Smith et al. 2015).
Reference images: a flat-field acquired on a uniform fluorescent slide, or the scanner’s own shading correction. These need extra acquisitions or vendor software.
BaSiCPy came with the preprocessing half from nf-core/mcmicro. It needs no reference images, which suits data acquired elsewhere.
Read more¶
The BaSiC paper: Peng et al., 2017.
The container, from MCMICRO: labsyspharm
/basicpy -docker -mcmicro.
Version used:
| Module | Tool | Version | Container | Paper |
|---|---|---|---|---|
| BASICPY | basicpy | 1.2.0-patch5 | docker.io/labsyspharm/basicpy-docker-mcmicro:1.2.0-patch5 | Peng et al. (2017) |
- Peng, T., Thorn, K., Schroeder, T., Wang, L., Theis, F. J., Marr, C., & Navab, N. (2017). A BaSiC tool for background and shading correction of optical microscopy images. Nature Communications, 8(1). 10.1038/ncomms14836
- Smith, K., Li, Y., Piccinini, F., Csucs, G., Balazs, C., Bevilacqua, A., & Horvath, P. (2015). CIDRE: an illumination-correction method for optical microscopy. Nature Methods, 12(5), 404–406. 10.1038/nmeth.3323