示例#1
0
    def command(self):
        app = self.load_wsgi_app()
        storage = QLStorageSource(app.config)

        if len(self.args) < 2:
            print self.__class__.usage
            return

        for i in range(0,len(self.args)-1):
            plate_id = int(self.args[i])
            plate = dbplate_tree(plate_id)
            try:
                plate_path = storage.plate_path(plate)
            except Exception, e:
                print "Could not read plate: %s" % plate_id
                continue

            qlplate = get_plate(plate_path)
            if not qlplate:
                raise ValueError, "Could not read plate: %s" % plate_path
            else:
                print "Processing %s" % plate_path

            try:
                from qtools.lib.metrics import DEFAULT_CNV_CALC, compute_metric_foreach_qlwell
                plate_metrics = plate.metrics[0]
                compute_metric_foreach_qlwell(qlplate, plate_metrics, DEFAULT_CNV_CALC)
            except Exception, e:
                import sys, traceback
                traceback.print_exc(file=sys.stdout)
                Session.rollback()
                return
示例#2
0
    def process_plate(self, qlplate, plate_metric):
        from qtools.lib.metrics import NEW_DROPLET_CLUSTER_METRICS_CALCULATOR, compute_metric_foreach_qlwell_channel
        from qtools.lib.metrics import NEW_DROPLET_CLUSTER_WELL_METRICS_CALCULATOR, compute_metric_foreach_qlwell

        compute_metric_foreach_qlwell_channel(qlplate, plate_metric, NEW_DROPLET_CLUSTER_METRICS_CALCULATOR)
        compute_metric_foreach_qlwell( qlplate, plate_metric, NEW_DROPLET_CLUSTER_WELL_METRICS_CALCULATOR)

        Session.commit()