1
2
3
4
5 """Command line wrapper for the multiple alignment program TCOFFEE.
6
7 http://www.tcoffee.org/Projects_home_page/t_coffee_home_page.html
8
9 T-Coffee: A novel method for multiple sequence alignments.
10 Notredame, Higgins, Heringa, JMB,302(205-217) 2000
11
12 Last checked against: Version_6.92
13 """
14
15 import types
16 from Bio.Application import _Option, _Switch, _Argument, AbstractCommandline
17
19 """Commandline object for the TCoffee alignment program.
20
21 Implements a VERY limited number of options.
22 """
23 SEQ_TYPES = ["dna","protein","dna_protein"]
24
25 - def __init__(self, cmd="t_coffee", **kwargs):
26 self.parameters = \
27 [_Option(["-output", "output"], ["output"],
28 None,
29 0,
30 "Specify the output type. "
31 "One (or more separated by a comma) of: "
32 "'clustalw_aln', 'clustalw', 'gcg', 'msf_aln', "
33 "'pir_aln', 'fasta_aln', 'phylip', 'pir_seq', 'fasta_seq'"
34 "Note that biopython will only read clustalw, pir, and fasta",
35 0),
36 _Option(["-infile", "infile"], ["input"],
37 None,
38 1,
39 "Specify the input file.",
40 0,),
41
42
43 _Option(["-outfile", "outfile"], ["output"],
44 None,
45 0,
46 "Specify the output file. Default: <your sequences>.aln",
47 0),
48 _Switch(["-convert", "convert"], ["input"],
49 "Specify you want to perform a file conversion"),
50 _Option(["-type"], ["input"],
51 lambda x: x in SEQ_TYPES,
52 0,
53 "Specify the type of sequence being aligned",
54 0),
55 _Option(["-outorder", "outorder"], ["input"],
56 None,
57 0,
58 "Specify the order of sequence to output"
59 "Either 'input', 'aligned' or <filename> of "
60 "Fasta file with sequence order",
61 0),
62 _Option(["-matrix", "matrix"], ["input"],
63 None,
64 0,
65 "Specify the filename of the substitution matrix to use."
66 "Default: blosum62mt",
67 0),
68 _Option(["-gapopen", "gapopen"], ["input"],
69 lambda x: isinstance(x, types.IntType),
70 0,
71 "Indicates the penalty applied for opening a gap "
72 "(negative integer)",
73 0),
74 _Option(["-gapext", "gapext"], ["input"],
75 lambda x: isinstance(x, types.IntType),
76 0,
77 "Indicates the penalty applied for extending a "
78 "gap. (negative integer)",
79 0),
80 _Switch(["-quiet", "quiet"], ["input"],
81 "Turn off log output"),
82 _Option(["-mode", "mode"], ["input"],
83 None,
84 0,
85 "Specifies a special mode: genome, quickaln, dali, 3dcoffee",
86 0)
87 ]
88 AbstractCommandline.__init__(self, cmd, **kwargs)
89