Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

checkReactId

Check if a Reaction Id is Valid


Description

The function checkReactId evaluates a vector of reaction id's if they are unique and appear in a given model.

Usage

checkReactId(model, react)

Arguments

model

A model. An object of class modelorg, or a problem object of a lp solver.

react

Character vector containing reaction id's, or a numerical vector containing indices of reaction id's.

Details

If argument react is numeric, the maximun value will be inspected, if it is larger than the number of reactions in the model.

In case of a character vector, react is matched to the reaction id's residing in the model. If they are not found, grep is used.

If argument react is of class reactId, it will be returned without checking.

Value

An object of class reactId or NULL if argument react contains any reactions not in model.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

See Also

Examples

data(Ec_core)
 
  ## Example with react as character vector
  ids <- c("ATPM", "ACK")
  idc <- checkReactId(Ec_core, ids)

  ## Example with react as numerical vector
  ids <- c(1:4)
  idc <- checkReactId(Ec_core, ids)

sybil

Efficient Constrained Based Modelling

v2.1.5
GPL-3 | file LICENSE
Authors
Mayo Roettger [cre], Gabriel Gelius-Dietrich [aut], C. Jonathan Fritzemeier [ctb], Rajen Piernikarczyk [ctb], Marc Andre Daxer [ctb], Benjamin Braasch [ctb], Abdelmoneim Desouki [ctb], Martin J. Lercher [ctb]
Initial release
2019-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.