def estimate(self, experiment): for i, control_i in enumerate(self.controls_list): for j, control_j in enumerate(self.controls_list): if control_i.channel == control_j.channel and i != j: raise util.CytoflowOpError("Channel {0} is included more than once" .format(control_i.channel)) # check for experiment metadata used to estimate operations in the # history, and bail if we find any for op in experiment.history: if hasattr(op, 'by'): for by in op.by: if 'experiment' in experiment.metadata[by]: raise util.CytoflowOpError('experiment', "Prior to applying this operation, " "you must not apply any operation with 'by' " "set to an experimental condition.") self.controls = {} for control in self.controls_list: self.controls[control.channel] = control.file if not self.subset: warnings.warn("Are you sure you don't want to specify a subset " "used to estimate the model?", util.CytoflowOpWarning) try: BleedthroughLinearOp.estimate(self, experiment, subset = self.subset) except: raise finally: self.changed = (Changed.ESTIMATE_RESULT, self)
def estimate(self, experiment): for i, control_i in enumerate(self.controls_list): for j, control_j in enumerate(self.controls_list): if control_i.channel == control_j.channel and i != j: raise util.CytoflowOpError("Channel {0} is included more than once" .format(control_i.channel)) self.controls = {} for control in self.controls_list: self.controls[control.channel] = control.file if not self.subset: warnings.warn("Are you sure you don't want to specify a subset " "used to estimate the model?", util.CytoflowOpWarning) BleedthroughLinearOp.estimate(self, experiment, subset = self.subset) self.changed = (Changed.ESTIMATE_RESULT, self)