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_EXTRAC_CALC, compute_metric_foreach_qlwell_channel plate_metrics = plate.metrics[0] compute_metric_foreach_qlwell_channel(qlplate, plate_metrics, DEFAULT_EXTRAC_CALC) except: import sys, traceback traceback.print_exc(file=sys.stdout) Session.rollback() return
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()
def backfill_plate(self, qlplate, plate_metric): from qtools.lib.metrics import compute_metric_foreach_qlwell_channel compute_metric_foreach_qlwell_channel(qlplate, plate_metric, CLUSTER_CONF_CALCULATOR)