Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/raw-rev/3ed2dc81ac73
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 07:55:19 2012
Кодировка:

# HG changeset patch
# User Boris Nagaev
# Date 1330549894 -14400
# Node ID 3ed2dc81ac73cf31f9cbcc0789f949e70f90a477
# Parent 43d4854f347374134b72f50cbeeceebfc3118e8d
pair_cores: add --pair-timeout (Bron-Kerbosh (pair cores) timeout)

diff -r 43d4854f3473 -r 3ed2dc81ac73 pair_cores/pair_cores.py
--- a/pair_cores/pair_cores.py Thu Mar 01 01:05:24 2012 +0400
+++ b/pair_cores/pair_cores.py Thu Mar 01 01:11:34 2012 +0400
@@ -20,7 +20,7 @@
out_alignment_file=None, out_pair_cores_file=None, out_html_file=None,
pdb_getter=cached_download_pdb, out_pymol_file=None, min_width=4,
out_high_blocks_file=None, out_high_blocks_html_file=None, blocks3d=False,
- blocks3d_timeout=-1):
+ blocks3d_timeout=-1,pair_timeout=0):
""" Turn pdb markup into homology_file

* markup_file -- file with pdb markup of alignment
@@ -37,6 +37,7 @@
* out_high_blocks_html_file -- output HTML file with blocks of multiple sequences
* blocks3d -- if old (graph-based) blocks algorithm is used
* blocks3d_timeout -- Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)
+ * pair_timeout -- Bron-Kerbosh (pair cores) timeout (-1 - unlimited)
"""
if markup_file:
input_file = markup_file
@@ -66,7 +67,7 @@
if len(alignment.sequences) < 2:
raise Exception("Alignment from file %s has too few sequences" % input_file)
block = Block.from_alignment(alignment)
- blocks = block.pair_core_parts(max_delta=max_delta, timeout=0,
+ blocks = block.pair_core_parts(max_delta=max_delta, timeout=pair_timeout,
min_width=min_width, ignore_one_ss=ignore_one_ss)
alignment.blocks_to_homology(homology_file, blocks)
homology_file.close()
@@ -118,6 +119,8 @@
p.add_argument('--blocks3d',help='Use blocks3d algorithm for high blocks',action='store_true')
p.add_argument('--blocks3d-timeout',help='Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)',
metavar='int',type=timeout,default=config.timeout_2)
+ p.add_argument('--pair-timeout',help='Bron-Kerbosh (pair cores) timeout (-1 - unlimited)',
+ metavar='int',type=timeout,default=0)
args = p.parse_args()
homology_from_3d(markup_file=args.m, homology_file=args.y, max_delta=args.d, ignore_one_ss=args.e,
alignment_file=args.i, out_alignment_file=args.o, out_pair_cores_file=args.b,
@@ -125,7 +128,8 @@
out_pymol_file=args.p,min_width=args.w,
out_high_blocks_file=args.high_blocks,
out_high_blocks_html_file=args.high_blocks_html,
- blocks3d=args.blocks3d, blocks3d_timeout=args.blocks3d_timeout)
+ blocks3d=args.blocks3d, blocks3d_timeout=args.blocks3d_timeout,
+ pair_timeout=args.pair_timeout)

if __name__ == '__main__':
main()