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

allpy

changeset 990:3ed2dc81ac73

pair_cores: add --pair-timeout (Bron-Kerbosh (pair cores) timeout)
author Boris Nagaev <bnagaev@gmail.com>
date Thu, 01 Mar 2012 01:11:34 +0400
parents 43d4854f3473
children b8f1c216bca8
files pair_cores/pair_cores.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/pair_cores/pair_cores.py	Thu Mar 01 01:05:24 2012 +0400
     1.2 +++ b/pair_cores/pair_cores.py	Thu Mar 01 01:11:34 2012 +0400
     1.3 @@ -20,7 +20,7 @@
     1.4      out_alignment_file=None, out_pair_cores_file=None, out_html_file=None,
     1.5      pdb_getter=cached_download_pdb, out_pymol_file=None, min_width=4,
     1.6      out_high_blocks_file=None, out_high_blocks_html_file=None, blocks3d=False,
     1.7 -    blocks3d_timeout=-1):
     1.8 +    blocks3d_timeout=-1,pair_timeout=0):
     1.9      """ Turn pdb markup into homology_file
    1.10  
    1.11      * markup_file -- file with pdb markup of alignment
    1.12 @@ -37,6 +37,7 @@
    1.13      * out_high_blocks_html_file -- output HTML file with blocks of multiple sequences
    1.14      * blocks3d -- if old (graph-based) blocks algorithm is used
    1.15      * blocks3d_timeout -- Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)
    1.16 +    * pair_timeout -- Bron-Kerbosh (pair cores) timeout (-1 - unlimited)
    1.17      """
    1.18      if markup_file:
    1.19          input_file = markup_file
    1.20 @@ -66,7 +67,7 @@
    1.21      if len(alignment.sequences) < 2:
    1.22          raise Exception("Alignment from file %s has too few sequences" % input_file)
    1.23      block = Block.from_alignment(alignment)
    1.24 -    blocks = block.pair_core_parts(max_delta=max_delta, timeout=0,
    1.25 +    blocks = block.pair_core_parts(max_delta=max_delta, timeout=pair_timeout,
    1.26          min_width=min_width, ignore_one_ss=ignore_one_ss)
    1.27      alignment.blocks_to_homology(homology_file, blocks)
    1.28      homology_file.close()
    1.29 @@ -118,6 +119,8 @@
    1.30      p.add_argument('--blocks3d',help='Use blocks3d algorithm for high blocks',action='store_true')
    1.31      p.add_argument('--blocks3d-timeout',help='Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)',
    1.32              metavar='int',type=timeout,default=config.timeout_2)
    1.33 +    p.add_argument('--pair-timeout',help='Bron-Kerbosh (pair cores) timeout (-1 - unlimited)',
    1.34 +            metavar='int',type=timeout,default=0)
    1.35      args = p.parse_args()
    1.36      homology_from_3d(markup_file=args.m, homology_file=args.y, max_delta=args.d, ignore_one_ss=args.e,
    1.37          alignment_file=args.i, out_alignment_file=args.o, out_pair_cores_file=args.b,
    1.38 @@ -125,7 +128,8 @@
    1.39          out_pymol_file=args.p,min_width=args.w,
    1.40          out_high_blocks_file=args.high_blocks,
    1.41          out_high_blocks_html_file=args.high_blocks_html,
    1.42 -        blocks3d=args.blocks3d, blocks3d_timeout=args.blocks3d_timeout)
    1.43 +        blocks3d=args.blocks3d, blocks3d_timeout=args.blocks3d_timeout,
    1.44 +        pair_timeout=args.pair_timeout)
    1.45  
    1.46  if __name__ == '__main__':
    1.47          main()