-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
219 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
class SensitivityAnalysis(object): | ||
def __init__(self,model=None,sbml=False,conservedMoietyAnalysis=True): | ||
self._model = model | ||
self._sbml = sbml | ||
self._conservedMoietyAnalysis = conservedMoietyAnalysis | ||
self._filename = None | ||
self._simulation = None | ||
self._bounds = None | ||
self._args = None | ||
self._allowLog = False | ||
|
||
|
||
@property | ||
def model(self): | ||
return self._model | ||
|
||
@model.setter | ||
def model(self, value): | ||
self._model = value | ||
|
||
@model.deleter | ||
def model(self): | ||
del self._model | ||
|
||
@property | ||
def sbml(self): | ||
return self._sbml | ||
|
||
@sbml.setter | ||
def sbml(self, value): | ||
self._sbml = value | ||
|
||
@sbml.deleter | ||
def sbml(self): | ||
del self._sbml | ||
|
||
@property | ||
def conservedMoietyAnalysis(self): | ||
return self._conservedMoietyAnalysis | ||
|
||
@conservedMoietyAnalysis.setter | ||
def conservedMoietyAnalysis(self, value): | ||
self._conservedMoietyAnalysis = value | ||
|
||
@conservedMoietyAnalysis.deleter | ||
def conservedMoietyAnalysis(self): | ||
del self._conservedMoietyAnalysis | ||
|
||
|
||
@property | ||
def simulation(self): | ||
return self._simulation | ||
|
||
@simulation.setter | ||
def simulation(self, value): | ||
self._simulation = value | ||
|
||
@simulation.deleter | ||
def simulation(self): | ||
del self._simulation | ||
|
||
|
||
@property | ||
def filename(self): | ||
return self._filename | ||
|
||
@filename.setter | ||
def filename(self, value): | ||
self._filename = value | ||
|
||
@filename.deleter | ||
def filename(self): | ||
del self._filename | ||
|
||
|
||
@property | ||
def bounds(self): | ||
return self._bounds | ||
|
||
@bounds.setter | ||
def bounds(self, value): | ||
self._bounds = value | ||
|
||
@bounds.deleter | ||
def bounds(self): | ||
del self._bounds | ||
|
||
@property | ||
def args(self): | ||
return self._args | ||
|
||
@args.setter | ||
def args(self, value): | ||
self._args = value | ||
|
||
@args.deleter | ||
def args(self): | ||
del self._args | ||
|
||
@property | ||
def allowLog(self): | ||
return self._allowLog | ||
|
||
@allowLog.setter | ||
def allowLog(self, value): | ||
self._allowLog = value | ||
|
||
@allowLog.deleter | ||
def allowLog(self): | ||
del self._allowLog | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class Simulator: | ||
def __init__(self): | ||
self.computed_vales = {} | ||
|
||
def pre_simulation(self,model_roadrunner): | ||
model_roadrunner.simulate(0,1000,5000) | ||
|
||
def simulate_sensitivity(self, model_roadrunner): | ||
self.push("r1b_k2",model_roadrunner.getCC('PP_K', 'r1b_k2')) | ||
self.push("r8_a8",model_roadrunner.getCC('PP_K', 'r8a_a8')) | ||
self.push("r10a_a10",model_roadrunner.getCC('PP_K', 'r10a_a10')) | ||
|
||
def push(self, key, value): | ||
self.computed_vales[key] = value | ||
|
||
def get_computed_values(self): | ||
return(self.computed_vales) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters