compImage | R Documentation |
Corrects the intensity spillover between neighbouring channels of multi-channel images using a non-negative least squares approach.
compImage(object, sm, overwrite = FALSE, BPPARAM = SerialParam())
object |
a |
sm |
numeric matrix containing the spillover estimated between channels.
The column names must be of the form |
overwrite |
(for images stored on disk) should the original image array
be overwritten by the compensated image array? By default ( |
BPPARAM |
parameters for parallelised processing. |
returns the compensated pixel intensities in form of a
CytoImageList
object.
The channelNames
of object
need to match the column names
of sm
. To adapt the spillover matrix accordingly, please use the
adaptSpillmat
function.
Image compensation also works for images stored on disk. By default,
the compensated images are stored as a second entry called "XYZ_comp"
in the .h5 file. Here "XYZ" specifies the name of the original entry.
By storing the compensated next to the original images on disk, space
usage increases. To avoid storing duplicated data, one can specify
overwrite = TRUE
, therefore deleting the original images
and only storing the compensated images. However, the original images
cannot be accessed anymore after compensation.
Nils Eling (nils.eling@dqbm.uzh.ch)
nnls
, for the underlying algorithm
compCytof
, for how to compensate single-cell data
data("pancreasImages")
# Generate example spillover matrix
metals <- c("Dy161Di", "Dy162Di", "Dy163Di", "Dy164Di", "Ho165Di")
sm <- matrix(c(1, 0.033, 0.01, 0.007, 0,
0.016, 1, 0.051, 0.01, 0,
0.004, 0.013, 1, 0.023, 0,
0.005, 0.008, 0.029, 1, 0.006,
0, 0, 0, 0.001, 1), byrow = TRUE,
ncol = 5, nrow = 5,
dimnames = list(metals, metals))
# Rename channels - just used as example
channelNames(pancreasImages) <- metals
# Perform channel spillover
comp_images <- compImage(pancreasImages, sm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.