LCSB-BioCore / COBREXA.jl

Constraint-Based Reconstruction and EXascale Analysis
https://lcsb-biocore.github.io/COBREXA.jl/
Apache License 2.0
42 stars 8 forks source link

pFBA pipe #747

Closed stelmo closed 1 year ago

stelmo commented 1 year ago

Adds a basic pipe-able pFBA variant. Should play nicely with more interesting model types, e.g. enzyme constrained etc.

gm_changed_bound =
    model |>
    with_changed_bound("BIOMASS_Ecoli_core_w_GAM", lower_bound = growth_lb) |>
    with_enzyme_constraints(
        gene_product_mass_group_bound = Dict(
            "uncategorized" => total_gene_product_mass,
        ),
    )

pfba_sol =
  gm_changed_bound |>
  with_parsimonious_solution(:enzyme) |>
  flux_balance_analysis(Clarabel.Optimizer)

@exaexa what do you think?

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 73.46% and project coverage change: +0.33 :tada:

Comparison is base (c3ee550) 88.30% compared to head (a58407a) 88.63%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #747 +/- ## ========================================== + Coverage 88.30% 88.63% +0.33% ========================================== Files 90 89 -1 Lines 2248 2262 +14 ========================================== + Hits 1985 2005 +20 + Misses 263 257 -6 ``` | [Impacted Files](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore) | Coverage Δ | | |---|---|---| | [src/analysis/flux\_balance\_analysis.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL2FuYWx5c2lzL2ZsdXhfYmFsYW5jZV9hbmFseXNpcy5qbA==) | `100.00% <ø> (+22.22%)` | :arrow_up: | | [src/analysis/minimize\_metabolic\_adjustment.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL2FuYWx5c2lzL21pbmltaXplX21ldGFib2xpY19hZGp1c3RtZW50Lmps) | `100.00% <ø> (ø)` | | | [src/analysis/modifications/generic.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL2FuYWx5c2lzL21vZGlmaWNhdGlvbnMvZ2VuZXJpYy5qbA==) | `60.00% <ø> (ø)` | | | [src/analysis/parsimonious\_flux\_balance\_analysis.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL2FuYWx5c2lzL3BhcnNpbW9uaW91c19mbHV4X2JhbGFuY2VfYW5hbHlzaXMuamw=) | `80.00% <ø> (ø)` | | | [src/wrappers/MatrixCoupling.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL01hdHJpeENvdXBsaW5nLmps) | `89.47% <ø> (ø)` | | | [src/wrappers/misc/MatrixModel.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL21pc2MvTWF0cml4TW9kZWwuamw=) | `100.00% <ø> (ø)` | | | [src/wrappers/misc/enzyme\_constrained.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL21pc2MvZW56eW1lX2NvbnN0cmFpbmVkLmps) | `100.00% <ø> (ø)` | | | [src/wrappers/misc/mmdf.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL21pc2MvbW1kZi5qbA==) | `100.00% <ø> (ø)` | | | [src/wrappers/misc/simplified\_enzyme\_constrained.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL21pc2Mvc2ltcGxpZmllZF9lbnp5bWVfY29uc3RyYWluZWQuamw=) | `100.00% <ø> (ø)` | | | [src/wrappers/MinimizeDistance.jl](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore#diff-c3JjL3dyYXBwZXJzL01pbmltaXplRGlzdGFuY2Uuamw=) | `57.69% <57.69%> (ø)` | | | ... and [11 more](https://codecov.io/gh/LCSB-BioCore/COBREXA.jl/pull/747?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LCSB-BioCore)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

stelmo commented 1 year ago

/format

github-actions[bot] commented 1 year ago

:heavy_check_mark: Auto-formatting triggered by this comment succeeded, commited as dabbe840a130f41693307836f448b90df5a42d05

stelmo commented 1 year ago

/format

github-actions[bot] commented 1 year ago

:heavy_check_mark: Auto-formatting triggered by this comment succeeded, commited as f916bfbd30c079b988fef2973d6159c512cba346

stelmo commented 1 year ago

NOTE: variables are not the semantic variables!

stelmo commented 1 year ago

this poses problems for MOMA too

stelmo commented 1 year ago

and also for pFBA in general