def fromGUI(self, wxobj): """ """ #Get Annotation file annotationPath = wxobj.annotation if not transit_tools.validate_annotation(annotationPath): return None #Get selected files ctrldata = wxobj.ctrlSelected() expdata = wxobj.expSelected() if not transit_tools.validate_both_datasets(ctrldata, expdata): return None #Validate transposon types if not transit_tools.validate_transposons_used(ctrldata+expdata, transposons): return None #Read the parameters from the wxPython widgets ignoreCodon = True samples = int(wxobj.rankproductSampleText.GetValue()) normalization = wxobj.rankproductNormChoice.GetString(wxobj.rankproductNormChoice.GetCurrentSelection()) replicates="Sum" adaptive = False doHistogram = False NTerminus = float(wxobj.globalNTerminusText.GetValue()) CTerminus = float(wxobj.globalCTerminusText.GetValue()) LOESS = False #Get output path defaultFileName = "rankproduct_output.dat" defaultDir = os.getcwd() output_path = wxobj.SaveFile(defaultDir, defaultFileName) if not output_path: return None output_file = open(output_path, "w") return self(ctrldata, expdata, annotationPath, output_file, normalization, samples, adaptive, doHistogram, replicates, LOESS, ignoreCodon, NTerminus, CTerminus, wxobj)
def fromGUI(self, wxobj): """ """ #Get Annotation file annotationPath = wxobj.annotation if not transit_tools.validate_annotation(annotationPath): return None #Get selected files ctrldata = wxobj.ctrlSelected() expdata = wxobj.expSelected() if not transit_tools.validate_both_datasets(ctrldata, expdata): return None #Validate transposon types if not transit_tools.validate_transposons_used(ctrldata+expdata, transposons): return None #Read the parameters from the wxPython widgets ignoreCodon = True normalization = wxobj.utestNormChoice.GetString(wxobj.utestNormChoice.GetCurrentSelection()) replicates= None includeZeros = wxobj.utestZeroCheckBox.GetValue() NTerminus = float(wxobj.globalNTerminusText.GetValue()) CTerminus = float(wxobj.globalCTerminusText.GetValue()) LOESS = wxobj.utestLoessCheck.GetValue() #Get output path defaultFileName = "utest_%s_output" % (normalization) if includeZeros: defaultFileName+= "_iz" defaultFileName+=".dat" defaultDir = os.getcwd() output_path = wxobj.SaveFile(defaultDir, defaultFileName) if not output_path: return None output_file = open(output_path, "w") return self(ctrldata, expdata, annotationPath, output_file, normalization, includeZeros, replicates, LOESS, ignoreCodon, NTerminus, CTerminus, wxobj)
def fromGUI(self, wxobj): """ """ #Get Annotation file annotationPath = wxobj.annotation if not transit_tools.validate_annotation(annotationPath): return None #Get selected files ctrldata = wxobj.ctrlSelected() expdata = wxobj.expSelected() if not transit_tools.validate_both_datasets(ctrldata, expdata): return None #Validate transposon types if not transit_tools.validate_transposons_used(ctrldata + expdata, transposons): return None #Read the parameters from the wxPython widgets ignoreCodon = True samples = int(wxobj.resamplingSampleText.GetValue()) normalization = wxobj.resamplingNormChoice.GetString( wxobj.resamplingNormChoice.GetCurrentSelection()) replicates = "Sum" adaptive = wxobj.resamplingAdaptiveCheckBox.GetValue() doHistogram = wxobj.resamplingHistogramCheckBox.GetValue() includeZeros = wxobj.resamplingZeroCheckBox.GetValue() pseudocount = float(wxobj.resamplingPseudocountText.GetValue()) NTerminus = float(wxobj.globalNTerminusText.GetValue()) CTerminus = float(wxobj.globalCTerminusText.GetValue()) LOESS = wxobj.resamplingLoessCheck.GetValue() #Get output path defaultFileName = "resampling_output_s%d_pc%1.2f" % (samples, pseudocount) if adaptive: defaultFileName += "_adaptive" if includeZeros: defaultFileName += "_iz" defaultFileName += ".dat" defaultDir = os.getcwd() output_path = wxobj.SaveFile(defaultDir, defaultFileName) if not output_path: return None output_file = open(output_path, "w") return self(ctrldata, expdata, annotationPath, output_file, normalization, samples, adaptive, doHistogram, includeZeros, pseudocount, replicates, LOESS, ignoreCodon, NTerminus, CTerminus, wxobj)
def fromGUI(self, wxobj): """ """ #Get Annotation file annot_paths = wxobj.annotation.split(",") annotationPath = annot_paths[0] diffStrains = False annotationPathExp = "" if len(annot_paths) == 2: annotationPathExp = annot_paths[1] diffStrains = True if not transit_tools.validate_annotation(annotationPath): return None if annotationPathExp and not transit_tools.validate_annotation(annotationPathExp): return None #Get selected files ctrldata = wxobj.ctrlSelected() expdata = wxobj.expSelected() if not transit_tools.validate_both_datasets(ctrldata, expdata): return None #Validate transposon types if not transit_tools.validate_transposons_used(ctrldata+expdata, transposons): return None #Read the parameters from the wxPython widgets ignoreCodon = True samples = int(wxobj.resamplingSampleText.GetValue()) normalization = wxobj.resamplingNormChoice.GetString(wxobj.resamplingNormChoice.GetCurrentSelection()) replicates="Sum" adaptive = wxobj.resamplingAdaptiveCheckBox.GetValue() doHistogram = wxobj.resamplingHistogramCheckBox.GetValue() includeZeros = wxobj.resamplingZeroCheckBox.GetValue() pseudocount = float(wxobj.resamplingPseudocountText.GetValue()) LOESS = wxobj.resamplingLoessCheck.GetValue() # Global Parameters NTerminus = float(wxobj.globalNTerminusText.GetValue()) CTerminus = float(wxobj.globalCTerminusText.GetValue()) ctrl_lib_str = wxobj.ctrlLibText.GetValue() exp_lib_str = wxobj.expLibText.GetValue() #Get output path defaultFileName = "resampling_output_s%d_pc%1.2f" % (samples, pseudocount) if adaptive: defaultFileName+= "_adaptive" if includeZeros: defaultFileName+= "_iz" defaultFileName+=".dat" defaultDir = os.getcwd() output_path = wxobj.SaveFile(defaultDir, defaultFileName) if not output_path: return None output_file = open(output_path, "w") return self(ctrldata, expdata, annotationPath, output_file, normalization, samples, adaptive, doHistogram, includeZeros, pseudocount, replicates, LOESS, ignoreCodon, NTerminus, CTerminus, ctrl_lib_str, exp_lib_str, wxobj, Z = False, diffStrains = diffStrains, annotation_path_exp = annotationPathExp)
def fromGUI(self, wxobj): """ """ #Get Annotation file annotationPath = wxobj.annotation if not transit_tools.validate_annotation(annotationPath): return None #Get selected files ctrldataA = wxobj.ctrlSelected() expdataA = wxobj.expSelected() if not transit_tools.validate_both_datasets(ctrldataA, expdataA): return None #Validate transposon types if not transit_tools.validate_transposons_used(ctrldataA+expdataA, transposons): return None # Get other datasets: dlg = DatasetDialog(wxobj) result = dlg.ShowModal() if result == dlg.ID_DONE and wxobj: status = 1 ctrldataB = dlg.ctrlSelected() expdataB = dlg.expSelected() if not transit_tools.validate_both_datasets(ctrldataB, expdataB): #dlg.Close() #dlg.Destroy() return None if not transit_tools.validate_transposons_used(ctrldataB+expdataB, transposons): dlg.Close() dlg.Destroy() return None else: dlg.Close() dlg.Destroy() return None # Close dlg.Close() dlg.Destroy() #Read the parameters from the wxPython widgets ignoreCodon = True samples = int(wxobj.giSampleText.GetValue()) rope = float(wxobj.giROPEText.GetValue()) normalization = wxobj.giNormChoice.GetString(wxobj.giNormChoice.GetCurrentSelection()) replicates="Sum" includeZeros = wxobj.giZeroCheckBox.GetValue() NTerminus = float(wxobj.globalNTerminusText.GetValue()) CTerminus = float(wxobj.globalCTerminusText.GetValue()) LOESS = wxobj.giLoessCheck.GetValue() #Get output path defaultFileName = "genetic_interactions_output_s%d" % (samples) if includeZeros: defaultFileName+= "_iz" defaultFileName+=".dat" defaultDir = os.getcwd() output_path = wxobj.SaveFile(defaultDir, defaultFileName) if not output_path: return None output_file = open(output_path, "w") return self(ctrldataA, ctrldataB, expdataA, expdataB, annotationPath, output_file, normalization, samples, rope, includeZeros, replicates, LOESS, ignoreCodon, NTerminus, CTerminus, wxobj)