transformRNAseq {coseq} | R Documentation

## Transform RNA-seq data using common transformations

### Description

Application of common transformations for RNA-seq data prior to fitting a normal mixture model

### Usage

    transformRNAseq(
      y,
      normFactors = "TMM",
      transformation = "arcsin",
      geneLength = NA,
      meanFilterCutoff = NULL,
      verbose = TRUE
    )

### Arguments

`y` | (n x q) `matrix` or `data.frame` of observed counts for n observations and q variables
`normFactors` | The type of estimator to be used to normalize for differences in library size: “`TC`” for total count, “`DESeq`” for the normalization method in the DESeq package, and “`TMM`” for the TMM normalization method (Robinson and Oshlack, 2010). Can also be a vector (of length q) containing pre-estimated library size estimates for each sample.
`transformation` | Transformation type to be used: “`arcsin`”, “`logit`”, “`logMedianRef`”, “`profile`”, “`voom`”, “`logRPKM`” (if `geneLength` is provided by user), “`logclr`”, “`clr`”, “`alr`”, “`ilr`”, “`none`”,
`geneLength` | Vector of length equal to the number of rows in “`y`” providing the gene length (bp) for RPKM calculation
`meanFilterCutoff` | Value used to filter low mean normalized counts
`verbose` | If `TRUE`, include verbose output

### Value

`tcounts` | Transformed counts
`normCounts` | Normalized counts
`snorm` | Per-sample normalization factors divided by mean normalization factor
`ellnorm` | Per-sample normalization factors

### Examples

    set.seed(12345)
    countmat <- matrix(runif(300*4, min=0, max=500), nrow=300, ncol=4)
    countmat <- countmat[which(rowSums(countmat) > 0),]
    conds <- rep(c("A","B","C","D"), each=2)

    ## Arcsin transformation, TMM normalization
    arcsin <- transformRNAseq(countmat, normFactors="TMM", transformation="arcsin")$tcounts
    ## Logit transformation, TMM normalization
    logit <- transformRNAseq(countmat, normFactors="TMM", transformation="logit")$tcounts
    ## logCLR transformation, TMM normalization
    logclr <- transformRNAseq(countmat, normFactors="TMM", transformation="logclr")$tcounts

[Package coseq version 1.18.0 Index]