Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sybil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
general
ccb
sybil
Commits
04f8b2d1
Commit
04f8b2d1
authored
9 years ago
by
Claus Jonathan Fritzemeier
Browse files
Options
Downloads
Patches
Plain Diff
documentation and minor row names changes
parent
b0703a39
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/sysBiolAlg_fbaEasyConstraintClass.R
+6
-4
6 additions, 4 deletions
R/sysBiolAlg_fbaEasyConstraintClass.R
man/sysBiolAlg_fbaEasyConstraint-class.Rd
+52
-8
52 additions, 8 deletions
man/sysBiolAlg_fbaEasyConstraint-class.Rd
with
58 additions
and
12 deletions
R/sysBiolAlg_fbaEasyConstraintClass.R
+
6
−
4
View file @
04f8b2d1
...
...
@@ -28,6 +28,9 @@
#------------------------------------------------------------------------------#
setClass
(
Class
=
"sysBiolAlg_fbaEasyConstraint"
,
representation
(
easyConstraint
=
"list"
),
contains
=
"sysBiolAlg"
)
...
...
@@ -137,7 +140,6 @@ setMethod(f = "initialize",
rub
<-
c
(
rub
,
easyConstraint
$
ub
)
}
}
browser
()
m
<-
Matrix
(
0
,
ncol
=
nCols
,
nrow
=
length
(
easyConstraint
$
react
))
...
...
@@ -150,7 +152,7 @@ setMethod(f = "initialize",
rtype
<-
c
(
rtype
,
easyConstraint
$
rtype
)
nRows
<-
nRows
+
length
(
easyConstraint
$
react
)
if
(
!
is.null
(
rowNames
)){
c
(
rowNames
,
paste0
(
"easyConstraint"
,
1
:
length
(
easyConstraint
$
react
)))
rowNames
<-
c
(
rowNames
,
paste0
(
"easyConstraint"
,
1
:
length
(
easyConstraint
$
react
)))
}
}
...
...
@@ -176,7 +178,7 @@ setMethod(f = "initialize",
rnames
=
rowNames
,
pname
=
probName
,
...
)
.Object
@
easyConstraint
<-
easyConstraint
if
(
!
is.null
(
writeProbToFileName
))
{
writeProb
(
problem
(
.Object
),
fname
=
as.character
(
writeProbToFileName
))
...
...
This diff is collapsed.
Click to expand it.
man/sysBiolAlg_fbaEasyConstraint-class.Rd
+
52
−
8
View file @
04f8b2d1
...
...
@@ -12,7 +12,7 @@
\alias{mtfEasyConstraint}
\alias{fbaEasyConstraint}
\title{Class \code{"sysBiolAlg_fbaEasyConstraint"} and \code{"sysBiolAlg_mtfEasyConstraint"}}
\title{Class \code{"sysBiolAlg_fbaEasyConstraint"} and
\cr Class
\code{"sysBiolAlg_mtfEasyConstraint"}}
\description{
The classes \code{sysBiolAlg_fbaEasyConstraint} \code{sysBiolAlg_mtfEasyConstraint} hold an object of class
...
...
@@ -35,12 +35,11 @@
\section{Slots}{
\describe{
Slots are the same as in the original MTF/FBA classes.
Slots are the same as in the original MTF/FBA classes. In addition, this
slot is implemented:\cr
In addition, this slot is implemented:
\item{\code{easyConstraint}:}{
List holding the information for the constraints (see details):
\item{\code{easyConstraint}}{
Named list holding the information for the constraints (see details):\cr
\itemize{
\item{\code{react}}{
List of numeric vectors. Values indicate, to which reaction the
...
...
@@ -116,10 +115,16 @@
The additional i-th EasyConstraint will be added as follows to the problem: \emph{to be checked.}
\deqn{%
\gamma
<=
v_{r
^
i} * (x_i)^
T <=
\delta
\gamma
_i \leq
v_{r
_
i} * (x_i)^
\mathrm{T} \leq
\delta
_i
}{
\code{lb} <= v_{\code{react[[i]]}
} * (x_i)^T <=
\code{ub}
gamma_i <= v_{r^i
} * (x_i)^T <=
delta_i
}
Here \eqn{r_i}{r_i} (= \code{easyConstraint$react[[i]]}) is a set of reaction
indices and \eqn{x_i}{x_i} (= \code{easyConstraint$x[[i]]}) is the
corresponding set of coefficients. \eqn{\gamma}{gamma} and \eqn{\delta}{delta}
are the vectors of lower and upper bounds for the constraints, respectively.
For the type of (in)equality (\eqn{\leq}{<=}, ...) see the text above for parameter
\code{rtype}.
}
...
...
@@ -145,6 +150,45 @@
\examples{
showClass("sysBiolAlg_fba")
# see package vignette for more comments
data(Ec_core)
# allow influx of Fumarate and restrict outflux of Fumarate and Glucose
lowbnd(Ec_core)[react_id(Ec_core) \%in\% c("EX_fum(e)")] <- -1000
uppbnd(Ec_core)[react_id(Ec_core) \%in\% c("EX_glc(e)", "EX_fum(e)")] <- 0
# see result
findExchReact(Ec_core)
optimizeProb(Ec_core)
# define easyConstraint to have the same influx for Glucose and Fumarate:
# EX_glc(e) = EX_fum(e)
# here we omit the upper and lower bound, hence they are set to zero.
ec <- list(
react=list(which(react_id(Ec_core) \%in\% c("EX_glc(e)", "EX_fum(e)"))),
x=list(c(1, -1)),
rtype="E")
# optimize
opt <- optimizeProb(Ec_core, algorithm=("fbaEasyConstraint"), easyConstraint=ec)
# check if fluxes are really the same:
fluxes(opt)[react_id(Ec_core) \%in\% c("EX_glc(e)", "EX_fum(e)")]
}
\keyword{classes}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment