本文整理汇总了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)