Mercurial > repos > greg > assembly_post_processor
comparison assembly_post_processor.py @ 49:9d58af3e459d draft
Uploaded
author | greg |
---|---|
date | Fri, 05 May 2017 09:30:34 -0400 |
parents | b7858b1f64f1 |
children | 9a105e8f08e5 |
comparison
equal
deleted
inserted
replaced
48:564163c7afd8 | 49:9d58af3e459d |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 import argparse | 2 import argparse |
3 import os | |
4 import subprocess | |
5 | 3 |
6 import utils | 4 import utils |
7 | |
8 OUTPUT_DIR = 'assemblyPostProcessor_dir' | |
9 | 5 |
10 parser = argparse.ArgumentParser() | 6 parser = argparse.ArgumentParser() |
11 parser.add_argument('--dereplicate', dest='dereplicate', default=None, help='Remove duplicate sequences') | 7 parser.add_argument('--dereplicate', dest='dereplicate', default=None, help='Remove duplicate sequences') |
12 parser.add_argument('--gap_trimming', dest='gap_trimming', type=float, default=0, help='Trim alignments') | 8 parser.add_argument('--gap_trimming', dest='gap_trimming', type=float, default=0, help='Trim alignments') |
13 parser.add_argument('--gene_family_search', dest='gene_family_search', default=None, help='Targeted gene families') | 9 parser.add_argument('--gene_family_search', dest='gene_family_search', default=None, help='Targeted gene families') |
41 if args.score_matrices is not None: | 37 if args.score_matrices is not None: |
42 cmd += ' --score_matrices %s' % args.score_matrices | 38 cmd += ' --score_matrices %s' % args.score_matrices |
43 if args.strand_specific is not None: | 39 if args.strand_specific is not None: |
44 cmd += ' --strand_specific' | 40 cmd += ' --strand_specific' |
45 cmd += ' --transcripts %s' % args.transcripts | 41 cmd += ' --transcripts %s' % args.transcripts |
46 | |
47 # Run the command. | 42 # Run the command. |
48 proc = subprocess.Popen(args=cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) | 43 utils.run_command(cmd) |
49 rc = proc.wait() | |
50 utils.check_execution_errors(rc, proc.stderr, proc.stdout) |