junctionDUreport {ASpli} | R Documentation |
Estimate differential usage at junction level. When targets has only two conditions, and contrast is not set, the estimation of differential expression and usage is done with an exact test, otherwise is estimated using a generalized linear model.
junctionDUreport( counts, targets, appendTo = NULL, minGenReads = 10, minRds = 0.05, threshold = 5, offset = FALSE, offsetUseFitGeneX = TRUE, contrast = NULL, forceGLM = FALSE)
counts |
An object of class |
targets |
A dataframe containing sample, bam and experimental factor columns. |
appendTo |
An object of class |
minGenReads |
Junctions within genes with at least an average of |
minRds |
Junctions within genes with at least an average of |
threshold |
Junction with at least |
offset |
Corrects junction counts using an offset matrix derived from gene expression data. Default = FALSE |
offsetUseFitGeneX |
Fit a GLM using gene counts to build the offset matrix. This argument is used only when 'offset' argument is set to TRUE. The default value is TRUE |
contrast |
Define the comparison between conditions to be tested.
|
forceGLM |
Force the use of a generalized linear model to estimate differential expression and usage. Default = FALSE |
An ASpliDU
object with results of differential usage of junctions
Estefania Mancini, Javier Iserte, Marcelo Yanovsky, Ariel Chernomoretz
edgeR
, DUreport
Accessors: junctionsDU
Export: writeDU
# Create a transcript DB from gff/gtf annotation file. # Warnings in this examples can be ignored. library(GenomicFeatures) genomeTxDb <- makeTxDbFromGFF( system.file('extdata','genes.mini.gtf', package="ASpli") ) # Create an ASpliFeatures object from TxDb features <- binGenome( genomeTxDb ) # Define bam files, sample names and experimental factors for targets. bamFileNames <- c( "A_C_0.bam", "A_C_1.bam", "A_C_2.bam", "A_D_0.bam", "A_D_1.bam", "A_D_2.bam" ) targets <- data.frame( row.names = paste0('Sample_',c(1:6)), bam = system.file( 'extdata', bamFileNames, package="ASpli" ), factor1 = c( 'C','C','C','D','D','D') ) # Load reads from bam files bams <- loadBAM( targets ) # Read counts from bam files counts <- readCounts( features, bams, targets, cores = 1, readLength = 100, maxISize = 50000 ) # Calculate differential usage of junctions only du <- junctionDUreport( counts, targets ) # Calculate differential usage of genes, bins and junctions du2 <- DUreport( counts, targets ) du2 <- junctionDUreport( counts, targets, appendTo = du2 ) # Export results writeDU( du = du, output.dir = "only_du" )