1
2
3
4
5
6 """This module provides code to work with the standalone version of AlignACE,
7 for motif search in DNA sequences.
8
9 AlignACE homepage:
10
11 http://arep.med.harvard.edu/mrnadata/mrnasoft.html
12
13 AlignACE Citations:
14
15 Computational identification of cis-regulatory elements associated with
16 groups of functionally related genes in Saccharomyces cerevisiae,
17 Hughes, JD, Estep, PW, Tavazoie S, & GM Church, Journal of Molecular
18 Biology 2000 Mar 10;296(5):1205-14.
19
20 Finding DNA Regulatory Motifs within Unaligned Non-Coding Sequences
21 Clustered by Whole-Genome mRNA Quantitation,
22 Roth, FR, Hughes, JD, Estep, PE & GM Church, Nature Biotechnology
23 1998 Oct;16(10):939-45.
24
25 """
26 from Bio.Application import AbstractCommandline, _Option, _Argument
27
28
30 """Create a commandline for the AlignAce program.
31
32 Example:
33
34 >>> from Bio.Motif.Applications import AlignAceCommandline
35 >>> in_file = "sequences.fasta"
36 >>> alignace_cline = AlignAceCommandline(infile=in_file, gcback=0.55)
37 >>> print alignace_cline
38 AlignACE -i sequences.fasta -gcback 0.55
39
40 You would typically run the command line with alignace_cline() or via
41 the Python subprocess module, as described in the Biopython tutorial.
42 """
43 - def __init__(self, cmd="AlignACE", **kwargs):
44 self.parameters = \
45 [
46 _Option(["-i", "infile"],
47 "Input Sequence file in FASTA format.",
48 checker_function=lambda x: isinstance(x, str),
49 equate=False,
50 filename=True),
51
52 _Option(["-numcols", "numcols"],
53 "Number of columns to align",
54 equate=False,
55 checker_function=lambda x: isinstance(x, int)),
56
57 _Option(["-expect", "expect"],
58 "number of sites expected in model",
59 equate=False,
60 checker_function=lambda x: isinstance(x, int)),
61
62 _Option(["-gcback", "gcback"],
63 "background fractional GC content of input sequence",
64 equate=False,
65 checker_function=lambda x: isinstance(x, float)),
66
67 _Option(["-minpass", "minpass"],
68 "minimum number of non-improved passes in phase 1",
69 equate=False,
70 checker_function=lambda x: isinstance(x, int)),
71
72 _Option(["-seed", "seed"],
73 "set seed for random number generator (time)",
74 equate=False,
75 checker_function=lambda x: isinstance(x, int)),
76
77 _Option(["-undersample", "undersample"],
78 "possible sites / (expect * numcols * seedings)",
79 equate=False,
80 checker_function=lambda x: isinstance(x, int)),
81
82 _Option(["-oversample", "oversample"],
83 "1/undersample",
84 equate=False,
85 checker_function=lambda x: isinstance(x, int)),
86 ]
87 AbstractCommandline.__init__(self, cmd, **kwargs)
88
89
91 """Create a commandline for the CompareAce program.
92
93 Example:
94
95 >>> from Bio.Motif.Applications import CompareAceCommandline
96 >>> m1_file = "sequences1.fasta"
97 >>> m2_file = "sequences2.fasta"
98 >>> compareace_cline = CompareAceCommandline(motif1=m1_file, motif2=m2_file)
99 >>> print compareace_cline
100 CompareACE sequences1.fasta sequences2.fasta
101
102 You would typically run the command line with compareace_cline() or via
103 the Python subprocess module, as described in the Biopython tutorial.
104 """
105 - def __init__(self, cmd="CompareACE", **kwargs):
106 import os.path
107
108 self.parameters = \
109 [
110 _Argument(["motif1"],
111 "name of file containing motif 1",
112 checker_function=lambda x: isinstance(x, str),
113 filename=True),
114 _Argument(["motif2"],
115 "name of file containing motif 2",
116 checker_function=lambda x: isinstance(x, str),
117 filename=True),
118 ]
119 AbstractCommandline.__init__(self, cmd, **kwargs)
120
121
123 """Run the module's doctests (PRIVATE)."""
124 print "Running AlignAce doctests..."
125 import doctest
126 doctest.testmod()
127 print "Done"
128
129
130 if __name__ == "__main__":
131 _test()
132