Description Usage Arguments Value Slots Author(s) See Also Examples
BANDITS_test
contains the results of the differential transcript usage (DTU) test.
BANDITS_test
is organized in three data.frames containing: genelevel results,
transcriptlevel results and
convergence diagnostics of the Markov chain Monte Carlo (MCMC) posterior chains.
Created via test_DTU
.
To test for convergence, we use Heidelberger and Welch's convergence diagnostic,
implemented in coda::heidel.diag
, to test for the stationarity of the
chain for the full logposterior density;
we use a 0.01 threshold on the p.value to reject the null hypotehsis of stationarity.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  ## S4 method for signature 'BANDITS_test'
show(object)
## S4 method for signature 'BANDITS_test'
convergence(x)
## S4 method for signature 'BANDITS_test'
top_genes(x, n = Inf, sort_by_g = "p.value")
## S4 method for signature 'BANDITS_test'
top_transcripts(x, n = Inf,
sort_by_tr = "gene")
## S4 method for signature 'BANDITS_test'
gene(x, gene_id)
## S4 method for signature 'BANDITS_test'
transcript(x, transcript_id)
## S4 method for signature 'BANDITS_test'
plot_proportions(x, gene_id, CI = TRUE,
CI_level = 0.95)

object, x 
a 'BANDITS_test' object. 
n 
the number of genes or transcripts to report. By default 
sort_by_g 
"p.value" for sorting results according to genelevel significance (i.e., p.value); "DTU_measure" for sorting results according to the 'DTU_measure' (check the vignette for details). 
sort_by_tr 
"gene" for sorting results according to genelevel significance (i.e., p.value); "transcript" for sorting results according to transcriptlevel significance (i.e., p.value). 
gene_id 
a character string or vector indicating the gene or genes whose results should be retrieved. 
transcript_id 
a character string or vector indicating the transcript or transcripts whose results should be retrieved. 
CI 
a logical element indicating whether to also plot confidence boundaries (TRUE) or not (FALSE). 
CI_level 
a number between 0 and 1, indicating the level of the confidence interval to plot. 
show(object)
: prints the number of gene and transcript level results in the BANDITS_test
object.
top_genes(x, n = Inf, sort_by_g = "p.value")
: returns the genelevel results of the DTU test for the top 'n' significant genes.
By default n = Inf and all results will be reported.
sort_by_g = "gene" for sorting results according to genelevel significance; sort_by_g = "DTU_measure" for sorting results according to the 'DTU_measure'.
top_transcripts(x, n = Inf, sort_by_tr = "gene")
: returns the transcriptlevel results of the DTU test for the top 'n' significant genes.
By default n = Inf and all results will be reported.
sort_by_tr = "gene" for sorting results according to genelevel significance; sort_by_tr = "transcript" for sorting results according to transcriptlevel significance.
convergence(x)
: returns the convergence diagnostic of the posterior MCMC chains for every gene.
gene(x, gene_id)
: returns a list with all results for the gene(s) specified in 'gene_id': gene results, corresponding transcript results and convergence diagnostic.
transcript(x, transcript_id)
: returns a list with all results for the trancript specified in 'transcript_id': transcript results, corresponding gene results and convergence diagnostic.
plot_proportions(x, gene_id, CI = TRUE, CI_level = 0.95)
: plots the posterior means of the average transcripts
relative expression (i.e., the proportions) of each condition, for the gene specified in 'gene_id'.
If 'CI' is TRUE, a profile Wald type confidence interval will also be plotted for each transcript estimated proportion;
the level of the confidence interval is specified by 'CI_level'.
Gene_results
a data.frame
containing the genelevel results of the DTU test, structured in the following columns:
Gene_id contains the gene names;
p.values is the genelevel p.values of the DTU test;
adj.p.values is the BenjaminiHochberg adjusted p.values (via p.adjust
);
p.values_inverted (only available for 2group comparisons) is a conservative p.value, accounting for the inversion of the dominant transcript between conditions: p.values_inverted = p.values, if the dominant transcript varies between conditions, and p.values_inverted = sqrt( p.values ) if both conditions have the same dominant transcript;
adj.p.values_inverted (only available for 2group comparisons) is the BenjaminiHochberg adjusted p.values_inverted, via p.adjust
;
DTU_measure (only available for 2group comparisons) represents a measure of the intensity of changes between conditions. This measure ranges between 0, when proportions are identical between groups, and 2, when an isoform is always expressed in group A and a different transcript is always chosen in group B;
Mean logprec "group_name" indicates the posterior mean of the logarithm of the Dirichlet precision parameter in group "group_name". The precision parameter models the degree of overdispersion between samples: the higher the precision parameter (or its logarithm), the lower the sampletosample variability.
SD logprec "group_name" indicates the standard deviation of the logarithm of the Dirichlet precision parameter in group "group_name".
Transcript_results
a data.frame
containing the transcriptlevel results of the DTU test, structured in the following columns:
Gene_id contains the gene names;
Transcript_id contains the transcript names;
p.values is the transcriptlevel p.values of the DTU test;
adj.p.values is the BenjaminiHochberg adjusted p.values (via p.adjust
);
Max_Gene_Tr.p.val is a conservative p.value and represents the maximum between the transcript p.value and corresponding gene p.value;
Max_Gene_Tr.Adj.p.val is the BenjaminiHochberg adjusted Max_Gene_Tr.p.val (via p.adjust
);
Mean "group_name" indicates the posterior mean of the average relative abundance of the transcript in group "group_name"
(an NaN
value indicates that no data was available for a group to estimate parameters);
SD "group_name" indicates the standard deviation of the average relative abundance of the transcript in group "group_name"
(an NaN
value indicates that no data was available for a group to estimate parameters);
this column indicates the variability in the mean estimate and is used to plot a
Wald type confidence interval for the mean relative abundance via plot_proportions
.
Convergence
a data.frame
containing the convercence diagnostics of the DTU test, structured in the following columns:
Gene_id contains the gene names;
converged is 1 if convergence was reached, 0 otherwise;
burn_in indicates what fraction of the chain was removed to ensure convergence
(excluding the burn_in
parameter specified in test_DTU
.
samples_design
a data.frame
containing the design of the experiment, with one row for each sample
and two columns with names 'sample_id' and 'group', specifying the id and group of each sample, respectively.
It is provided by the user to test_DTU
.
Simone Tiberi simone.tiberi@uzh.ch
test_DTU
, create_data
, BANDITS_data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32  # load the precomputed results:
data("results", package = "BANDITS")
show(results)
# Visualize the most significant Genes, sorted by gene level significance.
head(top_genes(results))
# Alternatively, genelevel results can also be sorted according to DTU_measure,
# which is a measure of the strength of the change between the
# average relative abundances of the two groups.
head(top_genes(results, sort_by = "DTU_measure"))
# Visualize the most significant transcripts, sorted by transcript level significance.
head(top_transcripts(results, sort_by = "transcript"))
# Visualize the convergence output for the most significant genes,
# sorted by gene level significance.
head(convergence(results))
# We can further use the 'gene' function to gather all output for a specific gene:
# gene level, transcript level and convergence results.
top_gene = top_genes(results, n = 1)
gene(results, top_gene$Gene_id)
# Similarly we can use the 'transcript function to gather all output
# for a specific transcript.
top_transcript = top_transcripts(results, n = 1)
transcript(results, top_transcript$Transcript_id)
#Finally, we can plot the estimated average transcript relative expression
# in the two groups for a specific gene via 'plot_proportions'.
plot_proportions(results, top_gene$Gene_id)

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