File: scaleOffset.Rd

package info (click to toggle)
r-bioc-edger 3.40.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,484 kB
  • sloc: cpp: 1,425; ansic: 1,109; sh: 21; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,539 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\name{scaleOffset}
\alias{scaleOffset}
\alias{scaleOffset.DGEList}
\alias{scaleOffset.default}

\title{Scale offsets}

\description{Ensures scale of offsets are consistent with library sizes.}

\usage{
\method{scaleOffset}{DGEList}(y, offset, \dots)
\method{scaleOffset}{default}(y, offset, \dots)
}
\arguments{ 
\item{y}{numeric vector or matrix of counts, or a \code{DGEList} object.}
\item{offset}{numeric vector or matrix of offsets to be scaled. If a vector, its length must equal to the length of \code{y} or the number of columns of \code{y}. If a matrix, its dimension must equal to the dimension of \code{y}.}
\item{\dots}{other arguments that are not currently used.}
}

\value{
\code{scaleOffset.default} returns a numeric vector if \code{offset} is a vector, a matrix if \code{offset} is a matrix or a \code{CompressedMatrix} object if \code{offset} is a \code{CompressedMatrix}.
\code{scaleOffset.DGEList} computes the scaled offests and store them in the \code{offset} component of the input \code{DGEList} object.
}

\details{
\code{scaleOffset} ensures that the scale of offsets are consistent with library sizes.
This is done by ensuring that the mean offset for each gene is the same as the mean log-library size.
The length or dimensions of \code{offset} should be consistent with the number of libraries in \code{y}.
}

\author{Aaron Lun, Yunshun Chen}

\examples{
y <- matrix(rnbinom(40,size=1,mu=100),10,4)
offset <- rnorm(4)
scaleOffset(y, offset)
}

\concept{Normalization}