本文整理汇总了Python中RNA.free_arrays方法的典型用法代码示例。如果您正苦于以下问题:Python RNA.free_arrays方法的具体用法?Python RNA.free_arrays怎么用?Python RNA.free_arrays使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RNA
的用法示例。
在下文中一共展示了RNA.free_arrays方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: local_search
# 需要导入模块: import RNA [as 别名]
# 或者: from RNA import free_arrays [as 别名]
def local_search(start_seq_, target_structs_, seq_constraint_,
context_front=None, context_back=None):
global start_seq
global seq_constraint
global target_structs
rna.check_struct_seq_match(target_structs_[0], start_seq_)
rna.check_struct_seq_match(target_structs_[1], start_seq_)
start_seq = start_seq_
target_structs = target_structs_
seq_constraint = seq_constraint_
# # TODO: has to be checked
# preset_dangles = RNA.dangles
# if preset_dangles != 0:
# RNA.dangles = 1
if (SEARCH_STRATEGY == SearchStrategy.adaptive_walk or
SEARCH_STRATEGY == SearchStrategy.stochastic_local_search):
seq, cost, steps = local_search_sls_pf()
elif SEARCH_STRATEGY == SearchStrategy.full_local_search:
seq, cost, steps = local_search_fls_pf()
else:
raise ValueError("Specified search strategy not valid.")
eval_seq_container.reset()
vienna_rna.free_pf_arrays()
vienna_rna.free_arrays()
# RNA.dangles = preset_dangles
return seq, cost, steps