Esempio n. 1
0
class PhasePlaneMessage(Message):
    objective_upper_bound = repeated(
        Float32(description='Upper bound for theoretical yield objective'))
    objective_lower_bound = repeated(
        Float32(description='Lower bound for theoretical yield objective'))
    objective = repeated(Float32(description='Theoretical objective values'))
    objective_id = String(description='Objective reaction ID')
Esempio n. 2
0
        class QueryResponse(Message):
            class Meta:
                description = 'Information about pets'

            ids = repeated(Field(Pet, description='Bunch of pets'))
            pet = Field(Pet, description='The other pet')
            repeat = repeated(String(description='Bunch of strings'))
Esempio n. 3
0
class ModelRequestMessage(Message):
    sample_ids = repeated(Int(description='Sample IDs'))
    model_id = String(description='Model ID (f.e. iJO1366)')
    phase_id = Int(description='Phase ID')
    map = String(description='Name of map to show')
    method = String(description='Simulation method to run')
    with_fluxes = Bool(description='Add flux information to  the response')
    objective = String(description='Reaction ID to be set as objective')
Esempio n. 4
0
    def test_message_type_hints(self):
        class Pet(Message):
            sounds: List[str]
            size: float
            speed: int
            age: int

        self.assertIsInstance(Pet.__fields__, OrderedDict)
        self.assertEqual(('sounds', 'size', 'speed', 'age'),
                         tuple(Pet.__fields__.keys()))
        self.assertEqual(
            {
                'sounds': repeated(String(), name='sounds'),
                'size': Field(float, name='size'),
                'speed': Field(int, name='speed'),
                'age': Field(int, name='age')
            }, Pet.__fields__)
Esempio n. 5
0
class MeasurementMessage(Message):
    type = String(
        description=
        'The subject of the measurement, e.g. "compound", "protein" or "reaction"'
    )
    id = Int(
        description=
        'identifier associated with the measured subject, e.g. metabolite identifier'
    )
    name = String(description='In case of metabolite, human-readable name')
    db_name = String(
        description=
        'In case of xref data, the miriam name of the database, e.g. uniprot')
    mode = String(
        description='Quantification mode, e.g. "relative" or "quantitative"')
    measurements = repeated(
        Float32(description='Measurements taken during the experiment'))
    units = MapField(str, description='Units in which measurements are taken')
    rate = String(description='Rate')
Esempio n. 6
0
class PhasesMessage(Message):
    response = repeated(PhaseMessage)
Esempio n. 7
0
 class Pet(Message):
     sounds = repeated(String())
Esempio n. 8
0
 class IntegerList(Message):
     values = repeated(Integer())
Esempio n. 9
0
 class M(dict):
     items = repeated(Field(str))
Esempio n. 10
0
class SampleMessage(Message):
    id = repeated(Int(description='Sample IDs'))
    name = String(description='Sample name')
    organism = String(description='Organism short code')
Esempio n. 11
0
class SampleInfoMessage(Message):
    genotype_changes = repeated(
        String(description='Gnomic strings for genotype changes'))
    measurements = repeated(MeasurementMessage)
    medium = repeated(MetaboliteMediumMessage)
Esempio n. 12
0
class SampleModelsMessage(Message):
    response = repeated(String(description='Possible models for the sample'))
Esempio n. 13
0
 class StringList(Message):
     values = repeated(String())
Esempio n. 14
0
class SamplesMessage(Message):
    response = repeated(SampleMessage)
Esempio n. 15
0
class ExperimentsMessage(Message):
    response = repeated(ExperimentMessage)
Esempio n. 16
0
class MaximumYieldMessage(Message):
    growth_rate = repeated(
        Float32(description='Growth rates collected from the experiment'))
    metabolites = MapField(
        MetabolitePhasePlaneMessage,
        description='Data for the metabolites collected from the experiment')
Esempio n. 17
0
class MetabolitePhasePlaneMessage(Message):
    flux = repeated(
        Float32(description=
                'Measurement for the metabolite collected from experiment'))
    phase_planes: PhasePlanesMessage