def trigger_auto_processing(
        self,
        process_event,
        xds_dir,
        EDNA_files_dir=None,
        anomalous=None,
        residues=200,
        do_inducedraddam=False,
        spacegroup=None,
        cell=None,
    ):
        # quick fix for anomalous, do_inducedraddam... passed as a string!!!
        # (comes from the queue)
        if isinstance(anomalous, types.StringType):
            anomalous = anomalous == "True"
        if isinstance(do_inducedraddam, types.StringType):
            do_inducedraddam = do_inducedraddam == "True"
        if isinstance(residues, types.StringType):
            try:
                residues = int(residues)
            except BaseException:
                residues = 200

        # residues = zero should be interpreted as if no value was provided
        # use default of 200
        if residues == 0:
            residues = 200

        processAnalyseParams = {}
        processAnalyseParams["EDNA_files_dir"] = EDNA_files_dir

        try:
            if isinstance(xds_dir, types.ListType):
                processAnalyseParams["collections_params"] = xds_dir
            else:
                processAnalyseParams["datacollect_id"] = self.collection_id
                processAnalyseParams["xds_dir"] = xds_dir
            processAnalyseParams["anomalous"] = anomalous
            processAnalyseParams["residues"] = residues
            processAnalyseParams["spacegroup"] = spacegroup
            processAnalyseParams["cell"] = cell
        except Exception as msg:
            logging.getLogger().exception("DataCollect:processing: %r" % str(msg))
        else:
            # logging.info("AUTO PROCESSING: %s, %s, %s, %s, %s, %s, %r, %r", process_event, EDNA_files_dir, anomalous, residues, do_inducedraddam, spacegroup, cell)

            try:
                autoprocessing.start(
                    self["auto_processing"], process_event, processAnalyseParams
                )
            except BaseException:
                logging.getLogger().exception("Error starting processing")

            if process_event == "after" and do_inducedraddam:
                try:
                    autoprocessing.startInducedRadDam(processAnalyseParams)
                except BaseException:
                    logging.exception("Error starting induced rad.dam")
예제 #2
0
    def trigger_auto_processing(self, process_event, xds_dir, EDNA_files_dir=None, anomalous=None, residues=200, do_inducedraddam=False, spacegroup=None, cell=None):
      # quick fix for anomalous, do_inducedraddam... passed as a string!!!
      # (comes from the queue)
      if type(anomalous) == types.StringType:
        anomalous = anomalous == "True"      
      if type(do_inducedraddam) == types.StringType:
        do_inducedraddam = do_inducedraddam == "True" 
      if type(residues) == types.StringType:
        try:
          residues = int(residues)
        except:
          residues = 200

      # residues = zero should be interpreted as if no value was provided
      # use default of 200
      if residues == 0:
          residues = 200

      processAnalyseParams = {}
      processAnalyseParams['EDNA_files_dir'] = EDNA_files_dir

      try:
        if type(xds_dir) == types.ListType:
            processAnalyseParams["collections_params"] = xds_dir
        else:
            processAnalyseParams['datacollect_id'] = self.collection_id
            processAnalyseParams['xds_dir'] = xds_dir
        processAnalyseParams['anomalous'] = anomalous
        processAnalyseParams['residues'] = residues
        processAnalyseParams["spacegroup"]=spacegroup
        processAnalyseParams["cell"]=cell
      except Exception as msg:
        logging.getLogger().exception("DataCollect:processing: %r" % str(msg))
      else:
        #logging.info("AUTO PROCESSING: %s, %s, %s, %s, %s, %s, %r, %r", process_event, EDNA_files_dir, anomalous, residues, do_inducedraddam, spacegroup, cell)
            
        try: 
            autoprocessing.start(self["auto_processing"], process_event, processAnalyseParams)
        except:
            logging.getLogger().exception("Error starting processing")
          
        if process_event=="after" and do_inducedraddam:
            try:
              autoprocessing.startInducedRadDam(processAnalyseParams)
            except:
              logging.exception("Error starting induced rad.dam")
            processAnalyseParams["anomalous"] = anomalous
            processAnalyseParams["residues"] = residues
            processAnalyseParams["inverse_beam"] = inverse_beam
            processAnalyseParams["spacegroup"] = spacegroup
            processAnalyseParams["cell"] = cell
        except Exception, msg:
            logging.getLogger().exception("DataCollect:processing: %r" % msg)
        else:
            logging.info(
                "AUTO PROCESSING: %s, %s, %s, %s, %s, %s, %r, %r",
                process_event,
                EDNA_files_dir,
                anomalous,
                residues,
                inverse_beam,
                do_inducedraddam,
                spacegroup,
                cell,
            )

            try:
                autoprocessing.start(self["auto_processing"], process_event, processAnalyseParams)
            except:
                logging.getLogger().exception("Error starting processing")

            if process_event == "after" and do_inducedraddam:
                try:
                    autoprocessing.startInducedRadDam(processAnalyseParams)
                except:
                    logging.exception("Error starting induced rad.dam")
예제 #4
0
        try:
            if type(xds_dir) == types.ListType:
                processAnalyseParams["collections_params"] = xds_dir
            else:
                processAnalyseParams['datacollect_id'] = self.collection_id
                processAnalyseParams['xds_dir'] = xds_dir
            processAnalyseParams['anomalous'] = anomalous
            processAnalyseParams['residues'] = residues
            processAnalyseParams['inverse_beam'] = inverse_beam
            processAnalyseParams["spacegroup"] = spacegroup
            processAnalyseParams["cell"] = cell
        except Exception, msg:
            logging.getLogger().exception("DataCollect:processing: %r" % msg)
        else:
            logging.info("AUTO PROCESSING: %s, %s, %s, %s, %s, %s, %r, %r",
                         process_event, EDNA_files_dir, anomalous, residues,
                         inverse_beam, do_inducedraddam, spacegroup, cell)

            try:
                autoprocessing.start(self["auto_processing"], process_event,
                                     processAnalyseParams)
            except:
                logging.getLogger().exception("Error starting processing")

            if process_event == "after" and do_inducedraddam:
                try:
                    autoprocessing.startInducedRadDam(processAnalyseParams)
                except:
                    logging.exception("Error starting induced rad.dam")