Functional Microbiome Representation
Source:R/AllClasses.R, R/ConsortiumMetabolism.R
ConsortiumMetabolism.RdCreates a ConsortiumMetabolism object
representing metabolic interactions in a microbial community.
The object stores metabolite consumption and production by
different species, along with flux sums and effective fluxes.
Usage
ConsortiumMetabolism(
data,
name = NA_character_,
growth = NULL,
species_col = "species",
metabolite_col = "metabolite",
flux_col = "flux",
verbose = FALSE
)Arguments
- data
a data.frame with columns for species, metabolites and fluxes. Fluxes can be weighted or unweighted (magnitude 1).
- name
Character scalar giving the consortium name.
- growth
Optional named numeric vector of per-species growth rates (e.g. FBA objective values). Names must match species in
data. Stored inmetadata(cm)$growthand retrievable via thegrowthaccessor.- species_col
Character scalar for the species column name, defaults to
"species".- metabolite_col
Character scalar for the metabolite column name, defaults to
"metabolite".- flux_col
Character scalar for the flux column name, defaults to
"flux".- verbose
Logical scalar. If
TRUE, prints progress messages during construction. Defaults toFALSE.
Slots
Namecharacter. Display name for the consortium.
Descriptioncharacter. Optional short description.
Pathwaysdata.frame. Pathway list of metabolic interactions with per-pathway metrics (species count, flux sums, flux-corrected effective fluxes, and Hill-1 effective number of contributing species).
Weightedlogical. Whether flux magnitudes are used.
InputDatadata.frame. Original input data (species, metabolite, flux columns).
Metabolitescharacter. Unique metabolite identifiers.
Graphslist. List containing an igraph object of the metabolic network.
Examples
cm <- synCM("example", n_species = 3, max_met = 5)
cm
#>
#> ── ConsortiumMetabolism
#> Name: "example"
#> Weighted metabolic network: 3 species, 3 metabolites, 4 pathways.
#> Pathways per species: min 1, mean 1.3, max 2.