1
2
3
4
5
6 """
7
8 This module provides code to work with the standalone version of AlignACE,
9 for motif search in DNA sequences.
10
11 AlignACE homepage:
12
13 http://atlas.med.harvard.edu/
14
15 AlignACE Citations:
16
17 Computational identification of cis-regulatory elements associated with
18 groups of functionally related genes in Saccharomyces cerevisiae,
19 Hughes, JD, Estep, PW, Tavazoie S, & GM Church, Journal of Molecular
20 Biology 2000 Mar 10;296(5):1205-14.
21
22 Finding DNA Regulatory Motifs within Unaligned Non-Coding Sequences
23 Clustered by Whole-Genome mRNA Quantitation,
24 Roth, FR, Hughes, JD, Estep, PE & GM Church, Nature Biotechnology
25 1998 Oct;16(10):939-45.
26
27 functions:
28 AlignAce - runs the AlignACE standalone prgram and returns the
29 ApplicationResult object
30 """
31
32 import os
33
34 from Bio import File
35 from Bio.ParserSupport import *
36 from Applications import AlignAceCommandline
37
38 import Scanner
39 import Parser
40
41
42 -def AlignAce(infile, cmd="AlignACE", **keywds):
43 """Runs AlignACE and returns data.
44
45 cmd == AlignACE executable
46 infile == sequence file to process
47
48 You may pass more parameters to **keywds to change the behavior of
49 the search. Otherwise, optional values will be chosen by blastall.
50
51 numcols number of columns to align (10)
52 expect number of sites expected in model (10)
53 gcback background fractional GC content of input sequence (0.38)
54 minpass minimum number of non-improved passes in phase 1 (200)
55 seed set seed for random number generator (time)
56 undersample possible sites / (expect * numcols * seedings) (1)
57 oversample 1/undersample (1)
58 """
59
60 if not os.path.exists(cmd):
61 raise IOError("Executable does not exist at %s" % cmd)
62
63 if not os.path.exists(infile):
64 raise IOError("Input file does not exist at %s" % infile)
65
66 AlignCmd = AlignAceCommandline(cmd)
67
68 AlignCmd.set_parameter("input",infile)
69
70 for (par,val) in keywds.iteritems():
71 AlignCmd.set_parameter(par,val)
72
73 return AlignCmd.run()
74