當前位置: 首頁>>代碼示例>>Python>>正文


Python Helper.getSampleName方法代碼示例

本文整理匯總了Python中Helper.Helper.getSampleName方法的典型用法代碼示例。如果您正苦於以下問題:Python Helper.getSampleName方法的具體用法?Python Helper.getSampleName怎麽用?Python Helper.getSampleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Helper.Helper的用法示例。


在下文中一共展示了Helper.getSampleName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: newAssay

# 需要導入模塊: from Helper import Helper [as 別名]
# 或者: from Helper.Helper import getSampleName [as 別名]
    def newAssay(self):
        '''
        Function wich starts a new analysis
        '''
        
        inputTab = self.view.tabMainWindow.widget(0)
        
        #get Parameters 
        parameters=Parameters(inputTab)
        if parameters.paired==True:
            #fastqs=inputTab.dropList.dropFirstTwoItems()
            fastqs = inputTab.dropList.dropFirstItem()
            if fastqs[0]!=None:
                if not str(fastqs[0].text()).endswith(".bam"):
                    fastqs+=inputTab.dropList.dropFirstItem()
        else:
            fastqs = inputTab.dropList.dropFirstItem()        
        
        """
        check if droplist returned a value
        """
        if parameters.paired==True:
            if fastqs[-1] == None:
                QtGui.QMessageBox.information(self.view,"Warning","Warning:\nNot enough Sequencing Files for paired-end sequencing!!!\n\nDrop FASTQ-Files to the drop area!")
                return
        if fastqs[0] == None:
            QtGui.QMessageBox.information(self.view,"Warning","Warning:\nNo Sequencing Files found!!!\n\nDrop FASTQ-Files to the drop area!")
            return
        sampleName = Helper.getSampleName(str(fastqs[0].text()))
        if sampleName == None:
            QtGui.QMessageBox.information(self.view,"Warning","Warning:\nNo valid Sequencing File!!!\n\nDrop FASTQ-Files to the drop area!")
            return
        
        fastqFiles=[]
        for fastq in fastqs:
            fastqFiles.append(str(fastq.text()))

        
        
        runTab = RunTab(self)

        
        
        #initialize new Thread with new assay
        try:
            assay = RnaEdit(fastqFiles, parameters,runTab.commandBox)
        except Exception as err:
            QtGui.QMessageBox.information(self.view,"Error", str(err)+"Cannot start Analysis!")
            Helper.error(str(err) + "\n creating rnaEditor Object Failed!", textField=runTab.commandBox)
        currentIndex = self.view.tabMainWindow.count()

        # self.view.tabMainWindow.addTab(self.runTab, "Analysis"+ str(Helper.assayCount))
        self.view.tabMainWindow.addTab(runTab, sampleName + " " + str(currentIndex))
        Helper.runningThreads.append(assay)
        
        assay.start()
        
        self.view.connect(assay, QtCore.SIGNAL("taskDone"), self.openAnalysis)
開發者ID:djhn75,項目名稱:RNAEditor,代碼行數:60,代碼來源:GuiControll.py


注:本文中的Helper.Helper.getSampleName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。