def load(self): loadwin = LoadWindow() res=loadwin.exec_() if res==QtGui.QDialog.Accepted: tablefname=str(loadwin.tLoadTable.text()) mapfname=str(loadwin.tLoadMap.text()) expname=str(loadwin.tLoadName.text()) metabolite=loadwin.cMetabolite.checkState() if metabolite: tabletype='meta' else: tabletype='biom' expdat=hs.load(tablefname,mapfname,tabletype=tabletype) expdat.studyname=expname self.addexp(expdat) # for biom table show the number of reads` if tabletype=='biom': # hs.analyzenumreads(expdat) pass
def load(self): loadwin = LoadWindow() res = loadwin.exec_() if res == QtWidgets.QDialog.Accepted: tablefname = str(loadwin.tLoadTable.text()) mapfname = str(loadwin.tLoadMap.text()) expname = str(loadwin.tLoadName.text()) metabolite = loadwin.cMetabolite.checkState() emp = loadwin.cEMP.checkState() normalize = not loadwin.cNoNormalize.checkState() if metabolite: tabletype = "meta" else: tabletype = "biom" expdat = hs.load(tablefname, mapfname, tabletype=tabletype, mapsampletolowercase=emp, normalize=normalize) expdat.studyname = expname self.addexp(expdat) # for biom table show the number of reads` if tabletype == "biom": # hs.analyzenumreads(expdat) pass
def __init__(self): super(AppWindow, self).__init__() uic.loadUi(hs.get_data_path('appwindow.py','ui'), self) self.bMainLoadNew.clicked.connect(self.load) self.bPickleLoad.clicked.connect(self.pickleload) self.bMainPlot.clicked.connect(self.plot) self.bMainAdvancedPlot.clicked.connect(self.advplot) self.bMainFilterSamples.clicked.connect(self.filtersamples) self.bDiffExp.clicked.connect(self.diffexp) self.bCorrelation.clicked.connect(self.correlation) self.bFilterSimilarSamples.clicked.connect(self.filtersimilarsamples) self.bClassifier.clicked.connect(self.classify) self.bFilterOrigReads.clicked.connect(self.filterorigreads) self.bMainSortSamples.clicked.connect(self.sortsamples) self.bMainClusterBacteria.clicked.connect(self.clusterbacteria) self.bMainFilterMinReads.clicked.connect(self.filterminreads) self.bMainFilterTaxonomy.clicked.connect(self.filtertaxonomy) self.bFilterAnnotation.clicked.connect(self.filterannotation) self.bFilterPresence.clicked.connect(self.filterpresence) self.bFilterMean.clicked.connect(self.filtermean) self.bSortAbundance.clicked.connect(self.sortabundance) self.bJoinFields.clicked.connect(self.joinfields) self.bJoinExps.clicked.connect(self.joinexps) self.bBicluster.clicked.connect(self.bicluster) self.bEnrichment.clicked.connect(self.enrichment) self.bFilterFasta.clicked.connect(self.filterfasta) self.bRenormalize.clicked.connect(self.renormalize) self.bCleanTaxonomy.clicked.connect(self.cleantaxonomy) self.bSubsample.clicked.connect(self.subsample) self.cDebugMode.stateChanged.connect(self.debugmode) # the main list right mouse menu self.bMainList.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.bMainList.connect(self.bMainList, QtCore.SIGNAL("customContextMenuRequested(QPoint)"),self.listItemRightClicked) self.show() self.bactdb=False self.cooldb=False try: hs.Debug(6,'Connecting to sequence database') bdbpath=hs.get_data_path('SRBactDB.db','db') hs.Debug(6,'From %s' % bdbpath) self.bactdb=hs.bactdb.dbstart(bdbpath) hs.Debug(6,'Sequence database connected') except: hs.Debug(9,'sequence database file not found') try: hs.Debug(6,'Loading coolseq database') cdbpath=hs.get_data_path('coolseqs.txt','db') hs.Debug(6,'From %s' % cdbpath) self.cooldb=hs.cooldb.loaddb(cdbpath) hs.Debug(6,'coolseq database loaded') except: hs.Debug(9,'CoolDB file not found') # put some experiments: hs.Debug(6,'Loading sample experiment') try: expdat=hs.load('./test_data/bears.clean.new.withtax.biom','./test_data/map.txt') self.addexp(expdat) except: hs.Debug(6,'Sample experiment not found. sorry')