本文整理汇总了Python中pymodule.PassingData.OR_min_max方法的典型用法代码示例。如果您正苦于以下问题:Python PassingData.OR_min_max方法的具体用法?Python PassingData.OR_min_max怎么用?Python PassingData.OR_min_max使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymodule.PassingData
的用法示例。
在下文中一共展示了PassingData.OR_min_max方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_button_filechooser_ok_clicked
# 需要导入模块: from pymodule import PassingData [as 别名]
# 或者: from pymodule.PassingData import OR_min_max [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:
#.........这里部分代码省略.........