hyp: Identifies hypothesis for differentially regulated reactions...

Description Usage Arguments Value Examples

Description

hyp() is the main driver for differential analysis. It will perform the following steps:

  1. Transform normal and disease to approximations for relative enzyme activities (not if type = "raw") by inversion.

  2. Calculate enzyme activity inter- and intra group log-fold changes and credible intervals.

  3. Estimate the dispersions with an empirical Bayes approximation and use this to extract significance.

  4. If type is "fva", it will perform a flux variability analysis to see whether differences can be due to variation in the fluxes alone.

Usage

1
2
3
hyp(reacts, samples, ma_terms, fluxes = NA, type = "bias",
  correction_method = "BH", cred_level = 0.95, sorted = TRUE,
  obj = NULL, v_min = 1e-16, alpha = 1, full = FALSE)

Arguments

reacts

The reaction list.

samples

A factor or character string with either "normal" and "disease" entries or a single element named "ratio" if mass-action terms and fluxes are disease/normal ratios. Only required for type "exact".

ma_terms

A matrix or data frame containing the metabolic in the columns.

fluxes

Pre-compputed or measured fluxes with the same classification as in samples.

type

The type of analysis to be performed. Either 'bias', 'exact', 'fva' or 'raw' for a pass-through option.

correction_method

A correction method for the multiple test p-values. Takes the same arguments as the method argument in p.adjust.

cred_level

The confidence level for the confidence intervals. Defaults to 95%.

sorted

Whether the results should be sorted by p-value and mean log-fold change.

obj

Only needs to be set if type = 'fva'. Defines the objective reaction whose flux is maximized. Can be any of the acceptable formats for fba. The, probably, easiest import format is a single number denoting the index of the reaction that is the objective.

v_min

The smallest allowed flux for each reaction for all reactions. Must be >=0. Can be of length 1 or ncol(S). Set larger than zero to enforce a non-zero flux through a set of reactions.

alpha

The minimum fraction of maximum objective value required during flux variability analysis. The default is 100% of optimum.

full

If TRUE also returns the individual log fold changes along with the differential regulation data.

Value

If full is FALSE only returns the generated hypothesis as a data frame. This is a data frame with the following columns:

idx

The index of the reaction.

name

The name of the reaction/enzyme.

reaction

The actual reaction, e.g. A <=> B + C.

type

What type of regulation, "up", "down" or "same".

sd_normal

Standard deviation of the log2-fold changes between samples from the normal group.

sd_disease

Standard deviation of the log2-fold changes between samples of the disease vs normal group.

mean_log_fold

The mean log2-fold change between the disease and normal group.

ci_low, ci_high

The bayesian credible interval for the confidence level given by cred_level. Those are calculated using the bayesian bootstrap.

pval

The empricial Bayes estimate of the p-values.

corr_pval

The p-values corrected for multiple testing.

fva_log_fold

Only if type = "fva". The largest absolute log-fold change that can be explained by flux variability alone.

If full is TRUE returns a list of generated hypothesis and the individual log fold changes between all reference basis and between reference and treatments. The full output will be a list with following elements:

hyp

The generated hypotheses together with statistics and reactions.

lfc_normal

The log2-fold changes of enzyme activity within the normal group for each of the irreversible reactions. Those are never sorted, so the first entry corresponds to the first reaction, etc.

lfc_disease

The log2-fold changes of enzyme activity within between the disease and normal group for each of the irreversible reactions. Also never sorted.

lfc_va

Only if type=='fva'. The maximum log2-fold changes for the fluxes obtained by flux variability analysis. Also never sorted.

fva

Only if type=='fva'. The flux bounds obtained from flux variability analysis.

Examples

1
2
3
4
5
6
data(eryth)
n <- length(make_irreversible(eryth))
ma_terms <- matrix(runif(6 * n), ncol=6)
samples <- rep(c("normal", "disease"), each = 3)
h <- hyp(eryth, samples, ma_terms)
head(h)

cdiener/dycone documentation built on May 13, 2019, 2:41 p.m.