Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

generate.ExpressionData

Generate Peptide/Protein Expression Data


Description

Generates a matrix of peptide/protein expression data. It is assumed that the expression data is log - transformed. Therefore, for each sample the peptides/proteins intensities are randomly drawn from a Gaussian distribution.

Usage

generate.ExpressionData(nSamples1, nSamples2, meanSamples, sdSamples, 
                        nFeatures, nFeaturesUp, nFeaturesDown, 
                        meanDynRange, sdDynRange, 
                        meanDiffAbund, sdDiffAbund)

Arguments

nSamples1

Number of samples in condition 1.

nSamples2

Number of samples in condition 2.

meanSamples

Mean value of the background noise.

sdSamples

Standard deviation of the background noise.

nFeatures

Number of peptides/proteins.

nFeaturesUp

Number of peptides/proteins up-regulated.

nFeaturesDown

Number of /peptidesproteins down-regulated.

meanDynRange

Mean value of the dynamic range of peptide/protein expressions.

sdDynRange

Standard deviation of the dynamic range of peptide/protein expressions.

meanDiffAbund

Mean value of the up/down-regulation.

sdDiffAbund

Standard deviation of the up/down-regulation.

Value

A list including elements:

data

Peptide/protein expression matrix

conditions

Vector indicating the samples in each condition

labelFeatures

Vector indicating features which are down/up/no regulated

Author(s)

Cosmin Lazar

See Also

Examples

dataObj = generate.ExpressionData(nSamples1 = 6, nSamples2 = 6,
                          meanSamples = 0, sdSamples = 0.2,
                          nFeatures = 2000, nFeaturesUp = 100, nFeaturesDown = 100,
                          meanDynRange = 20, sdDynRange = 1,
                          meanDiffAbund = 1, sdDiffAbund = 0.2)
exprsData = dataObj[[1]]
  
## Not run: 
hist(exprsData[,1])

## End(Not run)

## The function is currently defined as
function (nSamples1, nSamples2, meanSamples, sdSamples, nFeatures, 
    nFeaturesUp, nFeaturesDown, meanDynRange, sdDynRange, meanDiffAbund, 
    sdDiffAbund) 
{
    nSamples = nSamples1 + nSamples2
    data = matrix(rnorm(nSamples * nFeatures, meanSamples, sdSamples), 
        nFeatures, nSamples)
    means = rnorm(nFeatures, meanDynRange, sdDynRange)
    data = data + means
    conditions = c(rep(1, nSamples1), rep(2, nSamples2))
    DE.coef.up = matrix(rnorm(nFeaturesUp * nSamples1, meanDiffAbund, 
        sdDiffAbund), nFeaturesUp, nSamples1)
    DE.coef.down = matrix(rnorm(nFeaturesDown * nSamples2, meanDiffAbund, 
        sdDiffAbund), nFeaturesDown, nSamples2)
    data[1:nFeaturesUp, conditions == 1] = DE.coef.up + data[1:nFeaturesUp, 
        conditions == 1]
    data[(nFeaturesUp + 1):(nFeaturesUp + nFeaturesDown), conditions == 
        2] = DE.coef.down + data[(nFeaturesUp + 1):(nFeaturesUp + 
        nFeaturesDown), conditions == 2]
    labelFeatures = c(rep(1, nFeaturesUp), rep(2, nFeaturesDown), 
        rep(3, nFeatures - (nFeaturesUp + nFeaturesDown)))
    row.names(data) = 1:nFeatures
    return(list(data, conditions, labelFeatures))
  }

imputeLCMD

A collection of methods for left-censored missing data imputation

v2.0
GPL (>= 2)
Authors
Cosmin Lazar
Initial release
2015-01-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.