clipPCs {GGBase} | R Documentation

## transformations of expression data in smlSet instances

### Description

transformations of expression data in smlSet instances or assay data in SummarizedExperiment

### Usage

    clipPCs(x, inds2drop, center = TRUE)

    regressOut(sms, rhs, ...)

### Arguments

`x` | instance of `smlSet` or `RangedSummarizedExperiment`
`sms` | instance of `smlSet` or `RangedSummarizedExperiment`
`inds2drop` | Vector of PCs to be eliminated by setting the associated diagonal elements in the SVD to zero before recomposing the matrix of expression values. If the value 0 is present in inds2drop, the smlSet is returned unchanged, with a message.
`center` | logical, passed to `prcomp`
`rhs` | formula fragment (no dependent variable) used to form residuals in a reexpression of the expression matrix; variable bindings found in pData of an ExpressionSet or colData of a SummarizedExperiment
`...` | arguments passed to `lmFit`

### Details

`clipPCs` is an operation on the n x p transposed matrix X of expression data. The singular value decomposition X = UDV^t is formed, the diagonal elements of D corresponding to `inds2drop` are set to zero yielding the diagonal matrix E, and then Y = UEV^t is computed and transposed to replace the expression data.

`regressOut` obtains residuals after genewise regression of expression on the design matrix specified by the `rhs`; `lmFit` is used to compute coefficients, linear predictions and residuals.

### Value

an instance of `smlSet`

### Author(s)

VJ Carey <stvjc@channing.harvard.edu>

### References

The use of PCA-based adjustments to remove mass extraneous effects from expression matrices has been criticized in work of Oliver Stegle and Jeffrey Leek, who offer Bayesian PEER and SVA respectively as alternative solutions. The PCA-based method seems to have reasonable effectiveness in examples worked with GGdata.

### Examples

    ## Not run:   # this would induce cyclic dependency, but should
               # run manually
     if ("GGtools" %in% installed.packages()[,1]) {
      require("GGtools")
      c20 = getSS("GGtools", "20")
      t1 = gwSnpTests(genesym("CPNE1")~male, c20, chrnum("20"))
      topSnps(t1)
      c20c = clipPCs(c20, 1:10)
      t2 = gwSnpTests(genesym("CPNE1")~male, c20c, chrnum("20"))
      topSnps(t2)
      }

    ## End(Not run)

[Package GGBase version 3.49.1 Index]