medMadNormSum: Normalize each movie frame to its median and MAD and sum the...

Description Usage Arguments Value See Also Examples

View source: R/medMadNormSum.R

Description

This function is meant to normalize frames of a movie, as there might be slight variations in light intensity etc over the course of a live-cell experiment lasting days.

Usage

1
2
3
4
5
6
medMadNormSum(
  imageList,
  quantThreshFrames = 1:4,
  quantThreshQuant = 0.99,
  outDir = "."
)

Arguments

imageList

A named list of images, as with the example file, or a vector of TIFF file names, e.g. generated with list.files().

quantThreshFrames

The frames in the movie that will be used to set the quantile-based threshold for summation. Default is frame 1:4, as four pictures were taken per hour in the paper.

quantThreshQuant

The quantile above which for the control frames defined above, that the sum of pixel intensity will be calculated for all frames.

outDir

Directory where the normalized tiff movies will be saved. Default is to save a new tiff file in the current directory, with the same name as the old file, but with the extension "normalized".

Value

A list of two, both containing lists of length(imageList):

pixSums

Pixel intensity sums for each frame in above the quantile threshold.

highQuants

quantiles that should be used as input for the hiQuantAdjust function.

In addition, side effect in form of normalized movies, one per imageList item. Worth noting is that the intensities in these movies are flat, i.e., the top and bottom intensity is identical in all frames. To make these movies useful, use the hiQuantAdjust function.

See Also

hiQuantAdjust

Examples

1
2
3
4
5
#Load example data.
data(testMovie)

#Run the function with the output in the current directory
medMadNormSumRes <- medMadNormSum(testMovie)

jtheorell/pixSum documentation built on April 2, 2020, 5:03 a.m.