Description Usage Arguments Details Value See Also Examples
Calculate likelihood ratio tests between fitted models and null models.
1 
rs_results 

when_null_selected 
Which option to use for genes where the lasso model selects
zero interaction terms, i.e. identical to the null model. Options are 
The regularized (lasso) fitted models contain an optimal subset of exon:condition interaction terms for each gene, and the "full" fitted models contain all exon:condition interaction terms. The null models contain zero interaction terms, so they are nested within the fitted models.
The likelihood ratio (LR) tests compare the fitted models against the nested null models.
If the regularized (lasso) model contains at least one exon:condition interaction
term, the LR test compares the lasso model against the null model. However, if the
lasso model contains zero interaction terms, then the lasso and null models are
identical, so the LR test cannot be calculated. The when_null_selected
argument
lets the user choose what to do in these cases: either set pvalues equal to 1
(when_null_selected = "ones"
); or calculate a LR test using the "full" model
containing all exon:condition interaction terms (when_null_selected = "full"
),
which reduces power due to the larger number of terms, but allows the evidence for
differential exon usage among these genes to be distinguished. You can also return
NA
s for these genes (when_null_selected = "NA"
).
The default option is when_null_selected = "ones"
. This simply calls all these
genes nonsignificant, which in most cases is sufficient since we are more interested
in genes with strong evidence for differential exon usage. However, if it is important
to rank the lowevidence genes in your data set, use the when_null_selected =
"full"
option.
If when_null_selected = "ones"
or when_null_selected = "NA"
, the "full"
fitted models are not required.
Previous step: Fit models with fitRegMultiple
,
fitNullMultiple
, and fitFullMultiple
.
Next step: Generate summary table of results with summaryTable
.
Returns a RegspliceResults
object containing results of
the LR tests. The results consist of the following entries for each gene:
p_vals: raw pvalues
p_adj: multiple testing adjusted pvalues (BenjaminiHochberg false discovery rates, FDR)
LR_stats: likelihood ratio test statistics
df_tests: degrees of freedom of likelihood ratio tests
RegspliceResults
initializeResults
fitRegMultiple
fitNullMultiple
fitFullMultiple
summaryTable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  file_counts < system.file("extdata/vignette_counts.txt", package = "regsplice")
data < read.table(file_counts, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
head(data)
counts < data[, 2:7]
tbl_exons < table(sapply(strsplit(data$exon, ":"), function(s) s[[1]]))
gene_IDs < names(tbl_exons)
n_exons < unname(tbl_exons)
condition < rep(c("untreated", "treated"), each = 3)
rs_data < RegspliceData(counts, gene_IDs, n_exons, condition)
rs_data < filterZeros(rs_data)
rs_data < filterLowCounts(rs_data)
rs_data < runNormalization(rs_data)
rs_data < runVoom(rs_data)
rs_results < initializeResults(rs_data)
rs_results < fitRegMultiple(rs_results, rs_data)
rs_results < fitNullMultiple(rs_results, rs_data)
rs_results < fitFullMultiple(rs_results, rs_data)
rs_results < LRTests(rs_results)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.