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

allpy

changeset 1035:1c2250aa5b32

pair-cores: add option to output high blocks in pymol see #148
author Boris Nagaev <bnagaev@gmail.com>
date Mon, 19 Mar 2012 22:56:16 +0400
parents 9ae235d79156
children ec921ac2b553
files pair_cores/pair_cores.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/pair_cores/pair_cores.py	Fri Mar 16 23:43:28 2012 +0400
     1.2 +++ b/pair_cores/pair_cores.py	Mon Mar 19 22:56:16 2012 +0400
     1.3 @@ -19,7 +19,8 @@
     1.4  def homology_from_3d(markup_file, homology_file, max_delta, ignore_one_ss=False, alignment_file=None,
     1.5      out_alignment_file=None, out_pair_cores_file=None, out_html_file=None,
     1.6      pdb_getter=cached_download_pdb, out_pymol_file=None, min_width=4,
     1.7 -    out_high_blocks_file=None, out_high_blocks_html_file=None, blocks3d=False,
     1.8 +    out_high_blocks_file=None, out_high_blocks_html_file=None,
     1.9 +    out_high_blocks_pymol_file=None, blocks3d=False,
    1.10      blocks3d_timeout=-1,pair_timeout=0):
    1.11      """ Turn pdb markup into homology_file
    1.12  
    1.13 @@ -35,6 +36,7 @@
    1.14      * min_width -- min width of each core
    1.15      * out_high_blocks_file -- output file with blocks of multiple sequences
    1.16      * out_high_blocks_html_file -- output HTML file with blocks of multiple sequences
    1.17 +    * out_high_blocks_pymol_file -- output PyMol file with blocks of multiple sequences
    1.18      * blocks3d -- if old (graph-based) blocks algorithm is used
    1.19      * blocks3d_timeout -- Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)
    1.20      * pair_timeout -- Bron-Kerbosh (pair cores) timeout (-1 - unlimited)
    1.21 @@ -79,7 +81,7 @@
    1.22          block.blocks_to_html(out_html_file, blocks, open(html_template).read())
    1.23      if out_pymol_file:
    1.24          block.blocks_to_pymol(out_pymol_file, blocks)
    1.25 -    if out_high_blocks_file or out_high_blocks_html_file:
    1.26 +    if out_high_blocks_file or out_high_blocks_html_file or out_high_blocks_pymol_file:
    1.27          high_blocks = []
    1.28          if blocks3d:
    1.29              high_blocks = list(block.blocks3d(parts=blocks,
    1.30 @@ -99,6 +101,8 @@
    1.31          if out_high_blocks_html_file:
    1.32              block.blocks_to_html(out_high_blocks_html_file, high_blocks,
    1.33                  open(html_template).read())
    1.34 +        if out_high_blocks_pymol_file:
    1.35 +            block.blocks_to_pymol(out_high_blocks_pymol_file, high_blocks)
    1.36  
    1.37  def main():
    1.38      r = argparse.FileType('r')
    1.39 @@ -120,6 +124,7 @@
    1.40  
    1.41      p.add_argument('--high-blocks',help='Output text file with high blocks',metavar='FILE',type=w)
    1.42      p.add_argument('--high-blocks-html',help='Output HTML file with high blocks',metavar='FILE',type=w)
    1.43 +    p.add_argument('--high-blocks-pymol',help='Output PyMol file with high blocks',metavar='FILE',type=w)
    1.44      p.add_argument('--blocks3d',help='Use blocks3d algorithm for high blocks',action='store_true')
    1.45      p.add_argument('--blocks3d-timeout',help='Bron-Kerbosh (blocks3d) timeout (-1 - unlimited)',
    1.46              metavar='int',type=timeout,default=config.timeout_2)
    1.47 @@ -132,6 +137,7 @@
    1.48          out_pymol_file=args.p,min_width=args.w,
    1.49          out_high_blocks_file=args.high_blocks,
    1.50          out_high_blocks_html_file=args.high_blocks_html,
    1.51 +        out_high_blocks_pymol_file=args.high_blocks_pymol,
    1.52          blocks3d=args.blocks3d, blocks3d_timeout=args.blocks3d_timeout,
    1.53          pair_timeout=args.pair_timeout)
    1.54