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

allpy

changeset 336:679494ad2f4e

MSF output format by request implemented
author Andrei <aba@belozersky.msu.ru>
date Wed, 12 Jan 2011 20:23:22 +0300
parents 0b2f12b9f9a3
children cd43d59c0dba
files utils/flush_left.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/utils/flush_left.py	Wed Jan 12 19:55:00 2011 +0300
     1.2 +++ b/utils/flush_left.py	Wed Jan 12 20:23:22 2011 +0300
     1.3 @@ -5,6 +5,7 @@
     1.4  """
     1.5  import optparse
     1.6  import sys
     1.7 +import os
     1.8  from allpy import protein
     1.9  
    1.10  def main():
    1.11 @@ -17,6 +18,9 @@
    1.12      block = protein.Block.from_alignment(alignment, columns=columns)
    1.13      block.flush_left()
    1.14      alignment.to_fasta(open(options.out_file, "w"))
    1.15 +    if options.msf:
    1.16 +        os.system("seqret " + options.out_file + " msf::" + options.out_file.split(".")[0] + ".msf")
    1.17 +        os.system("rm " + options.out_file)
    1.18  
    1.19  if __name__ == "__main__":
    1.20      usage = "Usage: %s [options]\n\n%s" % (sys.argv[0], __doc__.strip())
    1.21 @@ -29,6 +33,9 @@
    1.22          help="Position in alignment to start from")
    1.23      parser.add_option("-e", "--end", type=int,
    1.24          help="Position in alignment to end with")
    1.25 +    parser.add_option("-m", "--msf", action='store_true',
    1.26 +        help="Output in MSF format (FASTA by default)")
    1.27 +
    1.28      options, args = parser.parse_args()
    1.29  
    1.30      if args: