Пример #1
0
	def registerExecutables(self, workflow=None):
		"""
		2012.2.15
		"""
		AbstractWorkflow.registerExecutables(self)
		
		namespace = self.namespace
		version = self.version
		operatingSystem = self.operatingSystem
		architecture = self.architecture
		clusters_size = self.clusters_size
		site_handler = self.site_handler
		variationSrcPath = self.variationSrcPath
		vervetSrcPath = self.vervetSrcPath
		
		#2012.8.7 each cell is a tuple of (executable, clusterSizeMultipler (0 if u do not need clustering)
		executableClusterSizeMultiplierList = []
		
		Stock_250kDB = Executable(namespace=namespace, name="Stock_250kDB", version=version, \
						os=operatingSystem, arch=architecture, installed=True)
		Stock_250kDB.addPFN(PFN("file://" + os.path.join(self.variationSrcPath, "db/Stock_250kDB.py"), site_handler))
		executableClusterSizeMultiplierList.append((Stock_250kDB, 0))
		
		self.addExecutableAndAssignProperClusterSize(executableClusterSizeMultiplierList, defaultClustersSize=self.clusters_size)
		
		
	def registerCustomExecutables(self, workflow=None):
		"""
		2011-11-28
		"""
		AbstractWorkflow.registerCustomExecutables(self, workflow)
		
		namespace = workflow.namespace
		version = workflow.version
		operatingSystem = workflow.operatingSystem
		architecture = workflow.architecture
		clusters_size = workflow.clusters_size
		site_handler = workflow.site_handler
		vervetSrcPath = self.vervetSrcPath
		
		executableClusterSizeMultiplierList = []	#2012.8.7 each cell is a tuple of (executable, clusterSizeMultipler (0 if u do not need clustering)
		
		
		nucmer = Executable(namespace=namespace, name="nucmer", version=version, \
						os=operatingSystem, arch=architecture, installed=True)
		nucmer.addPFN(PFN("file://" + os.path.join(self.mummer_path, "nucmer"), site_handler))
		executableClusterSizeMultiplierList.append((nucmer, 0))
		
		
		PostNucmer = Executable(namespace=namespace, name="PostNucmer", version=version, \
										os=operatingSystem, arch=architecture, installed=True)
		PostNucmer.addPFN(PFN("file://" + os.path.join(vervetSrcPath, "shell/PostNucmer.sh"), site_handler))
		executableClusterSizeMultiplierList.append((PostNucmer, 0))
		
		self.addExecutableAndAssignProperClusterSize(executableClusterSizeMultiplierList, defaultClustersSize=self.clusters_size)
		
		#2013.07.26
		self.addOneExecutableFromPathAndAssignProperClusterSize(path= os.path.join(vervetSrcPath, "mapper/SelectAndSplitFastaRecords.py"), \
												name='SelectAndSplitFastaRecords', clusterSizeMultipler=0)
Пример #3
0
	def __init__(self,  **keywords):
		"""
		2012.2.15
		"""
		AbstractWorkflow.__init__(self, **keywords)
		
		self.variationSrcPath = self.insertHomePath(self.variationSrcPath, self.home_path)
		self.tabixPath =  self.insertHomePath(self.tabixPath, self.home_path)
		
		self.chr_pattern = re.compile(r'(\w+\d+).*')
		self.contig_id_pattern = re.compile(r'Contig(\d+).*')
		
		self.connectDB()
		
		if not self.data_dir:
			self.data_dir = self.db.data_dir
	def __init__(self,  **keywords):
		"""
		2011-7-11
		"""
		self.pathToInsertHomePathList.append('mummer_path')	#inserted before AbstractWorkflow.__init__()
		AbstractWorkflow.__init__(self, **keywords)