本文整理汇总了Python中pymodule.PassingData.parameters方法的典型用法代码示例。如果您正苦于以下问题:Python PassingData.parameters方法的具体用法?Python PassingData.parameters怎么用?Python PassingData.parameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymodule.PassingData
的用法示例。
在下文中一共展示了PassingData.parameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_parameters
# 需要导入模块: from pymodule import PassingData [as 别名]
# 或者: from pymodule.PassingData import parameters [as 别名]
def generate_parameters(self, parameter_names, parameter_depth=2):
"""
2008-05-19
min_call_probability = self.min_call_probability
2008-05-11
put NA rate into passing parameters as well. too much memory consumption on each computing node
"""
sys.stderr.write("Generating parameter settings ...")
param_d = PassingData()
for parameter_name in parameter_names:
parameter_value = getattr(self, parameter_name)
parameter_value = parameter_value.split(",")
parameter_value = map(float, parameter_value)
setattr(self, parameter_name, parameter_value)
"""
#2008-05-19 commented out. use self.min_call_probability
#figure out call probability from input_fname
import re
call_prob_pattern = re.compile(r'_(\d+)\.csv')
call_prob_p_result = call_prob_pattern.search(self.input_fname)
if call_prob_p_result:
min_call_probability = float(call_prob_p_result.groups()[0])
else:
min_call_probability = -1
"""
min_call_probability = self.min_call_probability
# only 1st 4, last 2 passed to computing node
parameters = []
for max_call_mismatch_rate in getattr(self, parameter_names[0]):
for max_call_NA_rate in getattr(self, parameter_names[1]):
for max_snp_mismatch_rate in getattr(self, parameter_names[2]):
for max_snp_NA_rate in getattr(self, parameter_names[3]):
for npute_window_size in getattr(self, parameter_names[4]):
parameters.append(
[
min_call_probability,
max_call_mismatch_rate,
max_call_NA_rate,
max_snp_mismatch_rate,
max_snp_NA_rate,
npute_window_size,
]
)
param_d.parameters = parameters
param_d.max_snp_NA_rate_ls = self.max_snp_NA_rate_ls
param_d.npute_window_size_ls = self.npute_window_size_ls
sys.stderr.write(" %s parameter settings to process. Done.\n" % len(parameters))
return param_d