Learn R Programming

BitSeq (version 1.16.0)

getMeanVariance: 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.

Value

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

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.

See Also

estimateExpression

Examples

Run this code
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))

Run the code above in your browser using DataLab