BANDITS_test-class {BANDITS}R Documentation

BANDITS_test class

Description

BANDITS_test contains the results of the differential transcript usage (DTU) test. BANDITS_test is organized in three data.frames containing: gene-level results, transcript-level 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 log-posterior density; we use a 0.01 threshold on the p.value to reject the null hypotehsis of stationarity.

Usage

## 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)

Arguments

object, x

a 'BANDITS_test' object.

n

the number of genes or transcripts to report. By default n = Inf and all results will be reported.

sort_by_g

"p.value" for sorting results according to gene-level 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 gene-level significance (i.e., p.value); "transcript" for sorting results according to transcript-level 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.

Value

Slots

Gene_results

a data.frame containing the gene-level results of the DTU test, structured in the following columns:

Transcript_results

a data.frame containing the transcript-level results of the DTU test, structured in the following columns:

Convergence

a data.frame containing the convercence diagnostics of the DTU test, structured in the following columns:

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.

Author(s)

Simone Tiberi simone.tiberi@uzh.ch

See Also

test_DTU, create_data, BANDITS_data

Examples

# load the pre-computed results:
data("results", package = "BANDITS")
show(results)

# Visualize the most significant Genes, sorted by gene level significance.
head(top_genes(results))

# Alternatively, gene-level 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'.
library(ggplot2)
plot_proportions(results, top_gene$Gene_id)


[Package BANDITS version 1.0.0 Index]