当前位置: 首页>>代码示例>>Python>>正文


Python PassingData.stop方法代码示例

本文整理汇总了Python中pymodule.PassingData.stop方法的典型用法代码示例。如果您正苦于以下问题:Python PassingData.stop方法的具体用法?Python PassingData.stop怎么用?Python PassingData.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pymodule.PassingData的用法示例。


在下文中一共展示了PassingData.stop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: returnGeneSegments

# 需要导入模块: from pymodule import PassingData [as 别名]
# 或者: from pymodule.PassingData import stop [as 别名]
	def returnGeneSegments(self, db, elem=None, gene_commentary=None, commentary_type=None):
		"""
		2012.5.15
			add argument commentary_type to stop replicating gene_commentary.gene_commentary_type
		2008-07-28
		"""
		start_ls, stop_ls, gi_ls = self.return_location_list(elem)
		gene_segments = []
		min_start = start_ls[0]
		max_stop = stop_ls[0]
		if commentary_type:
			gene_commentary_type = db.getGeneCommentaryType(commentary_type=commentary_type)
		else:
			gene_commentary_type = gene_commentary.gene_commentary_type
		for i in range(len(start_ls)):
			start = start_ls[i]
			stop = stop_ls[i]
			min_start_stop = min(start, stop)
			max_start_stop = max(start, stop)
			if min_start_stop < min_start:
				min_start = min_start_stop
			if max_start_stop > max_stop:
				max_stop = max_start_stop
			gi = gi_ls[i]
			gene_segment = GeneSegment(start=start, stop=stop, gi=gi, gene_commentary_type=gene_commentary_type)
			gene_segment.gene_commentary = gene_commentary
			gene_segments.append(gene_segment)
		passingdata = PassingData()
		passingdata.gene_segments = gene_segments
		passingdata.start = min_start
		passingdata.stop = max_stop
		return passingdata
开发者ID:polyactis,项目名称:transfac,代码行数:34,代码来源:GeneASNXML2gene_mapping.py

示例2: on_button_filechooser_ok_clicked

# 需要导入模块: from pymodule import PassingData [as 别名]
# 或者: from pymodule.PassingData import stop [as 别名]
	def on_button_filechooser_ok_clicked(self, widget, data=None):
		"""
		2008-12-16
			allow gwr name to be specified
			add function to get gwr from db based on call_method_id, analysis_method_id, phenotype_method_id
		2008-10-12
			add checkbutton_draw_line_as_point
			add checkbutton_4th_col_stop_pos
		2008-08-03
			restrict the data by (chromosome, start, stop)
		2008-05-31
			add check button to handle log10 transformation
		2008-05-28
			use GenomeWideResult and etc
		2008-02-14
			set the window title by the input filename
		"""
		input_fname = self.filechooserdialog1.get_filename()
		self.filechooserdialog1.hide()
		if not self.mysql_conn or not self.mysql_curs:
			self.db_connect()
		self.app1.set_title("Genome Browser: %s"%input_fname)
		
		checkbutton_log10_transformation = self.xml.get_widget("checkbutton_log10_transformation")
		if checkbutton_log10_transformation.get_active():
			do_log10_transformation = True
		else:
			do_log10_transformation = False
		
		if self.entry_min_value_cutoff.get_text():
			min_value_cutoff = float(self.entry_min_value_cutoff.get_text())
		else:
			min_value_cutoff = None
		
		#2008-08-03
		pdata = PassingData()
		entry_chromosome = self.xml.get_widget("entry_chromosome")
		if entry_chromosome.get_text():
			pdata.chromosome = int(entry_chromosome.get_text())
		entry_start = self.xml.get_widget("entry_start")
		if entry_start.get_text():
			pdata.start = int(entry_start.get_text())
		entry_stop = self.xml.get_widget("entry_stop")
		if entry_stop.get_text():
			pdata.stop = int(entry_stop.get_text())
		
		# 2009-10-27
		if self.entry_max_value_cutoff.get_text():
			pdata.max_value_cutoff = float(self.entry_max_value_cutoff.get_text())
		else:
			pdata.max_value_cutoff = None
		# 2009-10-27
		checkbutton_OR_min_max = self.xml.get_widget("checkbutton_OR_min_max")
		if checkbutton_OR_min_max.get_active():
			pdata.OR_min_max = True
		else:
			pdata.OR_min_max = False
		
		checkbutton_4th_col_stop_pos = self.xml.get_widget("checkbutton_4th_col_stop_pos")
		if checkbutton_4th_col_stop_pos.get_active():
			pdata.is_4th_col_stop_pos = True
		else:
			pdata.is_4th_col_stop_pos = False
		
		checkbutton_draw_line_as_point = self.xml.get_widget("checkbutton_draw_line_as_point")
		if checkbutton_draw_line_as_point.get_active():
			draw_line_as_point= True
		else:
			draw_line_as_point = False
		
		entry_gwr_name = self.xml.get_widget("entry_gwr_name")
		if entry_gwr_name.get_text():
			pdata.gwr_name = entry_gwr_name.get_text()
		else:
			pdata.gwr_name = None
		
		entry_call_method_id = self.xml.get_widget("entry_call_method_id")
		call_method_id = entry_call_method_id.get_text()
		entry_analysis_method_id = self.xml.get_widget("entry_analysis_method_id")
		analysis_method_id = entry_analysis_method_id.get_text()
		entry_phenotype_method_id = self.xml.get_widget("entry_phenotype_method_id")
		phenotype_method_id = entry_phenotype_method_id.get_text()
		
		if call_method_id and analysis_method_id and phenotype_method_id:
			call_method_id = int(call_method_id)
			analysis_method_id = int(analysis_method_id)
			phenotype_method_id = int(phenotype_method_id)
			rows = Stock_250kDB.ResultsMethod.query.filter_by(call_method_id=call_method_id).filter_by(analysis_method_id=analysis_method_id).\
					filter_by(phenotype_method_id=phenotype_method_id).filter_by(results_method_type_id=1)
			if rows.count()==1:
				rm = rows.first()
			elif rows.count()==0:
				sys.stderr.write("No result fetched from db based on call_method_id=%s, analysis_method_id=%s, phenotype_method_id=%s.\n"%\
								(call_method_id, analysis_method_id, phenotype_method_id))
				rm = None
			else:
				sys.stderr.write("First result out of %s results fetched from db based on call_method_id=%s, analysis_method_id=%s, phenotype_method_id=%s.\n"%\
								(rows.count(), call_method_id, analysis_method_id, phenotype_method_id))
				rm = rows.first()
			if rm:
#.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:103,代码来源:


注:本文中的pymodule.PassingData.stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。