calc_inoc_matrix_from_metaData: Calculate an inoculation matrix

View source: R/experimental_design.R

calc_inoc_matrix_from_metaDataR Documentation

Calculate an inoculation matrix

Description

The function calculates an inoculation matrix based on the choosen inoculum-to-substrate ratio (InocToSubRatio) of a BGF. To this end, the reactor volume and the concentrations of organics in inoculum and substrate should be known. Most commonly, this concentration is provided as total solutes, organic total solutes or chemical oxygen demand of inoculum and substrate.

Usage

calc_inoc_matrix_from_metaData(
  x,
  col,
  reactor = 400,
  ISRatio = NULL,
  VSInoc = NULL,
  subset = NULL,
  digits = 2
)

Arguments

x

a BGF

col

either a character or an integer specifying which column of the metaData layer provides information about the organics concentration of the fermentations.

reactor

a numeric providing the total filling volume or mass of the liquid phase of the biogas reactors; default = 400

ISRatio

default = NULL; if specified a numeric is expected, providing the inoculum to substrate ratio of a biogas fermentation. If left to the default, a value is extracted from the ExpParam layer of the BGF

VSInoc

NOT WORKING default = NULL; can be specified if the BGF does not contain any 'Blanks' (get_blanks returns 'R'). If specified, either a integer or character is expected that refers to the row in the metaData layer from which to take the organics concentration of the inoculum. If left the default, the same organics concentration is assumed for inoculum and substrate

subset

default = NULL; if specified, a character vector is expected, declaring a subset of fermentation by their respective row name within the metaData layer of the BGF

digits

argument passed to round; default = 2

Details

The function calc_inoc_matrix_from_metaData is meant to build a bridge between data analysis in R and experimental work in the lab. Furthermore, this function should support the design of real world biogas batch-fermentations, so it is usually used on a BGF before the data of the BioGasData layer has been generated.

The BGF this function is used on should have the concentration of organics of inoculum and substrate in its metaData layer. In a biogas fermentation, the term 'inoculum' refers to the source of biogas producing organisms, while the term 'substrate' refers to the source material these organisms produce the biogas from.

To achieve high comparability in between experiments, fermentations should be started based on the same inoculum-to-substrate ratio. Furthermore, if the concentration of organics in inoculum and substrate are known, the inoculum-to-substrate ratio can be used to calculate the amount of biogas produced from the inoculum and substrate fraction of a biogas reactor.

This allows the calculation of substrate specific biogas potentials.

Value

a data.frame; the inoculation matrix to set up a biogas fermentation (series)

Examples

# create an example BGF
myBGF<-BGF(
        ReactorLayout = c("2*Blank","Cellulose","3*neg ctrl","3*FR1","3*FR2","3*FR3"),
        BlankLabel = "Blank",
        name = "myBGF",
        ProcessTemp = 52,
        InocToSubRatio = 2,
        MeasurementType = "manuel")

# add organic total solutes measurement for each biogas fermentation to 'metaData' layer
myBGF<-add_metaData(
        x = myBGF,
        what = c(3.63,3.63,98,1.65,1.65,1.65,1.76,1.76,1.76,1.57,1.57,1.57,1.68,1.68,1.68),
        lab = "oTS")

# calculate ionoculation matrix for all or a subset of fermentations
InocMatrix<-calc_inoc_matrix_from_metaData(myBGF,"oTS")
InocMatrix_subset<-calc_inoc_matrix_from_metaData(myBGF,"oTS",subset = c("R5","R12","R9"))

# create a second example BGF without a 'Blank'
myBGF2<-BGF(LETTERS[1:5],"Blank","myBGF2",80,.1,"manuel")

# add organic total solutes to 'metaData' layer
myBGF2<-add_metaData(myBGF2,what = c(3.63,2.9,3.1,4.19,1.53),lab = "oTS")
InocMatrix_2<-calc_inoc_matrix_from_metaData(myBGF2,4,2000)
InocMatrix_2_fixed<-calc_inoc_matrix_from_metaData(myBGF2,4,2000,VSInoc=5)


bgfanalyzer documentation built on Sept. 26, 2026, 5:07 p.m.