fitNBglm: Fit GLM for each window

Description Usage Arguments Value Author(s) See Also Examples

View source: R/qsea.glm.R

Description

This function fits a negative binomial GLM for each genomic window, according to the design matrix.

Usage

1
2
3
fitNBglm(qs,design,link="log",keep, disp_method="region_wise",
norm_method="rpkm",init_disp=0.5 ,verbose=TRUE, minRowSum=10, pseudocount=1,
    disp_iter = 3, nChunks = NULL, parallel = FALSE)

Arguments

qs

a qseaSet object

design

the design matrix for the GLMs

link

name of the link function. Currently, only the canonical dQuotelog link function is implemented.

keep

indices of windows to be included in the analysis.

disp_method

method to estimate dispersion parameters. Allowed values are dQuoteregion_wise for independent window wise estimates, dQuotecommon for a single estimate for all windows, dQuotecutAtQuantiles for window wise estimates trimmed at the 25% and 75% quantiles, or dQuoteinitial for using the dispersion parameters provided with the init_disp parameter.

norm_method

normalization method, as defined by normMethod() function

init_disp

initial estimate for dispersion parameter. Either a single parameter for all regions, or a vector with window wise parameters.

verbose

more messages that document the process

minRowSum

filter out windows with less than minRowSum reads over all samples

pseudocount

this value is added to the read counts

disp_iter

number of iterations for dispersion estimation

nChunks

fit GLMs in multiple chunks

parallel

use multicore processing

Value

This function returns a qseaGLM object, containing the fitted coefficients of the GLMs.

Author(s)

Mathias Lienhard

See Also

addContrast()

Examples

1
2
3
4
#tbd
qs=getExampleQseaSet()
design=model.matrix(~group, getSampleTable(qs))
TvN_glm=fitNBglm(qs, design, norm_method="beta")

qsea documentation built on Nov. 8, 2020, 8:28 p.m.