write.tabdel: Wrapper to function 'write.table' used to write data to a...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Wrapper for the function write.table to write data to a tab-delimited file.

Usage

1

Arguments

...

arguments that get passed on to the function write.table.

Details

A trivial function, which we have included for convenience.

Value

The name of the file that was written.

Author(s)

Ligia Braz ligia@ebi.ac.uk

See Also

write.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    data(KcViabSmall)
    x <- KcViabSmall
    ## determine the ratio between each well and the plate median
    y <- array(as.numeric(NA), dim=dim(x$xraw))
    nrWell <- dim(x$xraw)[1]
    for(p in 1:(dim(x$xraw)[2])) {
      samples <- (x$wellAnno[(1:nrWell)+nrWell*(p-1)]=="sample")
      y[, p, , ] <- apply(x$xraw[, p, , , drop=FALSE], 3:4,
                          function(w) w/median(w[samples], na.rm=TRUE)) 
    }
    y <- signif(y, 4)
    out <- matrix(y, nrow=prod(dim(y)[1:2]), ncol=dim(y)[3:4])
    out <- cbind(x$geneAnno, x$wellAnno, out)
    colnames(out) <- c(names(x$geneAnno), "wellAnno",
       sprintf("Well/Median_r%d_ch%d",
               rep(1:dim(y)[3], dim(y)[4]), rep(1:dim(y)[4], each=dim(y)[3])))
    write.tabdel(out, file = tempfile())

cellHTS documentation built on Oct. 5, 2016, 4:40 a.m.