|
60 | 60 | "rxn12006","rxn12007","rxn12014","rxn12017","rxn12022","rxn12160","rxn12161",
|
61 | 61 | "rxn01267","rxn05294","rxn04656"]
|
62 | 62 |
|
63 |
| -#Base class for FBA packages |
| 63 | + |
64 | 64 | class GapfillingPkg(BaseFBAPkg):
|
65 |
| - def __init__(self,model): |
66 |
| - BaseFBAPkg.__init__(self,model,"gapfilling",{},{}) |
| 65 | + """ |
| 66 | +
|
| 67 | + """ |
| 68 | + def __init__(self, model): |
| 69 | + BaseFBAPkg.__init__(self, model, "gapfilling", {}, {}) |
67 | 70 | self.childpkgs["objective constraint"] = ObjConstPkg(model)
|
68 | 71 |
|
69 | 72 | def build_package(self,parameters):
|
@@ -131,9 +134,9 @@ def build_package(self,parameters):
|
131 | 134 | if highest_score < self.parameters["reaction_scores"][rxnid][gene]:
|
132 | 135 | highest_score = self.parameters["reaction_scores"][rxnid][gene]
|
133 | 136 | factor = 1-0.9*highest_score
|
134 |
| - if "reverse" in gapfilling_penalties[reaction]: |
| 137 | + if "reverse" in self.gapfilling_penalties[reaction]: |
135 | 138 | penalties[reaction.id]["reverse"] = factor*penalties[reaction.id]["reverse"]
|
136 |
| - if "forward" in gapfilling_penalties[reaction]: |
| 139 | + if "forward" in self.gapfilling_penalties[reaction]: |
137 | 140 | penalties[reaction.id]["forward"] = factor*penalties[reaction.id]["forward"]
|
138 | 141 | self.model.solver.update()
|
139 | 142 | if self.parameters["set_objective"] == 1:
|
|
0 commit comments