1
2
3
4
5
6 """
7
8 This module provides code to work with the standalone version of CompareAce,
9 for motif comparison
10
11 CompareACE homepage:
12
13 http://atlas.med.harvard.edu/
14
15 functions:
16 CompareAce - runs the AlignACE standalone prgram and returns the ApplicationResult object
17 """
18
19 import os
20 import re
21
22 from Bio import File
23 from Applications import CompareAceCommandline
24
25 import Scanner
26 import Parser
27
28
30 """Runs CompareACE and returns data.
31
32 motif1, motif2 == files containing AlignACE motifs
33 """
34
35 if not os.path.exists(cmd):
36 raise IOError("Executable does not exist at %s" % cmd)
37
38 CompareCmd = CompareAceCommandline(cmd)
39
40 for (par,val) in keywds.iteritems():
41 CompareCmd.set_parameter(par,val)
42
43 return CompareCmd.run()
44