Learn R Programming

sybilccFBA (version 2.0.0)

getRevFlux: getRevFlux

Description

Given flux of irreversible model the function finds foreward minus backward flux

Usage

getRevFlux(model, modirrev, fdirrev)

Arguments

model

An object of class modelorg.

modirrev

An object of class modelorg with only irreversible reactions.

fdirrev

fluxes of irreversible model

Value

return fluxes according to the reversible model

See Also

mod2irrev

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (model, modirrev, fdirrev) 
{
    fluxes = NULL
    for (r in (react_id(model))) {
        if (!react_rev(model)[react_id(model) == r]) {
            fluxes = rbind(fluxes, cbind(rxn = r, fwd = fdirrev[which(react_id(modirrev) == 
                r)], bwd = 0))
        }
        else {
            fluxes = rbind(fluxes, cbind(rxn = r, fwd = fdirrev[which(react_id(modirrev) == 
                paste(r, "_f", sep = ""))], bwd = fdirrev[which(react_id(modirrev) == 
                paste(r, "_b", sep = ""))]))
        }
    }
    return(fluxes)
  }
# }

Run the code above in your browser using DataLab