Beispiel #1
0
def test_metabolic_coverage(read_only_model):
    """
    Expect a model to have a metabolic coverage >= 1.

    The degree of metabolic coverage indicates the modeling detail of a
    given reconstruction calculated by dividing the total amount of
    reactions by the amount of genes. Models with a 'high level of modeling
    detail have ratios >1, and models with a low level of detail have
    ratios <1. This difference arises as models with basic or intermediate
    levels of detail are assumed to include many reactions in which several
    gene products and their enzymatic transformations are ‘lumped’.
    """
    ann = test_metabolic_coverage.annotation
    ann["metric"] = basic.calculate_metabolic_coverage(read_only_model)
    ann["message"] = wrapper.fill(
        """The degree of metabolic coverage is {:.2}.""".format(ann["metric"]))
    assert ann["metric"] >= 1, ann["message"]
Beispiel #2
0
def test_metabolic_coverage(model):
    u"""
    Expect a model to have a metabolic coverage >= 1.

    The degree of metabolic coverage indicates the modeling detail of a
    given reconstruction calculated by dividing the total amount of
    reactions by the amount of genes. Models with a 'high level of modeling
    detail have ratios >1, and models with a low level of detail have
    ratios <1. This difference arises as models with basic or intermediate
    levels of detail are assumed to include many reactions in which several
    gene products and their enzymatic transformations are ‘lumped’.

    Implementation:
    Divides the amount reactions by the amount of genes. Raises an error
    if the model does not contain either reactions or genes.

    """
    ann = test_metabolic_coverage.annotation
    ann["data"] = (len(model.reactions), len(model.genes))
    ann["metric"] = basic.calculate_metabolic_coverage(model)
    ann["message"] = wrapper.fill(
        """The degree of metabolic coverage is {:.2}.""".format(ann["metric"]))
    assert ann["metric"] >= 1, ann["message"]
Beispiel #3
0
def test_metabolic_coverage(model, coverage):
    """Expect a model to have high metabolic coverage."""
    metabolic_coverage = basic.calculate_metabolic_coverage(model)
    assert metabolic_coverage >= coverage
Beispiel #4
0
def test_metabolic_coverage(read_only_model, store):
    """Expect a model to have high metabolic coverage."""
    store["metabolic_coverage"] = \
        basic.calculate_metabolic_coverage(read_only_model)
    assert store["metabolic_coverage"] >= 1