Ejemplo n.º 1
0
 def __getitem__(self, name):
     if name == 'completed-iso-plates' and self.iso_type == ISO_TYPES.LAB:
         # These are the plates that can be used as input for experiment
         # job scheduling.
         iso_plate_bcs = []
         for iso in self.isos:
             if iso.status == ISO_STATUS.DONE:
                 for plt in self.__get_completed_iso_plates_for_iso(iso):
                     iso_plate_bcs.append(plt.barcode)
         iso_plates = get_root_collection(IPlate)
         iso_plates.filter = cntd(barcode=iso_plate_bcs)
         result = iso_plates
     else:
         result = Member.__getitem__(self, name)
     return result
Ejemplo n.º 2
0
Archivo: iso.py Proyecto: papagr/TheLMA
 def __getitem__(self, name):
     if name == 'completed-iso-plates' and self.iso_type == ISO_TYPES.LAB:
         # These are the plates that can be used as input for experiment
         # job scheduling.
         iso_plate_bcs = []
         for iso in self.isos:
             if iso.status == ISO_STATUS.DONE:
                 for plt in self.__get_completed_iso_plates_for_iso(iso):
                     iso_plate_bcs.append(plt.barcode)
         iso_plates = get_root_collection(IPlate)
         iso_plates.filter = cntd(barcode=iso_plate_bcs)
         result = iso_plates
     else:
         result = Member.__getitem__(self, name)
     return result
Ejemplo n.º 3
0
 def __getitem__(self, name):
     if name == 'tags':
         tags_dict = {}
         design_racks = self.__get_design_racks()
         for rack in design_racks:
             for tp in rack.rack_layout.tagged_rack_position_sets:
                 for tag in tp.tags:
                     tags_dict[tag.get_entity().slug] = tag
         tag_coll = get_root_collection(ITag)
         tag_coll.filter = cntd(id=[tag.id for tag in tags_dict.values()])
         result = tag_coll
     elif name == 'experiment-design-racks':
         result = self.__get_design_racks()
     else:
         result = Member.__getitem__(self, name)
     return result
Ejemplo n.º 4
0
 def __getitem__(self, name):
     if name == 'tags':
         tags_dict = {}
         design_racks = self.__get_design_racks()
         for rack in design_racks:
             for tp in rack.rack_layout.tagged_rack_position_sets:
                 for tag in tp.tags:
                     tags_dict[tag.get_entity().slug] = tag
         tag_coll = get_root_collection(ITag)
         tag_coll.filter = cntd(id=[tag.id for tag in tags_dict.values()])
         result = tag_coll
     elif name == 'experiment-design-racks':
         result = self.__get_design_racks()
     else:
         result = Member.__getitem__(self, name)
     return result