interpolateHelper {edgeR}R Documentation

Quantile Adjustment interpolator

Description

Helper function to interpolate the quantile function

Usage

 
interpolateHelper(mu, p, r, count.max, verbose=TRUE) 

Arguments

mu matrix of means
p matrix of percentiles
r scalar, vector or matrix of size parameters
count.max vector of maximum counts for all tags
verbose whether to write comments, default true

Value

matrix with quantile-adjusted pseudodata

Author(s)

Mark Robinson, Davis McCarthy

Examples

y<-matrix(rnbinom(10000,size=2,mu=10),ncol=4)
d<-DGEList(data=y,group=rep(1:2,each=2),lib.size=rep(c(1000,1010),2))
ps<-estimatePs(d,r=2)
N<-prod(d$lib.size)^(1/ncol(d$data))
perc<-pnbinom(d$data-1,size=2,mu=outer(ps$p.common,d$lib.size))+dnbinom(d$data,size=2,mu=outer(ps$p.common,d$lib.size))/2
maxcounts<-apply(d$data,1,max)
pseudo<-interpolateHelper(outer(ps$p.common,rep(N,4)),perc,r=2,maxcounts)

[Package edgeR version 1.2.4 Index]