Example #1
0
 def populate_free_pin(self):
     self.queue_model_hwobj.clear_model("free-pin")
     self.queue_model_hwobj.select_model("free-pin")
     sample = queue_model_objects.Sample()
     sample.free_pin_mode = True
     sample.set_name("manually-mounted")
     self.queue_model_hwobj.add_child(
         self.queue_model_hwobj.get_model_root(), sample)
Example #2
0
 def samples_from_sc_content(self, sc_basket_content, sc_sample_content):
     basket_list = []
     sample_list = []
     for basket_info in sc_basket_content:
         basket = queue_model_objects.Basket()
         basket.init_from_sc_basket(basket_info, "Puck")
         basket_list.append(basket)
     for sample_info in sc_sample_content:
         sample = queue_model_objects.Sample()
         sample.init_from_sc_sample(sample_info)
         sample_list.append(sample)
     return basket_list, sample_list
Example #3
0
    def samples_from_lims(self, lims_sample_list):
        barcode_samples = {}
        location_samples = {}

        for lims_sample in lims_sample_list:
            sample = queue_model_objects.Sample()
            sample.init_from_lims_object(lims_sample)

            if sample.lims_code:
                barcode_samples[sample.lims_code] = sample

            if sample.lims_location:
                location_samples[sample.lims_location] = sample

        return (barcode_samples, location_samples)
Example #4
0
 def samples_from_plate_content(self, plate_sample_content):
     row_list = []
     sample_list = []
     actual_row_index = -1
     for sample_info in plate_sample_content:
         if actual_row_index < sample_info[1]:
             row = queue_model_objects.Basket()
             row_info = [sample_info[1], None]
             row.init_from_sc_basket(row_info, "Row")
             row_list.append(row)
             actual_row_index = sample_info[1]
         sample = queue_model_objects.Sample()
         sample.init_from_plate_sample(sample_info)
         sample_list.append(sample)
     return row_list, sample_list
Example #5
0
    def __init__(self, *args):
        BaseComponents.BlissWidget.__init__(self, *args)

        #
        # Data attributes
        #
        self.sample = queue_model_objects.Sample()
        self.crystal = self.sample.crystals[0]
        self.sample_mib = DataModelInputBinder(self.sample)
        self.crystal_mib = DataModelInputBinder(self.crystal)

        #
        # Qt - Signals/Slots
        #
        self.defineSlot("populate_sample_details", ({}))

        #
        # Layout
        #
        main_layout = qt.QHBoxLayout(self, 11, 15, "main_layout")
        self.crystal_widget = CrystalWidgetLayout(self)
        self.sample_info_widget = SampleInfoWidgetLayout(self)
        main_layout.addWidget(self.sample_info_widget)
        main_layout.addWidget(self.crystal_widget)
        main_layout.addStretch(10)

        self.crystal_mib.bind_value_update(
            "space_group", self.crystal_widget.space_group_value_label, str,
            None)

        self.crystal_mib.bind_value_update(
            "protein_acronym",
            self.crystal_widget.protein_acronym_value_label,
            str,
            None,
        )

        self.crystal_mib.bind_value_update("cell_a",
                                           self.crystal_widget.a_value_label,
                                           str, None)

        self.crystal_mib.bind_value_update(
            "cell_alpha", self.crystal_widget.alpha_value_label, str, None)

        self.crystal_mib.bind_value_update("cell_b",
                                           self.crystal_widget.b_value_label,
                                           str, None)

        self.crystal_mib.bind_value_update(
            "cell_beta", self.crystal_widget.beta_value_label, str, None)

        self.crystal_mib.bind_value_update("cell_c",
                                           self.crystal_widget.c_value_label,
                                           str, None)

        self.crystal_mib.bind_value_update(
            "cell_gamma", self.crystal_widget.gamma_value_label, str, None)

        self.sample_mib.bind_value_update(
            "name", self.sample_info_widget.name_value_label, str, None)

        self.sample_mib.bind_value_update(
            "code", self.sample_info_widget.data_matrix_value_label, str, None)

        self.sample_mib.bind_value_update(
            "holder_length",
            self.sample_info_widget.holder_length_value_label,
            str,
            None,
        )

        self.sample_mib.bind_value_update(
            "lims_sample_location",
            self.sample_info_widget.sample_location_value_label,
            str,
            None,
        )

        self.sample_mib.bind_value_update(
            "lims_container_location",
            self.sample_info_widget.basket_location_value_label,
            str,
            None,
        )