estimateJunctionSeqDispersions {JunctionSeq} | R Documentation |
This method estimates the sample dispersion for each counting bin (in other words, each splice junction locus).
This function is called internally by the runJunctionSeqAnalyses
function, and thus for most purposes users should not need to call this
function directly. It may be useful to advanced users performing non-standard
analyses.
estimateJunctionSeqDispersions( jscs, method.GLM = c(c("advanced","DESeq2-style"), c("simpleML","DEXSeq-v1.8.0-style")), test.formula1 = formula(~ sample + countbin + condition : countbin), meanCountTestableThreshold="auto", nCores=1, use.multigene.aggregates = FALSE, verbose = TRUE)
jscs |
A |
method.GLM |
Character string. Can be used to apply alternative methodologies or implementations. Intended for advanced users who have strong opinions about the underlying statistical methodologies. The default is "advanced" or, equivalently, "DESeq2-style". This uses the dispersion estimation methodology used by DESeq2 and DEXSeq v1.12.0 or higher to generate the initial (feature-specific) dispersion estimates. The alternative method is "simpleML" or, equivalently, "DEXSeq-v1.8.0-style". This uses a simpler maximum-likelihood-based method used by the original DESeq and by DEXSeq v1.8.0 or less. |
test.formula1 |
The model formula. Note that this formula is different from the formula used to calculate parameter estimates and effect size. This is because the two noise components (gene-level and countbin-level noise) are folded into the sample term. Since we only intend to test the condition-countbin interaction, we do not need to model the gene-level differential expression. NOTE: the biological condition to be tested MUST be named "condition". |
meanCountTestableThreshold |
"auto" or Numeric value. Features with a total mean normalized count of less than this value will be excluded from the analyses. If left as the default ("auto"), then the cutoff threshold will be determined automatically using the DESeq2 independent filtering method. |
nCores |
Either an integer or a BiocParallelParam object. Either way, this determines The number of cores to use. Note that multicore functionality may not be available on all platforms. If parallel execution is not available then JunctionSeq will automatically fallback to single-core execution. See the BiocParallel package for more information. |
use.multigene.aggregates |
Logical value. Whether to attempt to test "aggregate genes" which consist of multiple genes that overlap with one another. Note that inclusion of aggregate genes may affect the false discovery rate, since by their very nature aggregate genes will often show differential splice junction usage, as the two genes will often be regulated independently. |
verbose |
A boolean flag indicating whether or not to print progress information during execution. (Default=FALSE) |
A JunctionSeqCountSet, with dispersion results included.
## Not run:
##D #Full example (from scratch):
##D ########################################
##D #Set up example data:
##D decoder.file <- system.file(
##D "extdata/annoFiles/decoder.bySample.txt",
##D package="JctSeqData");
##D decoder <- read.table(decoder.file,
##D header=TRUE,
##D stringsAsFactors=FALSE);
##D gff.file <- system.file(
##D "extdata/cts/withNovel.forJunctionSeq.gff.gz",
##D package="JctSeqData");
##D countFiles <- system.file(paste0("extdata/cts/",
##D decoder$sample.ID,
##D "/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz"),
##D package="JctSeqData");
##D ########################################
##D #Advanced Analysis:
##D
##D #Make a "design" dataframe:
##D design <- data.frame(condition = factor(decoder$group.ID));
##D #Read the QoRTs counts.
##D jscs = readJunctionSeqCounts(countfiles = countFiles,
##D samplenames = decoder$sample.ID,
##D design = design,
##D flat.gff.file = gff.file
##D );
##D #Generate the size factors and load them into the JunctionSeqCountSet:
##D jscs <- estimateJunctionSeqSizeFactors(jscs);
##D #Estimate feature-specific dispersions:
##D jscs <- estimateJunctionSeqDispersions(jscs);
##D #Fit dispersion function and estimate MAP dispersion:
##D jscs <- fitJunctionSeqDispersionFunction(jscs);
##D #Test for differential usage:
##D jscs <- testForDiffUsage(jscs);
##D #Estimate effect sizes and expression estimates:
##D jscs <- estimateEffectSizes( jscs);
##D
## End(Not run)