Package 'METAFLUX'

Title: High-Performance Metabolic Flux Analysis from Bulk and Single-Cell RNA-seq Data
Description: A performance-optimized implementation of METAFlux for characterizing cellular metabolism from bulk and single-cell RNA-sequencing data. Uses genome-scale metabolic modeling with Human-GEM to derive 13,082 metabolic fluxes through flux balance analysis (FBA). Features parallel computing, Rcpp acceleration, and optimized algorithms for 10-20x faster computation.
Authors: Zaoqu Liu [aut, cre] , Yuefan Huang [aut], Kyle Tsai [aut]
Maintainer: Zaoqu Liu <[email protected]>
License: MIT + file LICENSE
Version: 2.2.0
Built: 2026-05-24 10:18:26 UTC
Source: https://github.com/Zaoqu-Liu/METAFlux

Help Index


Bulk test example

Description

Bulk test example

Usage

bulk_test_example

Format

A data frame with 58581 rows and 5 variables

Examples

data(bulk_test_example)

Calculate bootstrap mean expression for single cell data

Description

Calculate bootstrap mean expression for single cell data

Usage

calculate_avg_exp(myseurat, myident, n_bootstrap, seed)

Arguments

myseurat

Seurat object. METAFLUX will calculate on "data" slot

myident

Seurat idents for grouping.This will be a character string indicating the grouping of the seurat object

n_bootstrap

number of bootstrap

seed

random seed

Value

mean expression data


Calculate metabolic reaction scores (MRAS) for 13082 reactions

Description

Calculate metabolic reaction scores (MRAS) for 13082 reactions

Usage

calculate_reaction_score(data)

Arguments

data

gene expression data.1.The gene expression matrix should be gene by sample matrix where row names are human gene names (gene symbols), and column names should be sample names. Please note that METAFLUX does not support other gene IDs. 2.The input gene expression matrix should be normalized (e.g., log-transformed, etc.) before using METAFLUX. METAFLUX will not perform any normalization on expression data. 3.Gene expression data cannot have negative values.


This file contains the hams medium nutrients information

Description

This default file indicates the nutrients available in the medium. There are total 44 metabolites available. This file can be changed depending on users. We will allow users to define the medium profile based on their knowledge.

Usage

cell_medium

Format

A data frame with 44 rows and 2 variables:

metabolite

stands for name of nutrients available in the medium.

reaction_name

V2 stands for reaction ID of corresponding nutreints

Examples

data(cell_medium)

Final optimization step for flux calculation

Description

Final optimization step for flux calculation

Usage

compute_flux(mras, medium)

Arguments

mras

metabolic reaction activity scores

medium

input medium file which indicates the nutrients available in the medium. We provide 2 general mediums if you have no prior knowledge about your medium: cell line medium and human blood medium if prior knowledge is not available. Please see tutorial for more details.

Value

Calculated fluxes


Single-Cell RNA-seq Metabolic Flux Calculation

Description

Computes metabolic fluxes for single-cell RNA-seq data using community modeling.

Usage

compute_sc_flux(
  num_cell,
  fraction,
  fluxscore,
  medium,
  parallel = TRUE,
  n_cores = NULL,
  use_cpp = TRUE
)

Arguments

num_cell

Integer. Number of cell types or clusters.

fraction

Numeric vector. Fraction of each cell type (must sum to 1).

fluxscore

Matrix. Metabolic reaction activity scores (MRAS) from bootstrap sampling.

medium

Data frame. Medium profile specifying available nutrients.

parallel

Logical. Use parallel computing? (default: TRUE)

n_cores

Integer. Number of CPU cores (default: NULL = auto-detect, max 8)

use_cpp

Logical. Use C++ optimization? (default: TRUE)

Value

Data frame of metabolic fluxes for single-cell community model.


This file contains the hams medium nutrients information in human blood

Description

This default file indicates the nutrients available in the medium. There are total 44 metabolites available. This file can be changed depending on users. We will allow users to define the medium profile based on their knowledge.

Usage

human_blood

Format

A data frame with 44 rows and 2 variables:

metabolite

stands for name of nutrients available in the human blood.

reaction_name

tands for reaction ID of corresponding nutreints

Examples

data(human_blood)

Human-GEM Metabolic Model Data

Description

Human genome-scale metabolic model (Human-GEM) containing reaction, gene, and pathway information for metabolic flux analysis.

Usage

human_gem

Format

A data frame with 13,082 rows (reactions) and 16 variables:

#

Row number

ID

Reaction ID

NAME

Reaction name

EQUATION

Stoichiometric equation

EC-NUMBER

Enzyme Commission number

GENE ASSOCIATION

Gene-protein-reaction rule

LOWER BOUND

Lower flux bound

UPPER BOUND

Upper flux bound

OBJECTIVE

Objective function coefficient (1 for biomass)

COMPARTMENT

Cellular compartment

MIRIAM

MIRIAM annotations

SUBSYSTEM

Metabolic pathway/subsystem

REPLACEMENT ID

Alternative reaction ID

NOTE

Additional notes

REFERENCE

Literature references

CONFIDENCE SCORE

Reaction confidence score

Source

https://github.com/SysBioChalmers/Human-GEM

Examples

data(human_gem)
head(human_gem)

1648 exchange reactions:mathematical representation of uptake/secrete metabolites into the extracellular space

Description

1648 exchange reactions:mathematical representation of uptake/secrete metabolites into the extracellular space

Usage

nutrient_lookup_files

Format

1648 rows

Examples

data("nutrient_lookup_files")

single cell test seurat object example

Description

single cell test seurat object example

Usage

sc_test_example

Format

A toy example containing 350 cells(Tumor and T cells)

Examples

data(sc_test_example)