Ejemplo 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')
Ejemplo 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'))
Ejemplo 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')
Ejemplo 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__)
Ejemplo 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')
Ejemplo n.º 6
0
class PhasesMessage(Message):
    response = repeated(PhaseMessage)
Ejemplo n.º 7
0
 class Pet(Message):
     sounds = repeated(String())
Ejemplo n.º 8
0
 class IntegerList(Message):
     values = repeated(Integer())
Ejemplo n.º 9
0
 class M(dict):
     items = repeated(Field(str))
Ejemplo n.º 10
0
class SampleMessage(Message):
    id = repeated(Int(description='Sample IDs'))
    name = String(description='Sample name')
    organism = String(description='Organism short code')
Ejemplo n.º 11
0
class SampleInfoMessage(Message):
    genotype_changes = repeated(
        String(description='Gnomic strings for genotype changes'))
    measurements = repeated(MeasurementMessage)
    medium = repeated(MetaboliteMediumMessage)
Ejemplo n.º 12
0
class SampleModelsMessage(Message):
    response = repeated(String(description='Possible models for the sample'))
Ejemplo n.º 13
0
 class StringList(Message):
     values = repeated(String())
Ejemplo n.º 14
0
class SamplesMessage(Message):
    response = repeated(SampleMessage)
Ejemplo n.º 15
0
class ExperimentsMessage(Message):
    response = repeated(ExperimentMessage)
Ejemplo 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')
Ejemplo n.º 17
0
class MetabolitePhasePlaneMessage(Message):
    flux = repeated(
        Float32(description=
                'Measurement for the metabolite collected from experiment'))
    phase_planes: PhasePlanesMessage