def advplot(self): items=self.bMainList.selectedItems() if len(items)!=1: print("Need 1 item") return for citem in items: cname=str(citem.text()) cexp=self.explist[cname] dwin = AdvPlotWindow(cexp) res=dwin.exec_() if res==QtGui.QDialog.Accepted: minreads=dwin.sMinReads.value() cnumeric=dwin.cNumeric.checkState() if cnumeric==0: numeric=False else: numeric=True cshowline=dwin.cLines.checkState() if cshowline==0: showline=False else: showline=True csort=dwin.cSort.checkState() if csort==0: sortfield=False else: sortfield=str(dwin.cField.currentText()) hs.plotexp(cexp,sortby=sortfield,numeric=numeric,showline=showline,minreads=minreads,usegui=True,cdb=self.cooldb,seqdb=self.bactdb)
def view(self): cexp=self.cexp allsamp=np.arange(len(cexp.samples)) allbact=np.arange(len(cexp.seqs)) x=np.setdiff1d(allsamp,self.samples) sampo=np.concatenate((self.samples,x)) ubact=[] for cseq in self.seqs: ubact.append(cexp.seqdict[cseq]) bacto=np.concatenate((ubact,np.setdiff1d(allbact,ubact))) newexp=hs.reorderbacteria(cexp,bacto) newexp=hs.reordersamples(newexp,sampo,inplace=True) hs.plotexp(newexp,seqdb=self.bactdb,sortby=False,numeric=False,usegui=True,cdb=self.cooldb,showline=False)
def plotexp(self,**kwargs): hs.plotexp(self,**kwargs)
def plot(self): items=self.bMainList.selectedItems() for citem in items: cname=str(citem.text()) hs.plotexp(self.explist[cname],usegui=True,sortby=False,seqdb=self.bactdb,cdb=self.cooldb)