Package Bio :: Package AlignAce :: Module AlignAceStandalone
[hide private]
[frames] | no frames]

Source Code for Module Bio.AlignAce.AlignAceStandalone

 1  # Copyright 2003 by Bartek Wilczynski.  All rights reserved. 
 2  # This code is part of the Biopython distribution and governed by its 
 3  # license.  Please see the LICENSE file that should have been included 
 4  # as part of this package. 
 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  import string 
34  import re 
35   
36  from Bio import File 
37  from Bio.ParserSupport import * 
38  from Applications import AlignAceCommandline 
39   
40  import Scanner 
41  import Parser 
42   
43   
44 -def AlignAce(infile, cmd="AlignACE", **keywds):
45 """Runs AlignACE and returns data. 46 47 cmd == AlignACE executable 48 infile == sequence file to process 49 50 You may pass more parameters to **keywds to change the behavior of 51 the search. Otherwise, optional values will be chosen by blastall. 52 53 numcols number of columns to align (10) 54 expect number of sites expected in model (10) 55 gcback background fractional GC content of input sequence (0.38) 56 minpass minimum number of non-improved passes in phase 1 (200) 57 seed set seed for random number generator (time) 58 undersample possible sites / (expect * numcols * seedings) (1) 59 oversample 1/undersample (1) 60 """ 61 62 if not os.path.exists(cmd): 63 raise IOError, "Executable does not exist at %s" % cmd 64 65 if not os.path.exists(infile): 66 raise IOError, "Input file does not exist at %s" % infile 67 68 AlignCmd = AlignAceCommandline(cmd) 69 70 AlignCmd.set_parameter("input",infile) 71 72 for (par,val) in keywds.iteritems(): 73 AlignCmd.set_parameter(par,val) 74 75 return AlignCmd.run()
76