Example #1
0
class Workflow(Entity):
    """ Workflow, introduced in 3.5"""
    _URI = "configuration/workflows"
    _TAG = "workflow"

    name = StringAttributeDescriptor("name")
    status = StringAttributeDescriptor("status")
    protocols = NestedEntityListDescriptor('protocol', Protocol, 'protocols')
    stages = NestedEntityListDescriptor('stage', Stage, 'stages')
Example #2
0
class Step(Entity):
    "Step, as defined by the genologics API."

    _URI = 'steps'
    _PREFIX = 'stp'

    current_state = StringAttributeDescriptor('current-state')
    _reagent_lots = EntityDescriptor('reagent-lots', StepReagentLots)
    actions = EntityDescriptor('actions', StepActions)
    date_started = StringDescriptor('date-started')
    date_completed = StringDescriptor('date-completed')
    placements = EntityDescriptor('placements', StepPlacements)
    details = EntityDescriptor('details', StepDetails)
    step_pools = EntityDescriptor('pools', StepPools)
    program_status = EntityDescriptor('program-status', StepProgramStatus)
    reagents = EntityDescriptor('reagents', StepReagents)

    def advance(self):
        self.get()
        self.root = self.lims.post(uri="{0}/advance".format(self.uri),
                                   data=self.lims.tostring(
                                       ElementTree.ElementTree(self.root)))

    @property
    def reagent_lots(self):
        return self._reagent_lots.reagent_lots
Example #3
0
class ControlType(Entity):
    _URI = "controltypes"
    _TAG = "control-type"
    _PREFIX = 'ctrltp'

    name = StringAttributeDescriptor('name')
    supplier = StringDescriptor('supplier')
    archived = BooleanDescriptor('archived')
    single_step = BooleanDescriptor('single_step')
Example #4
0
class Protocol(Entity):
    """Protocol, holding ProtocolSteps and protocol-properties"""
    _URI = 'configuration/protocols'
    _TAG = 'protocol'

    name = StringAttributeDescriptor('name')
    steps = NestedEntityListDescriptor('step', ProtocolStep, 'steps')
    properties = NestedAttributeListDescriptor('protocol-property',
                                               'protocol-properties')
Example #5
0
class Automation(Entity):
    """Automation, holding Automation configurations"""
    _URI = 'configuration/automations'
    _TAG = 'automation'

    process_types = NestedEntityListDescriptor('process-type', Processtype,
                                               'process-types')
    string = NestedStringDescriptor('string')
    name = StringAttributeDescriptor('name')
    context = NestedStringDescriptor('context')
Example #6
0
class Containertype(Entity):
    "Type of container for analyte artifacts."

    _TAG = 'container-type'
    _URI = 'containertypes'
    _PREFIX = 'ctp'

    name = StringAttributeDescriptor('name')
    calibrant_wells = StringListDescriptor('calibrant-well')
    unavailable_wells = StringListDescriptor('unavailable-well')
    x_dimension = DimensionDescriptor('x-dimension')
    y_dimension = DimensionDescriptor('y-dimension')
class Controltype(Entity):
    """Control sample."""

    _URI = 'controltypes'
    _TAG = 'control-type'
    _PREFIX = 'ctrltp'

    name = StringAttributeDescriptor('name')
    supplier = StringDescriptor('supplier')
    catalogue_number = StringDescriptor('catalogue-number')
    website = StringDescriptor('website')
    concentration = StringDescriptor('concentration')
    archived = BooleanDescriptor('archived')
    single_step = BooleanDescriptor('single-step')
Example #8
0
class ProtocolStep(Entity):
    """Steps key in the Protocol object"""

    _TAG = 'step'

    name = StringAttributeDescriptor("name")
    type = EntityDescriptor('type', Processtype)
    permittedcontainers = NestedStringListDescriptor('container-type',
                                                     'container-types')
    queue_fields = NestedAttributeListDescriptor('queue-field', 'queue-fields')
    step_fields = NestedAttributeListDescriptor('step-field', 'step-fields')
    sample_fields = NestedAttributeListDescriptor('sample-field',
                                                  'sample-fields')
    step_properties = NestedAttributeListDescriptor('step_property',
                                                    'step_properties')
    epp_triggers = NestedAttributeListDescriptor('epp_trigger', 'epp_triggers')
Example #9
0
class Processtype(Entity):
    _TAG = 'process-type'
    _URI = 'processtypes'
    _PREFIX = 'ptp'

    def __init__(self, lims, uri=None, id=None, _create_new=False):
        super(Processtype, self).__init__(lims, uri, id, _create_new)
        self.parameters = ProcessTypeParametersDescriptor(self)

    name = StringAttributeDescriptor('name')
    field_definition = EntityListDescriptor('field-definition', Udfconfig)
    process_inputs = ProcessTypeProcessInputDescriptor()
    process_outputs = ProcessTypeProcessOutputDescriptor()
    process_type_attribute = NamedStringDescriptor('process-type-attribute')

    @property
    def process_input(self):
        return self.process_inputs[0]
Example #10
0
class ReagentType(Entity):
    """Reagent Type, usually, indexes for sequencing"""
    _URI = "reagenttypes"
    _TAG = "reagent-type"
    _PREFIX = 'rtp'

    category = StringDescriptor('reagent-category')
    name = StringAttributeDescriptor("name")

    def __init__(self, lims, uri=None, id=None):
        super(ReagentType, self).__init__(lims, uri, id)
        assert self.uri is not None
        self.root = lims.get(self.uri)
        self.sequence = None
        for t in self.root.findall('special-type'):
            if t.attrib.get("name") == "Index":
                for child in t.findall("attribute"):
                    if child.attrib.get("name") == "Sequence":
                        self.sequence = child.attrib.get("value")
Example #11
0
class ProtocolStep(Entity):
    """Steps key in the Protocol object"""

    _TAG = 'step'

    name = StringAttributeDescriptor("name")
    type = EntityDescriptor('process-type', Processtype)
    permittedcontainers = NestedStringListDescriptor('container-type',
                                                     'permitted-containers')
    permitted_control_types = NestedEntityListDescriptor(
        'control-type', ControlType, 'permitted-control-types')
    required_reagent_kits = NestedEntityListDescriptor(
        'reagent-kit', ReagentKit, 'required-reagent-kits')
    queue_fields = NestedAttributeListDescriptor('queue-field', 'queue-fields')
    step_fields = NestedAttributeListDescriptor('step-field', 'step-fields')
    sample_fields = NestedAttributeListDescriptor('sample-field',
                                                  'sample-fields')
    step_properties = NestedAttributeListDescriptor('step-property',
                                                    'step-properties')
    epp_triggers = NestedAttributeListDescriptor('epp-trigger', 'epp-triggers')
Example #12
0
class Stage(Entity):
    """Holds Protocol/Workflow"""
    name = StringAttributeDescriptor('name')
    index = IntegerAttributeDescriptor('index')
    protocol = EntityDescriptor('protocol', Protocol)
    step = EntityDescriptor('step', ProtocolStep)
Example #13
0
class Processtype(Entity):
    _TAG = 'process-type'
    _URI = 'processtypes'
    _PREFIX = 'ptp'

    name = StringAttributeDescriptor('name')