Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/447c048047b2
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:32:50 2012
Кодировка: UTF-8
allpy: 447c048047b2

allpy

changeset 1039:447c048047b2 1.4.2

Merge pair-cores new option for pymol high blocks from default into 1.4.2
author Boris Nagaev <bnagaev@gmail.com>
date Tue, 20 Mar 2012 01:39:28 +0400
parents b551ded1420a ec921ac2b553
children 73579ca7c1b5
files pair_cores/pair_cores.py
diffstat 4 files changed, 14 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/pair_cores/pair_cores.py	Mon Mar 19 15:22:32 2012 +0400
     1.2 +++ b/pair_cores/pair_cores.py	Tue Mar 20 01:39:28 2012 +0400
     1.3 @@ -21,7 +21,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 @@ -37,6 +38,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 @@ -81,7 +83,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 @@ -101,6 +103,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 @@ -122,6 +126,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 @@ -134,6 +139,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  
     2.1 --- a/pair_cores/web/approot/locales/pair-cores-web.xml	Mon Mar 19 15:22:32 2012 +0400
     2.2 +++ b/pair_cores/web/approot/locales/pair-cores-web.xml	Tue Mar 20 01:39:28 2012 +0400
     2.3 @@ -48,6 +48,7 @@
     2.4  
     2.5      <message id='pair.out.High_blocks'>Text file with high blocks</message>
     2.6      <message id='pair.out.High_html'>HTML file with high blocks</message>
     2.7 +    <message id='pair.out.High_pymol'>PyMol file with high blocks</message>
     2.8      <message id='pair.out.Homology'>Homology file</message>
     2.9      <message id='pair.out.Pair_blocks'>Pair cores file</message>
    2.10      <message id='pair.out.Pair_html'>Pair cores HTML file</message>
     3.1 --- a/pair_cores/web/approot/locales/pair-cores-web_ru.xml	Mon Mar 19 15:22:32 2012 +0400
     3.2 +++ b/pair_cores/web/approot/locales/pair-cores-web_ru.xml	Tue Mar 20 01:39:28 2012 +0400
     3.3 @@ -38,6 +38,7 @@
     3.4  
     3.5      <message id='pair.out.High_blocks'>Вертикальные блоки (текст)</message>
     3.6      <message id='pair.out.High_html'>Вертикальные блоки (HTML)</message>
     3.7 +    <message id='pair.out.High_pymol'>Вертикальные блоки (PyMol)</message>
     3.8      <message id='pair.out.Homology'>Файл гомологии</message>
     3.9      <message id='pair.out.Pair_blocks'>Парные блоки (текст)</message>
    3.10      <message id='pair.out.Pair_html'>Парные блоки (HTML)</message>
     4.1 --- a/pair_cores/web/pair-cores.cpp	Mon Mar 19 15:22:32 2012 +0400
     4.2 +++ b/pair_cores/web/pair-cores.cpp	Tue Mar 20 01:39:28 2012 +0400
     4.3 @@ -147,6 +147,10 @@
     4.4      pymol->set_suggested_gen(boost::bind(name_gen2, "pml"));
     4.5      task->add_output(pymol, tr("pair.out.Pymol"));
     4.6      //
     4.7 +    ViewFileOutput* high_pymol = new ViewFileOutput("--high-blocks-pymol");
     4.8 +    high_pymol->set_suggested_gen(boost::bind(name_gen2, "pml"));
     4.9 +    task->add_output(high_pymol, tr("pair.out.High_pymol"));
    4.10 +    //
    4.11      ViewFileOutput* high_blocks = new ViewFileOutput("--high-blocks");
    4.12      high_blocks->set_suggested_gen(boost::bind(name_gen2, "blocks"));
    4.13      task->add_output(high_blocks, tr("pair.out.High_blocks"));