getRevFlux

Description

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

Usage

1
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

Author(s)

Abdelmoneim Amer Desouki

See Also

mod2irrev

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##---- 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)
  }