# zprime: Compute the Z'-factor quality score In imageHTS: Analysis of high-throughput microscopy-based screens

## Description

Compute the Z'-factor quality score.

## Usage

 `1` ``` zprime(a, b, method=c('mahalanobis', 'robust', 'fixsd', 'original')) ```

## Arguments

 `a, b` Matrices of control features. `method` a character vector, indicating which method should be used to compute the Z'-factor. Default is `mahalanobis`. See Details.

## Details

The Z'-factor is a popular metric measuring the separation of control features in high-throughput screens. The original paper describing the Z'-factor is Zhang, 1999, J Biomol Screen.

Several univariate Z'-factor scores exist. The `original` Z'-factor from Zhang, 1999 is computed by Z' = 1 - 3*(sd(a)+sd(b))/abs(mean(a)-mean(b)). A more rigorous definition of the score, implemented by the method `fixsd` is given by Z' = 1 - 3*sqrt(var(a)+var(b))/abs(mean(a)-mean(b)), where the pooled standard deviation is computed by the square root of the sum of the control variances. A `robust` method, less sensitive to outliers, is computed by the relation Z' = 1-3*(mad(a)+mad(b))/abs(median(a)-median(b)) where the control dispersions are computed with the mad and the control locations with the median.

A multivariate extension of the Z'-factor score can be designed by linearly transforming the multivariate data to one dimension and computing the standard (here, `fixsd`) Z'-factor. It can be shown that the linear transform that maximizes the score is the LDA. Moreover, one can demonstrate that the resulting Z'-factor score is equivalent of computing Z' = 1 - 3/dMaha(mu_a, mu_b, Sigma_a + Sigma_b) where `dMaha` is the Mahalanobis distance.

## Value

The Z'-factor, a numeric ranging from -infinity to 1.

## Author(s)

Gregoire Pau, gregoire.pau@embl.de, 2010

## References

J. H. Zhang, T. D. Chung, K. R. Oldenburg. A Simple Statistical Parameter for Use in Evaluation and Validation of High Throughput Screening Assays. J Biomol Screening, 1999.

`readHTS`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ``` ## initialize imageHTS object using the local submorph screen local = tempdir() server = system.file('submorph', package='imageHTS') x = parseImageConf('conf/imageconf.txt', localPath=local, serverURL=server) x = configure(x, 'conf/description.txt', 'conf/plateconf.txt', 'conf/screenlog.txt') ## get profiles profiles = readHTS(x, type='file', filename='data/profiles.tab', format='tab') a = profiles[match(getUnames(x, content='rluc'), profiles\$uname),] b = profiles[match(getUnames(x, content='ubc'), profiles\$uname),] ## compute Z'-factor scores on some features ft = c('med.c.t.m.majoraxis') cat('Z\'-factor original=', zprime(a[,ft], b[,ft], 'original'), 'fixsd=', zprime(a[,ft], b[,ft], 'fixsd'), '\n') ## multivariate Z'-factor ft = c('med.c.t.m.majoraxis', 'med.n.h.m.majoraxis', 'med.c.h.b.mean') cat('Z\'-factor mahalanobis=', zprime(a[,ft], b[,ft], 'mahalanobis'), '\n') ```