getMeanVariance {BitSeq} | R Documentation

## Calculate mean and variance of expression samples

### Description

Calculate mean and variance of expression samples or log-expression samples

### Usage

    getMeanVariance(sampleFiles, outFile, log=NULL, type=NULL, verbose=NULL,
          norm=NULL, pretend=FALSE)

### Arguments

`sampleFiles` | Vector of one or more files containing the expression samples.
`outFile` | Name of the output file.
`log` | Use logged values.
`type` | Type of variance, possible values: `sample`,`sqDif` for sample variance or squared difference.
`verbose` | Verbose output.
`norm` | Vector of (multiplicative) normalization constants for library size normalization of expression samples. Number of constants has to match the number of expression samples files.
`pretend` | Do not execute, only print out command line calls for the C++ version of the program.

### Details

The `getMeanVariance` function computes means and variances of MCMC expression samples. These can be computed either from single file or from multiple files using sample variance. Variance of two experiments (i.e. technical or biological replicates) can be estimated also by using `sqDif` option for `type` which specify the computation of the average square distance between the samples from two sets.

### Value

`.means` | File containing means (first column) and variance (second column) for each transcript (or row in the sample files)

### Author(s)

Peter Glaus

### See Also

`estimateExpression`

### Examples

    setwd(system.file("extdata",package="BitSeq"));
    sampleFileNames = c("data-c1b0.rpkm","data-c1b1.rpkm")
    getMeanVariance(sampleFiles=sampleFileNames, outFile="data-c1.Lmean", log=1,
          norm=c(1.0017, 0.9998))

[Package BitSeq version 1.24.0 Index]