def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline:")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) Pipelines=["InitialChIPseqQC", "ChIPseq" ] Pipeline = self.Pipeline = StringVar() Pipeline.set(Pipelines[0]) om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=20,pady=5) #readtypes = ['Single', 'Paired'] #self.readtype = readtype = StringVar() #readtype.set(readtypes[0]) #readtype_menu = OptionMenu(eframe, readtype, *readtypes) #readtype_menu.grid(row=3, column=3, sticky=E, pady=5) #readtype_label = Label(eframe, text="-end ") #readtype_label.grid( row=3, column=4, stick=W, pady=5) self.add_info(eframe) self.option_controller() self.peakinfo_fn = 'peakcall.tab' self.contrast_fn = 'contrast.tab'
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.pairs = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = [ 'Initial QC', 'Germline', 'Somatic Tumor-Normal', 'Somatic Tumor-Only' ] Pipelines = [ "initialqcgenomeseq", "wgslow", 'wgs-somatic', 'wgs-somatic-tumoronly' ] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() Pipeline = self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) #om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5)
def option_controller( self, *args, **kwargs ) : PipelineFrame.option_controller( self ) self.Pipeline.set( self.label2pipeline[self.PipelineLabel.get()] ) print( self.Pipeline.get() ) if self.Pipeline.get() == 'cellranger' : self.clusterOpts.grid_forget() self.crOpts.grid(row=8,column=0, columnspan=6, sticky=W, padx=20, pady=10 ) self.qcOpts.grid_forget() self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqcluster' : self.clusterOpts.grid( row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10 ) self.crOpts.grid_forget() self.qcOpts.grid_forget() self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqinit' : self.clusterOpts.grid_forget() self.crOpts.grid_forget() self.qcOpts.grid( row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10 ) self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqmulticluster' : self.clusterOpts.grid_forget() self.crOpts.grid_forget() self.qcOpts.grid_forget() self.multiclusterOpts.grid( row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10 )
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) Pipelines = ["CAPmirseq-plus"] Pipeline = self.Pipeline = StringVar() Pipeline.set(Pipelines[0]) om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) self.add_info(eframe)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline:")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) Pipelines=["InitialChIPseqQC", "ChIPseq" ] Pipeline = self.Pipeline = StringVar() Pipeline.set(Pipelines[0]) om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=20,pady=5) readtypes = ['Single', 'Paired'] self.readtype = readtype = StringVar() readtype.set(readtypes[0]) readtype_menu = OptionMenu(eframe, readtype, *readtypes) readtype_menu.grid(row=3, column=3, sticky=E, pady=5) readtype_label = Label(eframe, text="-end ") readtype_label.grid( row=3, column=4, stick=W, pady=5) self.add_info(eframe) self.option_controller() self.peakinfo_fn = 'peakcall.tab' self.contrast_fn = 'contrast.tab'
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) self.Pipeline.set(self.label2pipeline[self.PipelineLabel.get()]) print(self.Pipeline.get()) if self.Pipeline.get() == 'initialqcrnaseq': self.om4.grid_forget() self.sampleLF.grid_forget() self.info.grid_forget() elif self.Pipeline.get() == 'rnaseq': self.om4.grid(row=6, column=1, sticky=W, padx=10, pady=5) self.sampleLF.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) self.info.grid(row=10, column=0, columnspan=6, sticky=W, padx=20, pady=10) else: self.om4.grid_forget() self.sampleLF.grid_forget() self.info.grid_forget()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.pairs = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) PipelineLabels = ['Initial QC', 'Germline', 'Somatic Tumor-Normal', 'Somatic Tumor-Only'] Pipelines=["initialqcgenomeseq", "wgslow", 'wgs-somatic', 'wgs-somatic-tumoronly'] self.label2pipeline = { k:v for k,v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() Pipeline = self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) #om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=10,pady=5)
def option_controller( self, *args, **kwargs ) : PipelineFrame.option_controller( self ) if self.Pipeline.get() == 'exomeseq-somatic' : self.add_pairs( self.eframe ) #self.dry_button.config( state="disabled" ) elif self.Pipeline.get() != 'exomeseq-somatic' : self.del_pairs( self.eframe )
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) self.Pipeline.set(self.label2pipeline[self.PipelineLabel.get()]) print(self.Pipeline.get()) if self.Pipeline.get() == 'exomeseq-somatic': self.add_pairs(self.eframe) #self.dry_button.config( state="disabled" ) elif self.Pipeline.get() != 'exomeseq-somatic': self.del_pairs(self.eframe)
def option_controller( self, *args, **kwargs ) : PipelineFrame.option_controller( self ) self.Pipeline.set( self.label2pipeline[self.PipelineLabel.get()] ) print( self.Pipeline.get() ) if self.Pipeline.get() == 'wgs-somatic' : self.add_pairs( self.eframe ) #self.dry_button.config( state="disabled" ) elif self.Pipeline.get() != 'wgs-somatic' : self.del_pairs( self.eframe )
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) if self.Pipeline.get() == 'InitialChIPseqQC': self.info.grid_forget() else: self.info.grid(row=7, column=0, columnspan=6, sticky=W, padx=20, pady=10)
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) if self.Pipeline.get() == 'initialqcrnaseq': self.om4.grid_forget() self.sampleLF.grid_forget() else: self.om4.grid(row=6, column=1, sticky=W, padx=10, pady=5) self.sampleLF.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.pairs = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) PipelineLabels = ["Initial QC", "Germline", 'Somatic Tumor-Normal', 'Somatic Tumor-Only'] Pipelines=["initialqc", "exomeseq-germline", "exomeseq-somatic", "exomeseq-somatic-tumoronly"] self.label2pipeline = { k:v for k,v in zip(PipelineLabels, Pipelines)} Pipeline = self.Pipeline = StringVar() PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) #om.config()#bg = widgetBgColor,fg=widgetFgColor) #om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=10,pady=5) targetsL=Label(eframe, text="Target Capture Kit") #,fg=textLightColor,bg=baseColor) targetsL.grid(row=5,column=0,sticky=W,padx=10,pady=5) targetsE = Entry(eframe,textvariable=self.targetspath, width=50) if self.genome=="hg19": self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/SS_v5_UTRs_hg19.bed" ) elif self.genome=="hg38": self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/SS_v5_UTRs_hg38.bed" ) else: self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/SureSelect_mm10.bed") targetsE.grid(row=5,column=1,columnspan=6,sticky=W,padx=10,pady=5) self.targetspath.trace('w', lambda a,b,c,x="targetspath":self.makejson(x)) label = Label (eframe, text = "By default, the path to the Agilent V5+UTR targets file is filled in here" ) label.grid(row=6, column=0, columnspan=5, sticky=W, padx=10, pady=5)
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) self.Pipeline.set(self.label2pipeline[self.PipelineLabel.get()]) print(self.Pipeline.get()) if self.Pipeline.get() == 'miRSeq_v2': self.novelMirsFrame.grid(row=5, column=0, columnspan=4, sticky=W, padx=20, pady=10) elif self.Pipeline.get() == "CAPmirseq-plus": self.novelMirsFrame.grid_forget()
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) self.Pipeline.set(self.label2pipeline[self.PipelineLabel.get()]) print(self.Pipeline.get()) if self.Pipeline.get() == 'cellranger': self.clusterOpts.grid_forget() self.crOpts.grid(row=8, column=0, columnspan=6, sticky=W, padx=20, pady=10) self.qcOpts.grid_forget() self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqcluster': self.clusterOpts.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) self.crOpts.grid_forget() self.qcOpts.grid_forget() self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqinit': self.clusterOpts.grid_forget() self.crOpts.grid_forget() self.qcOpts.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) self.multiclusterOpts.grid_forget() elif self.Pipeline.get() == 'scrnaseqmulticluster': self.clusterOpts.grid_forget() self.crOpts.grid_forget() self.qcOpts.grid_forget() self.multiclusterOpts.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.pairs = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) Pipelines=["initialqcgenomeseq","wgslow"] Pipeline = self.Pipeline = StringVar() Pipeline.set(Pipelines[0]) om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=10,pady=5)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = ["miRSeq_v2", "CAPmirseq-plus"] Pipelines = ["miRSeq_v2", "CAPmirseq-plus"] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() Pipeline = self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) # self.mirseqOpts = mirseqOpts = LabelFrame(eframe,text="miRSeq Settings") self.novelMirsFrame = novelMirsFrame = Frame(eframe) self.novelMirs = novelMirs = StringVar() novelMirLabel = Label(novelMirsFrame, text="Identify Novel miRNAs: ") novelMirsDropdown = ["YES", "NO"] novelMirs.set(novelMirsDropdown[1]) novelMirs_om = OptionMenu(novelMirsFrame, novelMirs, *novelMirsDropdown) novelMirLabel.grid(row=5, column=1, sticky=W, padx=10, pady=5) novelMirs_om.grid(row=5, column=2, sticky=W, padx=10, pady=0) # novelMirsFrame.grid(row=5,column=0, columnspan=4, sticky=W, padx=20, pady=10 ) self.add_info(eframe) self.option_controller()
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) if self.Pipeline.get() == 'InitialChIPseqQC': self.info.grid_forget() self.om_peaks.grid(row=7, column=0, columnspan=6, sticky=W, padx=20, pady=10) elif self.Pipeline.get() == 'ChIPseq': self.info.grid(row=7, column=0, columnspan=6, sticky=W, padx=20, pady=10) contrast_file = join(self.workpath.get(), self.contrast_fn) print(contrast_file) if not os.path.exists(contrast_file): open(contrast_file, 'a').close()
def option_controller(self, *args, **kwargs): PipelineFrame.option_controller(self) self.Pipeline.set(self.label2pipeline[self.PipelineLabel.get()]) print(self.Pipeline.get()) if self.Pipeline.get() == 'scrnaQC': self.deOptions.grid_forget() self.qcOptions.grid(row=8, column=0, columnspan=6, sticky=W, padx=20, pady=10) elif self.Pipeline.get() == 'scrnaDE': self.deOptions.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) self.qcOptions.grid_forget()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = [ "CellRanger", "Initial/QC", "Clustering", "Multi-Sample Clustering" ] Pipelines = [ "cellranger", "scrnaseqinit", "scrnaseqcluster", "scrnaseqmulticluster" ] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) self.crOpts = crOpts = LabelFrame(eframe, text="CellRanger Settings") self.scrCRID = scrCRID = StringVar() scrCRID.set("SPECIFY_PREFIX_HERE") self.scrExpected = scrExpected = StringVar() scrExpected.set("3000") scrcridL = Label(crOpts, text="CellRanger Sample ID: ") scrcridE = Entry(crOpts, bd=2, width=25, textvariable=scrCRID) scrcridL.grid(row=9, column=1, sticky=W, padx=10, pady=5) scrcridE.grid(row=9, column=2, sticky=W, padx=0, pady=5) screxpectedL = Label(crOpts, text="Expected number of cells: ") screxpectedE = Entry(crOpts, bd=2, width=8, textvariable=scrExpected) screxpectedL.grid(row=10, column=1, sticky=W, padx=10, pady=5) screxpectedE.grid(row=10, column=2, sticky=W, padx=0, pady=5) self.clusterOpts = clusterOpts = LabelFrame( eframe, text="Clustering and tSNE Options") self.scrPCs = scrPCs = StringVar() scrPCs.set("12") self.scrRes = scrRes = StringVar() scrRes.set("0.6") #scrPCs.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) #Filter out genes < [5] read counts in < [2] samples scrpcsL = Label(clusterOpts, text="Include principal components 1 through ") scrpcsE = Entry(clusterOpts, bd=2, width=3, textvariable=scrPCs) scrresL = Label(clusterOpts, text="with clustering resolution: ") scrresE = Entry(clusterOpts, bd=2, width=3, textvariable=scrRes) scrpcsL.grid(row=9, column=1, sticky=W, padx=10, pady=5) scrpcsE.grid(row=9, column=2, sticky=W, padx=0, pady=5) scrresL.grid(row=9, column=3, sticky=W, padx=5, pady=5) scrresE.grid(row=9, column=4, sticky=W, padx=0, pady=5) #scrRes.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) clusterOpts.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) self.multiclusterOpts = multiclusterOpts = LabelFrame( eframe, text="Multi-Sample Clustering and tSNE Options") scrccsL = Label(multiclusterOpts, text="Include canonical components 1 through ") scrccsE = Entry(multiclusterOpts, bd=2, width=3, textvariable=scrPCs) scrmcresL = Label(multiclusterOpts, text="with clustering resolution: ") scrmcresE = Entry(multiclusterOpts, bd=2, width=3, textvariable=scrRes) scrccsL.grid(row=9, column=1, sticky=W, padx=10, pady=5) scrccsE.grid(row=9, column=2, sticky=W, padx=0, pady=5) scrmcresL.grid(row=9, column=3, sticky=W, padx=5, pady=5) scrmcresE.grid(row=9, column=4, sticky=W, padx=0, pady=5) self.qcOpts = qcOpts = LabelFrame(eframe, text="Initial Settings") countL = Label(qcOpts, text="Counts/Matrix Dir:") countL.grid(row=9, column=1, sticky=W, padx=10, pady=5) countpath = StringVar() self.countpath = countpath count_entry = Entry( qcOpts, bd=2, width=50, #bg = entryBgColor, #fg = entryFgColor, textvariable=countpath, state='normal') count_entry.grid(row=9, column=2, columnspan=3) self.count_button = count_button = Button( qcOpts, text="Open Directory", command=self.set_count_directory) count_button.grid(row=9, column=5) self.mattype = mattype = StringVar() mattypeL = Label(qcOpts, text="Count matrix format: ") scrMatTypeDropdown = ["cellranger", "cellranger_raw", "zumi", "biorad"] mattype.set(scrMatTypeDropdown[0]) mattype_om = OptionMenu(qcOpts, mattype, *scrMatTypeDropdown) mattypeL.grid(row=10, column=1, sticky=W, padx=10, pady=5) mattype_om.grid(row=10, column=2, sticky=W, padx=0, pady=5) self.docycleregress = docycleregress = StringVar() docycleregressL = Label(qcOpts, text="Do cell cycle regression? ") scrCycleDropdown = ["TRUE", "FALSE"] docycleregress.set(scrCycleDropdown[0]) cycle_om = OptionMenu(qcOpts, docycleregress, *scrCycleDropdown) docycleregressL.grid(row=11, column=1, sticky=W, padx=10, pady=5) cycle_om.grid(row=11, column=2, sticky=W, padx=0, pady=5) usecycleregressL_c = Label(clusterOpts, text="Use cell cycle regressed data? ") docycleregress.set(scrCycleDropdown[0]) cycle_om_c = OptionMenu(clusterOpts, docycleregress, *scrCycleDropdown) usecycleregressL_c.grid(row=10, column=1, sticky=W, padx=10, pady=5) cycle_om_c.grid(row=10, column=2, sticky=W, padx=0, pady=5) usecycleregressL_mc = Label(multiclusterOpts, text="Use cell cycle regressed data? ") docycleregress.set(scrCycleDropdown[0]) cycle_om_mc = OptionMenu(multiclusterOpts, docycleregress, *scrCycleDropdown) usecycleregressL_mc.grid(row=10, column=1, sticky=W, padx=10, pady=5) cycle_om_mc.grid(row=10, column=2, sticky=W, padx=0, pady=5) groups_buttonL = Label(qcOpts, text="SAMPLE INFORMATION: ") groups_button = Button(qcOpts, text="Set Groups", command=self.popup_groups) groups_buttonL.grid(row=12, column=1, sticky=W, padx=10, pady=5) groups_button.grid(row=12, column=2, sticky=W, padx=0, pady=5) ##################### self.option_controller()
def popup_window( self, title, filename, kind='textbox' ) : if kind == 'textbox' : PipelineFrame.popup_window(self, title, filename) elif kind == 'peakinfo' : self.popup_window_peakinfo(title, filename)
def option_controller( self, *args, **kwargs ) : PipelineFrame.option_controller( self ) if self.Pipeline.get() == 'InitialChIPseqQC' : self.info.grid_forget() else : self.info.grid(row=7,column=0, columnspan=6, sticky=W, padx=20, pady=10 )
def popup_window(self, title, filename, kind='textbox'): if kind == 'textbox': PipelineFrame.popup_window(self, title, filename) elif kind == 'peakinfo': self.popup_window_peakinfo(title, filename)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = ["Initial QC", "Differential Expression"] Pipelines = ["scrnaQC", "scrnaDE"] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) ######## QUALITY CONTROL/FILTERING/CLUSTERING ############### self.qcOptions = qcOptions = LabelFrame( eframe, text="QC, Filtering, and Initial Clustering") #algorithm selection self.clustAlg = clustAlg = StringVar() clustAlgLabel = Label(qcOptions, text="Clustering Algorithm: ") clustAlgDropdown = [ "SLM (Smart Local Moving)", "Louvain (Original)", "Louvain (with Multilevel Refinement)" ] clustAlg.set(clustAlgDropdown[0]) clustAlgOptMenu = OptionMenu(qcOptions, clustAlg, *clustAlgDropdown) clustAlgLabel.grid(row=8, column=1, sticky=W, padx=10, pady=5) clustAlgOptMenu.grid(row=8, column=2, sticky=W, padx=0, pady=5) #clustering resolutions self.resolution = resolution = StringVar() resolution.set("0.4,0.6,0.8,1.0,1.2") resolutionLabel = Label( qcOptions, text="Clustering Resolution(s): \nSeparate with commas") resolutionEntry = Entry(qcOptions, bd=2, width=25, textvariable=resolution) resolutionLabel.grid(row=9, column=1, sticky=W, padx=10, pady=5) resolutionEntry.grid(row=9, column=2, sticky=W, padx=0, pady=5) #annotation db: human: HPCA/BP Encode; mouse: immgen/mouseRNAseq self.annotDB = annotDB = StringVar() annotLabel = Label(qcOptions, text="Annotation database: ") annotHuman = [ "Human Primary Cell Atlas", "Blueprint/ENCODE", "Monaco Immune", "Database of Immune Cell Expression (DICE)" ] annotMouse = ["ImmGen", "Mouse RNASeq"] annotDropdown = [] genome = self.global_info.annotation.get() if (genome == "GRCh38"): annotDropdown = annotHuman.copy() elif (genome == "mm10"): annotDropdown = annotMouse.copy() else: annotDropdown.append("No genome selected") annotDB.set(annotDropdown[0]) annotDB_om = OptionMenu(qcOptions, annotDB, *annotDropdown) annotLabel.grid(row=10, column=1, sticky=W, padx=10, pady=5) annotDB_om.grid(row=10, column=2, sticky=W, padx=0, pady=5) self.citeseq = citeseq = StringVar() citeseqLabel = Label(qcOptions, text="CITESeq Included: ") citeseqDropdown = ["Yes", "No"] citeseq.set(citeseqDropdown[1]) citeseqOptMenu = OptionMenu(qcOptions, citeseq, *citeseqDropdown) citeseqLabel.grid(row=11, column=1, sticky=W, padx=10, pady=5) citeseqOptMenu.grid(row=11, column=2, sticky=W, padx=0, pady=5) #set groups, mostly for relabeling purposes self.add_info(qcOptions) #Position 13 # self.option_controller() # groups_buttonL = Label(qcOptions, text="Sample Information: ") # groups_button = Button(qcOptions, # text="Set Groups", # command = self.popup_groups ) # groups_buttonL.grid(row=12,column=1,sticky=W,padx=10,pady=5) # groups_button.grid(row=12,column=2,sticky=W,padx=0,pady=5) # # ######### DIFFERENTIAL EXPRESSION ######### self.deOptions = deOptions = LabelFrame( eframe, text="Differential Gene Expression") #option for which object to run DE on self.rdsObject = rdsObject = StringVar() rdsLabel = Label(deOptions, text="Use the pre- or post-batch corrected data:") rdsDropdown = [ "Merged (Pre-batch correction)", "Integrated (Post-batch correction)", "Both" ] rdsObject.set(rdsDropdown[2]) rdsOptMenu = OptionMenu(deOptions, rdsObject, *rdsDropdown) rdsLabel.grid(row=8, column=1, sticky=W, padx=10, pady=5) rdsOptMenu.grid(row=8, column=2, sticky=W, padx=0, pady=5) #option for cluster resolution for DE self.resolutionDE = resolutionDE = StringVar() resolutionDE.set("0.4,0.6,0.8,1.0,1.2") resolutionDELabel = Label( deOptions, text= "Clustering Resolution: \nChoose a previous resolution or \nselect a new resolution to run" ) resolutionDEEntry = Entry(deOptions, bd=2, width=25, textvariable=resolutionDE) resolutionDELabel.grid(row=9, column=1, sticky=W, padx=10, pady=5) resolutionDEEntry.grid(row=9, column=2, sticky=W, padx=0, pady=5) #options for difftest self.testDE = testDE = StringVar() testDELabel = Label( deOptions, text="Statistical test for differential expression:") testDEDropdown = [ "MAST", "DESeq2", "Likelihood Ratio", "Logistic regression", "Negative Binomial", "Wilcoxon", "Student's T" ] testDE.set(testDEDropdown[0]) testDEMenu = OptionMenu(deOptions, testDE, *testDEDropdown) testDELabel.grid(row=10, column=1, sticky=W, padx=10, pady=5) testDEMenu.grid(row=10, column=2, sticky=W, padx=0, pady=5) #options for filters self.deMinPct = deMinPct = StringVar() deMinPctLabel = Label( deOptions, text="Minimum fraction of cells expressing DE genes:") deMinPct.set("0.1") deMinPctEntry = Entry(deOptions, bd=2, width=10, textvariable=deMinPct) deMinPctLabel.grid(row=11, column=1, sticky=W, padx=10, pady=5) deMinPctEntry.grid(row=11, column=2, sticky=W, padx=0, pady=5) self.deMinFC = deMinFC = StringVar() deMinFCLabel = Label(deOptions, text="Minimum fold change to report DE genes:") deMinFC.set("0.25") deMinFCEntry = Entry(deOptions, bd=2, width=10, textvariable=deMinFC) deMinFCLabel.grid(row=12, column=1, sticky=W, padx=10, pady=5) deMinFCEntry.grid(row=12, column=2, sticky=W, padx=0, pady=5) #use groups and contrasts for differential expression, have options to create new groups self.om_groups = LabelFrame(deOptions, text="Sample Information") self.groups_button = Button(self.om_groups, text="Set Groups", command=self.popup_groups) self.groups_button.grid(row=5, column=5, padx=10, pady=5) self.contrasts_button = Button(self.om_groups, text="Set Contrasts", command=self.popup_groups) self.contrasts_button.grid(row=5, column=6, padx=10, pady=5) self.om_groups.grid(row=13, column=0, columnspan=6, sticky=W, padx=20, pady=10) #option for merged/integrated object # self.integrateOption = integrateOption = StringVar() # integrateLabel = Label(deOptions, text="Merged or Integrated (batch corrected): ") # integrateDropdown = ["Merged","Integrated"] # integrateOption.set(integrateDropdown[0]) # integrateOptMenu = OptionMenu(deOptions, integrateOption, *integrateDropdown) # integrateLabel.grid(row=9,column=1,sticky=W,padx=10,pady=5) # integrateOptMenu.grid(row=9,column=2,sticky=W,padx=0,pady=5) self.option_controller()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) PipelineLabels=["CellRanger","Initial/QC","Clustering" ] Pipelines=["cellranger","scrnaseqinit","scrnaseqcluster"] self.label2pipeline = { k:v for k,v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=10,pady=5) self.crOpts = crOpts = LabelFrame( eframe, text="CellRanger Settings" ) self.scrCRID = scrCRID = StringVar() scrCRID.set("SPECIFY_PREFIX_HERE") self.scrExpected = scrExpected = StringVar() scrExpected.set("3000") scrcridL = Label(crOpts, text="CellRanger Sample ID: ") scrcridE = Entry(crOpts, bd =2, width=25, textvariable=scrCRID) scrcridL.grid(row=9,column=1,sticky=W,padx=10,pady=5) scrcridE.grid(row=9,column=2,sticky=W,padx=0,pady=5) screxpectedL = Label(crOpts, text="Expected number of cells: ") screxpectedE = Entry(crOpts, bd =2, width=8, textvariable=scrExpected) screxpectedL.grid(row=10,column=1,sticky=W,padx=10,pady=5) screxpectedE.grid(row=10,column=2,sticky=W,padx=0,pady=5) self.clusterOpts = clusterOpts = LabelFrame( eframe, text="Clustering and tSNE Options" ) self.scrPCs = scrPCs = StringVar() scrPCs.set("12") self.scrRes = scrRes = StringVar() scrRes.set("0.6") #scrPCs.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) #Filter out genes < [5] read counts in < [2] samples scrpcsL = Label(clusterOpts, text="Include principal components 1 through ") scrpcsE = Entry(clusterOpts, bd =2, width=3, textvariable=scrPCs) scrresL = Label(clusterOpts, text="with clustering resolution: ") scrresE = Entry(clusterOpts, bd =2, width=3, textvariable=scrRes) scrpcsL.grid(row=9,column=1,sticky=W,padx=10,pady=5) scrpcsE.grid(row=9,column=2,sticky=W,padx=0,pady=5) scrresL.grid(row=9,column=3,sticky=W,padx=5,pady=5) scrresE.grid(row=9,column=4,sticky=W,padx=0,pady=5) #scrRes.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) clusterOpts.grid( row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10 ) self.qcOpts = qcOpts = LabelFrame( eframe, text="Initial Settings" ) countL = Label( qcOpts, text="Counts/Matrix Dir:" ) countL.grid(row=9, column=1, sticky=W, padx=10, pady=5 ) countpath=StringVar() self.countpath = countpath count_entry = Entry(qcOpts, bd =2, width = 50, #bg = entryBgColor, #fg = entryFgColor, textvariable = countpath, state='normal' ) count_entry.grid( row=9, column=2, columnspan=3 ) self.count_button = count_button = Button( qcOpts, text="Open Directory", command=self.set_count_directory ) count_button.grid( row=9, column=5 ) ##################### self.option_controller()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.pairs = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = [ "Initial QC", "Germline", 'Somatic Tumor-Normal', 'Somatic Tumor-Only' ] Pipelines = [ "initialqc", "exomeseq-germline", "exomeseq-somatic", "exomeseq-somatic-tumoronly" ] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} Pipeline = self.Pipeline = StringVar() PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) #om.config()#bg = widgetBgColor,fg=widgetFgColor) #om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) targetsL = Label(eframe, text="Target Capture Kit") #,fg=textLightColor,bg=baseColor) targetsL.grid(row=5, column=0, sticky=W, padx=10, pady=5) targetsE = Entry(eframe, textvariable=self.targetspath, width=50) label_ref_text = "By default, the path to the Agilent SureSelect V7 targets file is filled in here" if self.genome == "hg19": self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/Agilent_SSv7_allExons_hg19.bed" ) elif self.genome == "hg38": self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/Agilent_SSv7_allExons_hg38.bed" ) else: self.targetspath.set( "/data/CCBR_Pipeliner/db/PipeDB/lib/SureSelect_mm10.bed") label_ref_text = "By default, the path to the Agilent SureSelect Mouse All Exon V1 targets file is filled in here" targetsE.grid(row=5, column=1, columnspan=6, sticky=W, padx=10, pady=5) self.targetspath.trace( 'w', lambda a, b, c, x="targetspath": self.makejson(x)) label = Label(eframe, text=label_ref_text) label.grid(row=6, column=0, columnspan=5, sticky=W, padx=10, pady=5)
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) Pipelines = ["initialqcrnaseq", "rnaseq"] Pipeline = self.Pipeline = StringVar() Pipeline.set(Pipelines[0]) om = OptionMenu(eframe, Pipeline, *Pipelines, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) rReadlens = [ 'Read Length is 50', 'Read Length is 75', 'Read Length is 100', 'Read Length is 125', 'Read Length is 150', 'Read Length is 250' ] self.rReadlen = rReadlen = StringVar() rReadlen.set(rReadlens[2]) self.om2 = OptionMenu(eframe, rReadlen, *rReadlens, command=self.option_controller) #self.om2.grid(row=4,column=1,sticky=W,padx=10,pady=5) rStrands = [ '0, Reads are Unstranded', '1, Reads are from Sense Strand', '2, Reads are from Anti-Sense Strand' ] self.rStrand = rStrand = StringVar() rStrand.set(rStrands[0]) self.om3 = OptionMenu(eframe, rStrand, *rStrands, command=self.option_controller) #self.om3.grid(row=5,column=1,sticky=W,padx=10,pady=5) rDegs = [ "no, Do not Report Differentially Expressed Genes", "yes, Report Differentially Expressed Genes" ] self.rDeg = rDeg = StringVar() rDeg.set(rDegs[0]) self.om4 = OptionMenu(eframe, rDeg, *rDegs, command=self.option_controller) self.om4.grid(row=6, column=1, sticky=W, padx=10, pady=5) ##################### #Sample Threshold ##################### self.sampleLF = sampleLF = LabelFrame( eframe, text="Low Abundance Gene Thresholds") self.rMincount = rMincount = StringVar() rMincount.set("5") self.rMinsamples = rMinsamples = StringVar() rMinsamples.set("2") #rMincount.trace('w', lambda a,b,c,x="rmincount": makejson(x)) #Filter out genes < [5] read counts in < [2] samples rminsamplesL = Label(sampleLF, text="Include genes with >=") # in") rmincountE = Entry(sampleLF, bd=2, width=3, textvariable=rMincount) rmincountL = Label(sampleLF, text="read counts in >=") rminsamplesE = Entry(sampleLF, bd=2, width=3, textvariable=rMinsamples) rminsamplesR = Label(sampleLF, text="samples") rminsamplesL.grid(row=9, column=1, sticky=W, padx=10, pady=5) rmincountE.grid(row=9, column=2, sticky=W, padx=0, pady=5) rmincountL.grid(row=9, column=3, sticky=W, padx=5, pady=5) rminsamplesE.grid(row=9, column=4, sticky=W, padx=0, pady=5) rminsamplesR.grid(row=9, column=5, sticky=W, padx=10, pady=5) #rMinsamples.trace('w', lambda a,b,c,x="rmincount": makejson(x)) sampleLF.grid(row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10) ##################### self.add_info(eframe) self.option_controller()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs) : PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self,text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid( row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5 ) label = Label(eframe,text="Pipeline")#,fg=textLightColor,bg=baseColor) label.grid(row=3,column=0,sticky=W,padx=10,pady=5) PipelineLabels=["CellRanger","Initial/QC","Clustering","Multi-Sample Clustering" ] Pipelines=["cellranger","scrnaseqinit","scrnaseqcluster", "scrnaseqmulticluster"] self.label2pipeline = { k:v for k,v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config()#bg = widgetBgColor,fg=widgetFgColor) om["menu"].config()#bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3,column=1,sticky=W,padx=10,pady=5) self.crOpts = crOpts = LabelFrame( eframe, text="CellRanger Settings" ) self.scrCRID = scrCRID = StringVar() scrCRID.set("SPECIFY_PREFIX_HERE") self.scrExpected = scrExpected = StringVar() scrExpected.set("3000") scrcridL = Label(crOpts, text="CellRanger Sample ID: ") scrcridE = Entry(crOpts, bd =2, width=25, textvariable=scrCRID) scrcridL.grid(row=9,column=1,sticky=W,padx=10,pady=5) scrcridE.grid(row=9,column=2,sticky=W,padx=0,pady=5) screxpectedL = Label(crOpts, text="Expected number of cells: ") screxpectedE = Entry(crOpts, bd =2, width=8, textvariable=scrExpected) screxpectedL.grid(row=10,column=1,sticky=W,padx=10,pady=5) screxpectedE.grid(row=10,column=2,sticky=W,padx=0,pady=5) self.clusterOpts = clusterOpts = LabelFrame( eframe, text="Clustering and tSNE Options" ) self.scrPCs = scrPCs = StringVar() scrPCs.set("12") self.scrRes = scrRes = StringVar() scrRes.set("0.6") #scrPCs.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) #Filter out genes < [5] read counts in < [2] samples scrpcsL = Label(clusterOpts, text="Include principal components 1 through ") scrpcsE = Entry(clusterOpts, bd =2, width=3, textvariable=scrPCs) scrresL = Label(clusterOpts, text="with clustering resolution: ") scrresE = Entry(clusterOpts, bd =2, width=3, textvariable=scrRes) scrpcsL.grid(row=9,column=1,sticky=W,padx=10,pady=5) scrpcsE.grid(row=9,column=2,sticky=W,padx=0,pady=5) scrresL.grid(row=9,column=3,sticky=W,padx=5,pady=5) scrresE.grid(row=9,column=4,sticky=W,padx=0,pady=5) #scrRes.trace('w', lambda a,b,c,x="scrPCs": makejson(x)) clusterOpts.grid( row=8, column=0, columnspan=4, sticky=W, padx=20, pady=10 ) self.multiclusterOpts = multiclusterOpts = LabelFrame( eframe, text = "Multi-Sample Clustering and tSNE Options") scrccsL = Label(multiclusterOpts, text="Include canonical components 1 through ") scrccsE = Entry(multiclusterOpts, bd =2, width=3, textvariable=scrPCs) scrmcresL = Label(multiclusterOpts, text="with clustering resolution: ") scrmcresE = Entry(multiclusterOpts, bd =2, width=3, textvariable=scrRes) scrccsL.grid(row=9,column=1,sticky=W,padx=10,pady=5) scrccsE.grid(row=9,column=2,sticky=W,padx=0,pady=5) scrmcresL.grid(row=9,column=3,sticky=W,padx=5,pady=5) scrmcresE.grid(row=9,column=4,sticky=W,padx=0,pady=5) self.qcOpts = qcOpts = LabelFrame( eframe, text="Initial Settings" ) countL = Label( qcOpts, text="Counts/Matrix Dir:" ) countL.grid(row=9, column=1, sticky=W, padx=10, pady=5 ) countpath=StringVar() self.countpath = countpath count_entry = Entry(qcOpts, bd =2, width = 50, #bg = entryBgColor, #fg = entryFgColor, textvariable = countpath, state='normal' ) count_entry.grid( row=9, column=2, columnspan=3 ) self.count_button = count_button = Button( qcOpts, text="Open Directory", command=self.set_count_directory ) count_button.grid( row=9, column=5 ) self.mattype = mattype = StringVar() mattypeL = Label(qcOpts, text="Count matrix format: ") scrMatTypeDropdown = ["cellranger", "cellranger_raw", "zumi", "biorad"] mattype.set(scrMatTypeDropdown[0]) mattype_om = OptionMenu(qcOpts, mattype, *scrMatTypeDropdown) mattypeL.grid(row=10,column=1,sticky=W,padx=10,pady=5) mattype_om.grid(row=10,column=2,sticky=W,padx=0,pady=5) self.docycleregress = docycleregress = StringVar() docycleregressL = Label(qcOpts, text="Do cell cycle regression? ") scrCycleDropdown = ["TRUE", "FALSE"] docycleregress.set(scrCycleDropdown[0]) cycle_om = OptionMenu(qcOpts, docycleregress, *scrCycleDropdown) docycleregressL.grid(row=11,column=1,sticky=W,padx=10,pady=5) cycle_om.grid(row=11,column=2,sticky=W,padx=0,pady=5) usecycleregressL_c = Label(clusterOpts, text="Use cell cycle regressed data? ") docycleregress.set(scrCycleDropdown[0]) cycle_om_c = OptionMenu(clusterOpts, docycleregress, *scrCycleDropdown) usecycleregressL_c.grid(row=10,column=1,sticky=W,padx=10,pady=5) cycle_om_c.grid(row=10,column=2,sticky=W,padx=0,pady=5) usecycleregressL_mc = Label(multiclusterOpts, text="Use cell cycle regressed data? ") docycleregress.set(scrCycleDropdown[0]) cycle_om_mc = OptionMenu(multiclusterOpts, docycleregress, *scrCycleDropdown) usecycleregressL_mc.grid(row=10,column=1,sticky=W,padx=10,pady=5) cycle_om_mc.grid(row=10,column=2,sticky=W,padx=0,pady=5) groups_buttonL = Label(qcOpts, text="SAMPLE INFORMATION: ") groups_button = Button(qcOpts, text="Set Groups", command = self.popup_groups ) groups_buttonL.grid(row=12,column=1,sticky=W,padx=10,pady=5) groups_button.grid(row=12,column=2,sticky=W,padx=0,pady=5) ##################### self.option_controller()
def __init__(self, pipepanel, pipeline_name, *args, **kwargs): PipelineFrame.__init__(self, pipepanel, pipeline_name, *args, **kwargs) self.info = None eframe = self.eframe = LabelFrame(self, text="Options") #,fg=textLightColor,bg=baseColor) eframe.grid(row=5, column=1, sticky=W, columnspan=7, padx=10, pady=5) label = Label(eframe, text="Pipeline") #,fg=textLightColor,bg=baseColor) label.grid(row=3, column=0, sticky=W, padx=10, pady=5) PipelineLabels = ["Initial QC", "Differential Expression"] Pipelines = ["scrnaQC", "scrnaDE"] self.label2pipeline = {k: v for k, v in zip(PipelineLabels, Pipelines)} PipelineLabel = self.PipelineLabel = StringVar() self.Pipeline = StringVar() PipelineLabel.set(PipelineLabels[0]) om = OptionMenu(eframe, PipelineLabel, *PipelineLabels, command=self.option_controller) om.config() #bg = widgetBgColor,fg=widgetFgColor) om["menu"].config() #bg = widgetBgColor,fg=widgetFgColor) #om.pack(side=LEFT,padx=20,pady=5) om.grid(row=3, column=1, sticky=W, padx=10, pady=5) ######## QUALITY CONTROL/FILTERING/CLUSTERING ############### self.qcOptions = qcOptions = LabelFrame( eframe, text="QC, Filtering, and Initial Clustering") #algorithm selection self.clustAlg = clustAlg = StringVar() clustAlgLabel = Label(qcOptions, text="Clustering Algorithm: ") clustAlgDropdown = [ "SLM (Smart Local Moving)", "Louvain (Original)", "Louvain (with Multilevel Refinement)" ] clustAlg.set(clustAlgDropdown[0]) clustAlgOptMenu = OptionMenu(qcOptions, clustAlg, *clustAlgDropdown) clustAlgLabel.grid(row=8, column=1, sticky=W, padx=10, pady=5) clustAlgOptMenu.grid(row=8, column=2, sticky=W, padx=0, pady=5) #clustering resolutions self.resolution = resolution = StringVar() resolution.set("0.4,0.6,0.8,1.0,1.2") resolutionLabel = Label( qcOptions, text="Clustering Resolution(s): \nSeparate with commas") resolutionEntry = Entry(qcOptions, bd=2, width=25, textvariable=resolution) resolutionLabel.grid(row=9, column=1, sticky=W, padx=10, pady=5) resolutionEntry.grid(row=9, column=2, sticky=W, padx=0, pady=5) #annotation db: human: HPCA/BP Encode; mouse: immgen/mouseRNAseq self.annotDB = annotDB = StringVar() annotLabel = Label(qcOptions, text="Annotation database: ") annotHuman = ["HPCA", "BP Encode"] annotMouse = ["immgen", "mouseRNAseq"] annotDropdown = [] genome = self.global_info.annotation.get() if (genome == "GRCh38"): annotDropdown = annotHuman.copy() elif (genome == "mm10"): annotDropdown = annotMouse.copy() else: annotDropdown.append("No genome selected") annotDB.set(annotDropdown[0]) annotDB_om = OptionMenu(qcOptions, annotDB, *annotDropdown) annotLabel.grid(row=10, column=1, sticky=W, padx=10, pady=5) annotDB_om.grid(row=10, column=2, sticky=W, padx=0, pady=5) #set groups, mostly for relabeling purposes self.add_info(qcOptions) #Position 11 # self.option_controller() # groups_buttonL = Label(qcOptions, text="Sample Information: ") # groups_button = Button(qcOptions, # text="Set Groups", # command = self.popup_groups ) # groups_buttonL.grid(row=12,column=1,sticky=W,padx=10,pady=5) # groups_button.grid(row=12,column=2,sticky=W,padx=0,pady=5) # # ######### DIFFERENTIAL EXPRESSION ######### self.deOptions = deOptions = LabelFrame( eframe, text="Differential Gene Expression") #option for cluster resolution for DE self.resolutionDE = resolutionDE = StringVar() resolutionDE.set("0.8") resolutionDELabel = Label( deOptions, text= "Clustering Resolution: \nChoose a previous resolution or \nselect a new resolution to run" ) resolutionDEEntry = Entry(deOptions, bd=2, width=25, textvariable=resolutionDE) resolutionDELabel.grid(row=10, column=1, sticky=W, padx=10, pady=5) resolutionDEEntry.grid(row=10, column=2, sticky=W, padx=0, pady=5) #option for merged/integrated object # self.integrateOption = integrateOption = StringVar() # integrateLabel = Label(deOptions, text="Merged or Integrated (batch corrected): ") # integrateDropdown = ["Merged","Integrated"] # integrateOption.set(integrateDropdown[0]) # integrateOptMenu = OptionMenu(deOptions, integrateOption, *integrateDropdown) # integrateLabel.grid(row=9,column=1,sticky=W,padx=10,pady=5) # integrateOptMenu.grid(row=9,column=2,sticky=W,padx=0,pady=5) self.add_info(deOptions) #Position 11 self.option_controller()