46
|
1 #!/usr/bin/env python
|
|
2 import argparse
|
|
3
|
|
4 import utils
|
|
5
|
|
6 parser = argparse.ArgumentParser()
|
|
7 parser.add_argument('--dereplicate', dest='dereplicate', default=None, help='Remove duplicate sequences')
|
|
8 parser.add_argument('--gap_trimming', dest='gap_trimming', type=float, default=0, help='Trim alignments')
|
|
9 parser.add_argument('--gene_family_search', dest='gene_family_search', default=None, help='Targeted gene families')
|
|
10 parser.add_argument('--method', dest='method', default=None, help='Protein clustering method')
|
|
11 parser.add_argument('--min_length', dest='min_length', type=int, default=0, help='Minimum sequence length')
|
|
12 parser.add_argument('--num_threads', dest='num_threads', type=int, help='Number of processors')
|
|
13 parser.add_argument('--prediction_method', dest='prediction_method', help='Coding regions prediction method')
|
|
14 parser.add_argument('--scaffold', dest='scaffold', default=None, help='Gene family scaffold')
|
|
15 parser.add_argument('--score_matrices', dest='score_matrices', default=None, help='Scores matrices')
|
|
16 parser.add_argument('--strand_specific', dest='strand_specific', default=None, help='Strand-specific assembly')
|
|
17 parser.add_argument('--transcripts', dest='transcripts', help='Transcriptome assembly fasta file')
|
|
18
|
|
19 args = parser.parse_args()
|
|
20
|
|
21 # Build the command line.
|
|
22 cmd = 'AssemblyPostProcessor'
|
|
23 if args.dereplicate is not None:
|
|
24 cmd += ' --dereplicate'
|
|
25 if args.gap_trimming > 0:
|
|
26 cmd += ' --gap_trimming %4f' % args.gap_trimming
|
|
27 if args.gene_family_search is not None:
|
|
28 cmd += ' --gene_family_search %s' % args.gene_family_search
|
|
29 if args.method is not None:
|
|
30 cmd += ' --method %s' % args.method
|
|
31 if args.min_length > 0:
|
|
32 cmd += ' --min_length %d' % args.min_length
|
|
33 cmd += ' --num_threads %d' % args.num_threads
|
|
34 cmd += ' --prediction_method %s' % args.prediction_method
|
|
35 if args.scaffold is not None:
|
|
36 cmd += ' --scaffold %s' % args.scaffold
|
|
37 if args.score_matrices is not None:
|
|
38 cmd += ' --score_matrices %s' % args.score_matrices
|
|
39 if args.strand_specific is not None:
|
|
40 cmd += ' --strand_specific'
|
|
41 cmd += ' --transcripts %s' % args.transcripts
|
|
42 # Run the command.
|
49
|
43 utils.run_command(cmd)
|