Welcome to the sybilxf package. This package integrates Seahorse XF Analyzer data into the human metabolic model to generate flux predictions across the metabolic map. The method is described in:

Ramirez AK, Lynes MD, Shamsi F, Xue R, Tseng YH, Kahn CR, Kasif S, Dreyfuss JM. Integrating Extracellular Flux Measurements and Genome-Scale Modeling Reveals Differences between Brown and White Adipocytes. Cell Rep 2017 Dec; 21(11): 3040-3048.

Please cite this paper if you use the package. The package flow is:

1) Seahorse instrument: perform the actual measurements and return the data in a proprietary format. 2) Seahorse WAVE software: parse the data, perform normalization, and output the summarized data based on the user-defined experimental design. 3) Our software: perform metabolic modeling and make predictions.

To load the package, use

library("sybilxf")

The sybilxf package begins with the summarized table of measurements returned by Seahorse's WAVE software. There is an example table for white adipocytes (WA) and brown adipocytes (BA) provided with the package. We worked on two immortalized cell lines (one white cell line and one brown cell line), so our table is summarized over technical replicates. You can load it it via:

data("seahorse_data")

The first few rows look like:

knitr::kable(head(seahorse_data, 6))

You also must load a metabolic model. We have included Recon_21A_reduced, which is the model subset to those reactions that are feasible under the Seahorse media. You can load it via:

data("Recon_21A_reduced")

Summarize the WAVE output and convert to flux balance analysis (FBA) units with:

seahorse_summarized <- summarize_seahorse(seahorse_data)
seahorse_cu <- convert_units(seahorse_summarized)

The first few columns of seahorse_cu looks like:

knitr::kable(seahorse_cu[,1:8])

We sample from a normal distribution with the mean and standard deviation as that of the summarized Seahorse data for each of brown and white adipocytes. For speed, we only draw a few samples. For reproducibility, we also set the seed.

set.seed(0)
nsamples <- 5
ba_sampled <- sample_seahorse(seahorse_cu, sample.nm = "BA", nsamples = nsamples)
wa_sampled <- sample_seahorse(seahorse_cu, sample.nm = "WA", nsamples = nsamples)

For metabolic modeling, we need to map these fluxes to the metabolic map, which we do with:

model.nm <- "2.1A"
ba_map <- map_seahorse(ba_sampled, model.nm=model.nm)
wa_map <- map_seahorse(wa_sampled, model.nm=model.nm)

Now we can predict the fluxes for this brown and white adipocytes with these Seahorse measurements. This requires a linear programming solver interface package recognized by sybil, such as glpkAPI, which requires installing the linear programming solver itself, such as GLPK. This can be sped up by registering a parallel backend with, for example:

library("doParallel")
cl <- makeCluster()
registerDoParallel(cl)

If we started a parallel backend we must stop it. The fluxes can be optimized using fluxPredict. This step can take quite a long time, depending on your optimizer and parallelization

ba_flux <- fluxPredict(Recon_21A_reduced, seahorse_data=ba_map, model.nm = model.nm)
wa_flux <- fluxPredict(Recon_21A_reduced, wa_map, model.nm = model.nm)
ad_flux_mat <- cbind(wa_flux, ba_flux)
colnames(ad_flux_mat) <- paste0(rep(c("wa", "ba"), each=nsamples), rep(1:nsamples, times=2))
stopImplicitCluster()

To compare the reactions statistically between tissues, we can use a t-test, or its nonparametric alternative, on each reaction to estimate p-values, and correct these using one of the p.adjust methods.

data("ad_flux_mat")
stat.tab <- data.frame(t(apply(ad_flux_mat, MARGIN=1, FUN=function(x){
  c(wa.avg=mean(x[1:nsamples]), ba.avg=mean(x[(nsamples+1):length(x)]), 
  p=suppressWarnings(t.test(x[1:nsamples], x[(nsamples+1):length(x)])$p.value))
})))
stat.tab$fdr <- p.adjust(stat.tab$p, method="BH")
stat.tab <- stat.tab[order(stat.tab$p),]

stat.tab should now have the most significantly different reactions between the two tissues at the top.



jdreyf/sybilxf documentation built on May 22, 2019, 4:41 p.m.