Esempio n. 1
0
    def __display(self, rowcol_order=ROWCOL_ORDER_COL):
        c.assay_field = fl.sequence_group_name_field(blank=True, include_without_amplicons=True, empty='')
        c.class_decorator = icon_class_decorator
        c.re_field = fl.instock_enzyme_field()

        c.form = h.LiteralForm(
            value = {'rowcol_order': str(rowcol_order)},
            option = {'rowcol_order': [(ROWCOL_ORDER_ROW, 'By Row (Left->Right)'),
                                       (ROWCOL_ORDER_COL, 'By Column (Top->Bottom)')]}
        )

        if getattr(c, 'plate_setup_id', None):
            c.plate_setup = Session.query(PlateSetup).get(c.plate_setup_id)
        elif getattr(c, 'plate_template_id', None):
            c.plate_template = Session.query(PlateTemplate).get(c.plate_template_id)
        return render('/template/design.html')
Esempio n. 2
0
    def preview(self):
        template = os.path.basename(request.params.get('template'))
        # this is hacky, should be QLTStorageSource
        qlt_path = "%s/%s" % (config['qlb.setup_template_store'], template)

        factory = ExperimentMetadataObjectFactory()
        qlp = factory.parse_plate(qlt_path)
        c.wells = qlp.analyzed_wells
        c.original_source = None
        c.plate_template_id = None
        c.plate_setup_id = None
        c.id = None

        # this is ugly
        c.assay_field = {'value': '', 'options': [('','')]}
        c.class_decorator = lambda well: ''
        c.re_field = fl.instock_enzyme_field()

        c.form = h.LiteralForm(
            value = {'rowcol_order': str(ROWCOL_ORDER_ROW)},
            option = {'rowcol_order': [(ROWCOL_ORDER_ROW, 'By Row (Left->Right)')]}
        )
        c.preview_mode = True
        return render('/template/design.html')