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 from Bio.Application import _Option, _Switch, _Argument, AbstractCommandline
16
18 """Commandline object for the TCoffee alignment program.
19
20 Implements a VERY limited number of options.
21 """
22 SEQ_TYPES = ["dna","protein","dna_protein"]
23
24 - def __init__(self, cmd="t_coffee", **kwargs):
25 self.parameters = \
26 [_Option(["-output", "output"], ["output"],
27 None,
28 0,
29 "Specify the output type. "
30 "One (or more separated by a comma) of: "
31 "'clustalw_aln', 'clustalw', 'gcg', 'msf_aln', "
32 "'pir_aln', 'fasta_aln', 'phylip', 'pir_seq', 'fasta_seq'"
33 "Note that biopython will only read clustalw, pir, and fasta",
34 0),
35 _Option(["-infile", "infile"], ["input"],
36 None,
37 1,
38 "Specify the input file.",
39 0,),
40
41
42 _Option(["-outfile", "outfile"], ["output"],
43 None,
44 0,
45 "Specify the output file. Default: <your sequences>.aln",
46 0),
47 _Switch(["-convert", "convert"], ["input"],
48 "Specify you want to perform a file conversion"),
49 _Option(["-type", "type"], ["input"],
50 lambda x: x in self.SEQ_TYPES,
51 0,
52 "Specify the type of sequence being aligned",
53 0),
54 _Option(["-outorder", "outorder"], ["input"],
55 None,
56 0,
57 "Specify the order of sequence to output"
58 "Either 'input', 'aligned' or <filename> of "
59 "Fasta file with sequence order",
60 0),
61 _Option(["-matrix", "matrix"], ["input"],
62 None,
63 0,
64 "Specify the filename of the substitution matrix to use."
65 "Default: blosum62mt",
66 0),
67 _Option(["-gapopen", "gapopen"], ["input"],
68 lambda x: isinstance(x, int),
69 0,
70 "Indicates the penalty applied for opening a gap "
71 "(negative integer)",
72 0),
73 _Option(["-gapext", "gapext"], ["input"],
74 lambda x: isinstance(x, int),
75 0,
76 "Indicates the penalty applied for extending a "
77 "gap. (negative integer)",
78 0),
79 _Switch(["-quiet", "quiet"], ["input"],
80 "Turn off log output"),
81 _Option(["-mode", "mode"], ["input"],
82 None,
83 0,
84 "Specifies a special mode: genome, quickaln, dali, 3dcoffee",
85 0)
86 ]
87 AbstractCommandline.__init__(self, cmd, **kwargs)
88