def resolve_mapping_plate_well(self, source_type, labels): slot_labels = [make_unique_key(*l.split(":")) for l in labels] back_to_label = dict(it.izip(slot_labels, labels)) mapping = {} self.logger.info("start selecting %s" % source_type.get_ome_table()) # FIXME this is not going to scale objs = self.kb.get_objects(source_type) for o in objs: if o.containerSlotLabelUK in slot_labels: mapping[back_to_label[o.containerSlotLabelUK]] = o.id self.logger.info("done selecting %s" % source_type.get_ome_table()) return mapping
def build_key(r): lane = self.preloaded_lanes[r["lane"]] if r["tag"]: return make_unique_key(r["tag"], lane.label) else: return make_unique_key(lane.label)
def build_key(dc, r): data_collection = dc data_sample = self.preloaded_data_samples[r['data_sample']] return make_unique_key(data_collection.id, data_sample.id)
def build_key(r): flow_cell = self.preloaded_flowcells[r['flow_cell']] return make_unique_key(flow_cell.label, r['slot'])
def build_key(dc, r): data_collection = dc data_sample = self.preloaded_data_samples[r['data_sample']] return make_unique_key(data_collection.id, data_sample.id)
def build_key(r): plate = self.preloaded_plates[r['plate']] return make_unique_key(plate.label, r['label'])
def build_key(vc, r): vessels_collection = vc vessel = self.preloaded_vessels[r['vessel']] return make_unique_key(vessels_collection.id, vessel.id)
def build_key(r): lane = self.preloaded_lanes[r['lane']] if r['tag']: return make_unique_key(r['tag'], lane.label) else: return make_unique_key(lane.label)
def build_key(r): plate = self.preloaded_plates[r['plate']] return make_unique_key(plate.label, r['label'])
def build_key(vc, r): vessels_collection = vc vessel = self.preloaded_vessels[r['vessel']] return make_unique_key(vessels_collection.id, vessel.id)
def build_key(r): flow_cell = self.preloaded_flowcells[r['flow_cell']] return make_unique_key(flow_cell.label, r['slot'])