summaryTable: Summary table.

Description Usage Arguments Details Value See Also Examples

View source: R/summaryTable.R

Description

Display summary table of results from a regsplice analysis.

Usage

1
2
3
4
5
6
summaryTable(
  rs_results,
  n = 20,
  threshold = 0.05,
  rank_by = c("FDR", "p-value", "none")
)

Arguments

rs_results

RegspliceResults object containing results of a regsplice analysis, generated with wrapper function regsplice (or individual functions up to LRTests). See RegspliceResults for details.

n

Number of genes to display in summary table. Default is 20. If the total number of significant genes up to the significance threshold is less than n, only the significant genes are shown. Set to Inf to display all significant genes; or set both n = Inf and threshold = 1 to display all genes in the data set.

threshold

Significance threshold (for either FDR or raw p-values, depending on choice of argument rank_by). Default is 0.05. Set to 1 to display all n genes; or set both n = Inf and threshold = 1 to display all genes in the data set.

rank_by

Whether to rank genes by false discovery rate (FDR), raw p-values, or no ranking. Choices are "FDR", "p-value", and "none". Default is "FDR".

Details

The results of a regsplice analysis consist of a set of multiple testing adjusted p-values (Benjamini-Hochberg false discovery rates, FDR) quantifying the statistical evidence for differential exon usage (DEU) for each gene. Typically, the adjusted p-values are used to rank the genes in the data set according to their evidence for DEU, and an appropriate significance threshold (e.g. FDR < 0.05) can be used to generate a list of genes with statistically significant evidence for DEU.

The main regsplice functions return results in the form of a RegspliceResults object, which contains slots for gene names, fitted model results, raw p-values, multiple testing adjusted p-values (Benjamini-Hochberg FDR), likelihood ratio (LR) test statistics, and degrees of freedom of the LR tests. See RegspliceResults and the main regsplice wrapper function regsplice for details.

This function generates a summary table of the results. The results are displayed as a data frame of the top n most highly significant genes, ranked according to either FDR or raw p-values, up to a specified significance threshold (e.g. FDR < 0.05).

The argument rank_by controls whether to rank by FDR or raw p-values. The default is to rank by FDR.

To display results for all genes up to the significance threshold, set the argument n = Inf. To display results for all genes in the data set, set both n = Inf and threshold = 1.

Previous step: Run regsplice pipeline with the regsplice wrapper function (or individual functions up to LRTests).

Value

Returns a data frame containing results for the top n most highly significant genes, up to the specified significance threshold for the FDR or raw p-values.

See Also

RegspliceResults regsplice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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_results <- regsplice(rs_data)

summaryTable(rs_results)
summaryTable(rs_results, n = Inf, threshold = 1)

regsplice documentation built on Nov. 8, 2020, 5:32 p.m.