当前位置: 首页>>代码示例>>Python>>正文


Python metabolicmodel.MetabolicModel类代码示例

本文整理汇总了Python中psamm.metabolicmodel.MetabolicModel的典型用法代码示例。如果您正苦于以下问题:Python MetabolicModel类的具体用法?Python MetabolicModel怎么用?Python MetabolicModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MetabolicModel类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

 def setUp(self):
     # TODO use mock model instead of actual model
     self.database = DictDatabase()
     self.database.set_reaction("rxn_1", parse_reaction("=> |A|"))
     self.database.set_reaction("rxn_2", parse_reaction("(0.000001) |A| =>"))
     self.model = MetabolicModel.load_model(self.database, self.database.reactions)
     self.solver = cplex.Solver()
开发者ID:gitter-badger,项目名称:psamm,代码行数:7,代码来源:test_fastcore.py

示例2: setUp

    def setUp(self):
        self._database = DictDatabase()
        self._database.set_reaction('rxn_1', parse_reaction('A[e] => B[e]'))
        self._database.set_reaction('rxn_2', parse_reaction('B[e] => C[e]'))
        self._database.set_reaction('rxn_3', parse_reaction('B[e] => D[e]'))
        self._database.set_reaction('rxn_4', parse_reaction('C[e] => E[e]'))
        self._database.set_reaction('rxn_5', parse_reaction('D[e] => E[e]'))
        self._database.set_reaction('rxn_6', parse_reaction('E[e] =>'))
        self._database.set_reaction('ex_A', parse_reaction('A[e] <=>'))

        self._mm = MetabolicModel.load_model(
            self._database, self._database.reactions)
        self._assoc = {
            'rxn_1': boolean.Expression('gene_1'),
            'rxn_2': boolean.Expression('gene_2 or gene_3'),
            'rxn_5': boolean.Expression('gene_3 and gene_4')
        }
        self._obj_reaction = 'rxn_6'

        try:
            self._solver = generic.Solver()
        except generic.RequirementsError:
            self.skipTest('Unable to find an LP solver for tests')

        self._prob = fluxanalysis.FluxBalanceProblem(self._mm, self._solver)
开发者ID:spikeliu,项目名称:psamm,代码行数:25,代码来源:test_randomsparse.py

示例3: test_load_model_with_reaction_subset

    def test_load_model_with_reaction_subset(self):
        database = DictDatabase()
        database.set_reaction('rxn_1', parse_reaction('|A| => |B|'))
        database.set_reaction('rxn_2', parse_reaction('|B| => |C|'))
        database.set_reaction('rxn_3', parse_reaction('|C| => |D|'))
        model = MetabolicModel.load_model(database, {'rxn_1'})

        self.assertEqual(set(model.reactions), {'rxn_1'})
开发者ID:amenge,项目名称:psamm,代码行数:8,代码来源:test_metabolicmodel.py

示例4: setUp

 def setUp(self):
     # TODO use mock database instead of actual database
     self.database = DictDatabase()
     self.database.set_reaction("rxn_1", parse_reaction("=> (2) |A|"))
     self.database.set_reaction("rxn_2", parse_reaction("|A| <=> |B|"))
     self.database.set_reaction("rxn_3", parse_reaction("|A| => |D[e]|"))
     self.database.set_reaction("rxn_4", parse_reaction("|A| => |C|"))
     self.database.set_reaction("rxn_5", parse_reaction("|C| => |D[e]|"))
     self.database.set_reaction("rxn_6", parse_reaction("|D[e]| =>"))
     self.model = MetabolicModel.load_model(self.database, self.database.reactions)
开发者ID:gitter-badger,项目名称:psamm,代码行数:10,代码来源:test_metabolicmodel.py

示例5: setUp

 def setUp(self):
     self.database = DictDatabase()
     self.database.set_reaction('rxn_1', parse_reaction('=> (2) A[c]'))
     self.database.set_reaction('rxn_2', parse_reaction('A[c] <=> B[c]'))
     self.database.set_reaction('rxn_3', parse_reaction('A[c] => D[e]'))
     self.database.set_reaction('rxn_4', parse_reaction('A[c] => C[c]'))
     self.database.set_reaction('rxn_5', parse_reaction('C[c] => D[e]'))
     self.database.set_reaction('rxn_6', parse_reaction('D[e] =>'))
     self.model = MetabolicModel.load_model(
         self.database, self.database.reactions)
开发者ID:keitht547,项目名称:psamm,代码行数:10,代码来源:test_gapfilling.py

示例6: setUp

    def setUp(self):
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction('=> (2) |A|'))
        self.database.set_reaction('rxn_2', parse_reaction('|A| <=> |B|'))
        self.database.set_reaction('rxn_3', parse_reaction('|A| => |D|'))
        self.database.set_reaction('rxn_4', parse_reaction('|A| => |C|'))
        self.database.set_reaction('rxn_5', parse_reaction('|C| => |D|'))
        self.database.set_reaction('rxn_6', parse_reaction('|D| =>'))

        model = MetabolicModel.load_model(self.database, self.database.reactions)
        self.model = FlipableModelView(model)
开发者ID:keitht547,项目名称:psamm,代码行数:11,代码来源:test_metabolicmodel.py

示例7: setUp

 def setUp(self):
     self.database = DictDatabase()
     self.database.set_reaction('rxn_1', parse_reaction('=> (2) |A|'))
     self.database.set_reaction('rxn_2', parse_reaction('|A| <=> |B|'))
     self.database.set_reaction('rxn_3', parse_reaction('|A| => |D|'))
     self.database.set_reaction('rxn_4', parse_reaction('|A| => |C|'))
     self.database.set_reaction('rxn_5', parse_reaction('|C| => |D|'))
     self.database.set_reaction('rxn_6', parse_reaction('|D| =>'))
     self.model = MetabolicModel.load_model(
         self.database, self.database.reactions)
     self.solver = cplex.Solver()
开发者ID:gitter-badger,项目名称:psamm,代码行数:11,代码来源:test_fluxanalysis.py

示例8: setUp

    def setUp(self):
        # TODO use mock model instead of actual model
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction(
            '|A| + |B| => |C|'))
        self.database.set_reaction('rxn_2', parse_reaction(
            '|C| + |Z| => |A| + |B|'))
        self.model = MetabolicModel.load_model(
            self.database, self.database.reactions)

        self.solver = cplex.Solver()
开发者ID:gitter-badger,项目名称:psamm,代码行数:11,代码来源:test_massconsistency.py

示例9: setUp

    def setUp(self):
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction('|A| <=>'))
        self.database.set_reaction('rxn_2', parse_reaction('|A| <=> |B|'))
        self.database.set_reaction('rxn_3', parse_reaction('|C| <=> |B|'))
        self.database.set_reaction('rxn_4', parse_reaction('|C| <=>'))
        self.model = MetabolicModel.load_model(
            self.database, self.database.reactions)

        try:
            self.solver = generic.Solver()
        except generic.RequirementsError:
            self.skipTest('Unable to find an LP solver for tests')
开发者ID:keitht547,项目名称:psamm,代码行数:13,代码来源:test_fastcore.py

示例10: setUp

    def setUp(self):
        # TODO use mock model instead of actual model
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction('=> |A|'))
        self.database.set_reaction('rxn_2',
            parse_reaction('(0.000001) |A| =>'))
        self.model = MetabolicModel.load_model(
            self.database, self.database.reactions)

        try:
            self.solver = generic.Solver()
        except generic.RequirementsError:
            self.skipTest('Unable to find an LP solver for tests')
开发者ID:amenge,项目名称:psamm,代码行数:13,代码来源:test_fastcore.py

示例11: setUp

    def setUp(self):
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction('=> (2) |A|'))
        self.database.set_reaction('rxn_2', parse_reaction('|A| <=> |B|'))
        self.database.set_reaction('rxn_3', parse_reaction('|A| => |D|'))
        self.database.set_reaction('rxn_4', parse_reaction('|A| => |C|'))
        self.database.set_reaction('rxn_5', parse_reaction('|C| => |D|'))
        self.database.set_reaction('rxn_6', parse_reaction('|D| =>'))
        self.database.set_reaction('rxn_7', parse_reaction('|E| => |F|'))
        self.database.set_reaction('rxn_8', parse_reaction('|F| => |E|'))
        self.model = MetabolicModel.load_model(
            self.database, self.database.reactions)

        try:
            self.solver = generic.Solver(integer=True)
        except generic.RequirementsError:
            self.skipTest('Unable to find an MILP solver for tests')
开发者ID:ForkBackups,项目名称:psamm,代码行数:17,代码来源:test_fluxanalysis.py

示例12: setUp

    def setUp(self):
        self.database = DictDatabase()
        self.database.set_reaction('rxn_1', parse_reaction('|A| => |B|'))
        self.database.set_reaction('rxn_2', parse_reaction('|B| => |G|'))
        self.database.set_reaction('rxn_3', parse_reaction('|A| => |G|'))
        self.database.set_reaction('rxn_4', parse_reaction('|B| => |H|'))
        self.database.set_reaction('rxn_5', parse_reaction('|B| => |C| + |F|'))
        self.database.set_reaction('rxn_6', parse_reaction('|C| => |D|'))
        self.database.set_reaction('rxn_7', parse_reaction('|E| <=> |D|'))
        self.database.set_reaction('rxn_9', parse_reaction('|I| => |J|'))
        self.database.set_reaction('rxn_10', parse_reaction('|J| => |K|'))
        self.database.set_reaction('rxn_A', parse_reaction('=> |A|'))
        self.database.set_reaction('rxn_G', parse_reaction('|G| =>'))
        self.database.set_reaction('rxn_E', parse_reaction('|E| =>'))
        self.database.set_reaction(
            'rxn_bio', parse_reaction('|D| + (2.5) |F| =>'))
        self.model = MetabolicModel.load_model(
            self.database, self.database.reactions)

        try:
            self.solver = generic.Solver()
        except generic.RequirementsError:
            self.skipTest('Unable to find an LP solver for tests')
开发者ID:ForkBackups,项目名称:psamm,代码行数:23,代码来源:test_fluxcoupling.py


注:本文中的psamm.metabolicmodel.MetabolicModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。