test_DTU | R Documentation |
test_DTU
performs differential splicing, via differential transcript usage (DTU), between 2 or more groups.
Parameters are inferred via Markov chain Monte Carlo (MCMC) techniques and a DTU test is performed
via a multivariate Wald test on the posterior densities for the average relative abundance of transcripts.
Warning: the samples in samples_design must have the same order
as those in the 'path_to_eq_classes' parameter of the create_data
function.
test_DTU(
BANDITS_data,
precision = NULL,
R = 10^4,
burn_in = 2 * 10^3,
samples_design,
group_col_name = "group",
n_cores = 1,
gene_to_transcript,
theshold_pval = 0.1
)
BANDITS_data |
a 'BANDITS_data' object. |
precision |
a vector with the mean and standard deviation of the log-precision parameter. |
R |
the number of iterations for the MCMC algorithm (after the burn-in). Min 10^4. Albeit no difference was observed in simulation studies when increasing 'R' above 10^4, we encourage users to possibly use higher values of R (e.g., 2*10^4), if the computational time allows it, particularly for comparisons between 3 or more groups. |
burn_in |
the length of the burn-in to be discarded (before convergence is reached). Min 2*10^3. Albeit no difference was observed in simulation studies when increasing 'burn_in' above 2*10^3, we encourage users to possibly use higher values of R (e.g., double) if the computational time allows it. |
samples_design |
a |
group_col_name |
the name of the column of 'samples_design' containing the group id. By default group_col_name = "group". |
n_cores |
the number of cores to parallelize the tasks on. |
gene_to_transcript |
a matrix or data.frame with a list of gene-to-transcript correspondances. The first column represents the gene id, while the second one contains the transcript id. |
theshold_pval |
is a threshold between 0 and 1; when running |
A BANDITS_test
object.
Simone Tiberi simone.tiberi@uzh.ch
create_data
, BANDITS_data
, BANDITS_test
# load gene_to_transcript matching:
data("gene_tr_id", package = "BANDITS")
# We define the design of the study
samples_design = data.frame(sample_id = paste0("sample", seq_len(4)),
group = c("A", "A", "B", "B"))
# load the pre-computed data:
data("input_data", package = "BANDITS")
input_data
# Filter lowly abundant genes:
input_data = filter_genes(input_data, min_counts_per_gene = 20)
# load the pre-computed precision estimates:
data(precision, package = "BANDITS")
## Test for DTU
set.seed(61217)
results = test_DTU(BANDITS_data = input_data,
precision = precision$prior,
samples_design = samples_design,
R = 10^4, burn_in = 2*10^3, n_cores = 2,
gene_to_transcript = gene_tr_id)
results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.