Learn R Programming

diffloop (version 1.0.2)

loopFit: Fit model for association testing

Description

loopFit takes a loops object and prepares it for the loopTest function.

Usage

loopFit(y, design, method = "QLF")

## S3 method for class 'loops,missing,missing': loopFit(y, design, method = "QLF")

## S3 method for class 'loops,matrix,missing': loopFit(y, design, method = "QLF")

Arguments

y
A loops object for association
design
A design matrix (optional)
method
Specifies association; currently only 'QLF' is supported

Value

  • A loopfit object

Details

This function returns a loopfit object, which combines the loops object in the input with a DGEGLM object that is the normal output of an edgeR glmQLFit. To set up a different design matrix, pass that parameter through the function. Otherwise, the default is to generate a new matrix from loops@colData$groups. Currently, 'QLF' is the only supported method, but new association tests may be added in later developments

Examples

Run this code
# Differential loop fit
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
jpn_loopfit <- loopFit(loops.small)
# Differential loop calling between naive and jurkat
assoc_jn <- loopTest(jpn_loopfit, coef = 2)

Run the code above in your browser using DataLab