fit_repac: Fit model and test for differential polyA usage (DPU)

View source: R/fit_repac.R

fit_repacR Documentation

Fit model and test for differential polyA usage (DPU)

Description

fit_repac transforms the counts obtained from create_pa_rse() into compositions and performs an isometric log ratio transformation prior to fitting the model

Usage

fit_repac(se, design, contrasts = NULL)

Arguments

se

A (Ranged)SummarizedExperiment object.

design

A design matrix indicating the groups to be compared. See model.matrix.

contrasts

A numeric matrix with rows corresponding to coefficients in the design matrix and columns containing contrasts. See makeContrasts.

Value

A list of tibbles with length equal the number of contrasts. Each tibble contains the following columns: gene_name - Name of the gene associated with the PAS (e.g., SYMBOL) Ref - ID of the reference PAS ID - ID of the PAS tested in comparison to Ref cFC - Compositional fold-change in the ilr-space mcDiff - Mean difference between the coverages in percentage across groups t - T-statistic value p.val - p-value

Author(s)

Eddie Imada

Examples

## fit model and test for DPU
groups <- rep(c("A", "B"), each=5)
dMat <- model.matrix(~ 0+groups)
colnames(dMat) <-  gsub("groups", "",colnames(dMat))
cMat <- makeContrasts(
    levels=colnames(dMat),
    BvsA= B - A
)
results <- fit_repac(se, dMat, cMat)


eddieimada/REPAC documentation built on Aug. 20, 2023, 7:22 a.m.