View source: R/regsplice_wrapper.R
regsplice | R Documentation |
Wrapper function to run a regsplice
analysis with a single command.
regsplice(
rs_data,
filter_zeros = TRUE,
filter_low_counts = TRUE,
filter_min_per_exon = 6,
filter_min_per_sample = 3,
normalize = TRUE,
norm_method = "TMM",
voom = TRUE,
alpha = 1,
lambda_choice = c("lambda.min", "lambda.1se"),
when_null_selected = c("ones", "full", "NA"),
seed = NULL,
...
)
rs_data |
|
filter_zeros |
Whether to filter zero-count exon bins, using
|
filter_low_counts |
Whether to filter low-count exon bins, using
|
filter_min_per_exon |
Filtering parameter for low-count exon bins: minimum number
of reads per exon bin, summed across all biological samples. Default is 6. See
|
filter_min_per_sample |
Filtering parameter for low-count exon bins: minimum
number of reads per biological sample; i.e. for each exon bin, at least one sample
must have this number of reads. Default is 3. See |
normalize |
Whether to calculate normalization factors, using
|
norm_method |
Normalization method to use. Options are |
voom |
Whether to calculate |
alpha |
Elastic net parameter |
lambda_choice |
Parameter to select which optimal |
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 |
seed |
Random seed (integer). Default is NULL. Provide an integer value to set the random seed for reproducible results. |
... |
Other arguments to pass to |
This wrapper function runs the regsplice
analysis pipeline with a single
command.
The required input format is a RegspliceData
object, which is created with the
RegspliceData
constructor function.
The wrapper function calls each of the individual functions in the analysis pipeline in sequence. You can also run the individual functions directly, which provides additional flexibility and insight into the statistical methodology. See the vignette for a description of the individual functions and an example workflow.
After running the analysis pipeline, a summary table of the results can be displayed
with summaryTable
.
Note that when using exon microarray data, the filtering, normalization, and
voom
steps should be disabled with the respective arguments.
See RegspliceData
for details on constructing the input data
object; filterZeros
and filterLowCounts
for details about
filtering; runNormalization
and runVoom
for details about
calculation of normalization factors and voom
transformation and weights;
createDesignMatrix
for details about the model design matrices;
fitRegMultiple
, fitNullMultiple
, or
fitFullMultiple
for details about the model fitting functions; and
LRTests
for details about the likelihood ratio tests.
Returns a RegspliceResults
object containing fitted model
results and likelihood ratio (LR) test results. The LR test results consist of the
following entries for each gene:
p_vals: raw p-values
p_adj: multiple testing adjusted p-values (Benjamini-Hochberg false discovery rates, FDR)
LR_stats: likelihood ratio test statistics
df_tests: degrees of freedom of likelihood ratio tests
RegspliceData
RegspliceResults
initializeResults
filterZeros
filterLowCounts
runNormalization
runVoom
createDesignMatrix
fitRegMultiple
fitNullMultiple
fitFullMultiple
LRTests
summaryTable
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.