Package Bio :: Package motifs :: Package applications :: Module _alignace
[hide private]
[frames] | no frames]

Source Code for Module Bio.motifs.applications._alignace

  1  # Copyright 2003-2009 by Bartek Wilczynski.  All rights reserved. 
  2  # Revisions copyright 2009 by Peter Cock. 
  3  # This code is part of the Biopython distribution and governed by its 
  4  # license.  Please see the LICENSE file that should have been included 
  5  # as part of this package. 
  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 __future__ import print_function 
 27   
 28  from Bio.Application import AbstractCommandline, _Option, _Argument 
 29   
 30  import warnings 
 31  from Bio import BiopythonDeprecationWarning 
 32   
 33   
34 -class AlignAceCommandline(AbstractCommandline):
35 """Create a commandline for the AlignAce program (DEPRECATED). 36 37 Example: 38 39 >>> from Bio.motifs.applications import AlignAceCommandline 40 >>> in_file = "sequences.fasta" 41 >>> alignace_cline = AlignAceCommandline(infile=in_file, gcback=0.55) 42 >>> print(alignace_cline) 43 AlignACE -i sequences.fasta -gcback 0.55 44 45 You would typically run the command line with alignace_cline() or via 46 the Python subprocess module, as described in the Biopython tutorial. 47 """
48 - def __init__(self, cmd="AlignACE", **kwargs):
49 warnings.warn("""The AlignACE application wrapper is deprecated and 50 is likely to be removed in a future release of Biopython, 51 since an up to date version of the AlignACE software 52 cannot be obtained anymore. If you have a copy of 53 AlignACE 4, please consider contacting the Biopython 54 developers.""", BiopythonDeprecationWarning) 55 self.parameters = \ 56 [ 57 _Option(["-i", "infile"], 58 "Input Sequence file in FASTA format.", 59 checker_function=lambda x: isinstance(x, str), 60 equate=False, 61 filename=True), 62 63 _Option(["-numcols", "numcols"], 64 "Number of columns to align", 65 equate=False, 66 checker_function=lambda x: isinstance(x, int)), 67 68 _Option(["-expect", "expect"], 69 "number of sites expected in model", 70 equate=False, 71 checker_function=lambda x: isinstance(x, int)), 72 73 _Option(["-gcback", "gcback"], 74 "background fractional GC content of input sequence", 75 equate=False, 76 checker_function=lambda x: isinstance(x, float)), 77 78 _Option(["-minpass", "minpass"], 79 "minimum number of non-improved passes in phase 1", 80 equate=False, 81 checker_function=lambda x: isinstance(x, int)), 82 83 _Option(["-seed", "seed"], 84 "set seed for random number generator (time)", 85 equate=False, 86 checker_function=lambda x: isinstance(x, int)), 87 88 _Option(["-undersample", "undersample"], 89 "possible sites / (expect * numcols * seedings)", 90 equate=False, 91 checker_function=lambda x: isinstance(x, int)), 92 93 _Option(["-oversample", "oversample"], 94 "1/undersample", 95 equate=False, 96 checker_function=lambda x: isinstance(x, int)), 97 ] 98 AbstractCommandline.__init__(self, cmd, **kwargs)
99 100
101 -class CompareAceCommandline(AbstractCommandline):
102 """Create a commandline for the CompareAce program. 103 104 Example: 105 106 >>> from Bio.motifs.applications import CompareAceCommandline 107 >>> m1_file = "sequences1.fasta" 108 >>> m2_file = "sequences2.fasta" 109 >>> compareace_cline = CompareAceCommandline(motif1=m1_file, motif2=m2_file) 110 >>> print(compareace_cline) 111 CompareACE sequences1.fasta sequences2.fasta 112 113 You would typically run the command line with compareace_cline() or via 114 the Python subprocess module, as described in the Biopython tutorial. 115 """
116 - def __init__(self, cmd="CompareACE", **kwargs):
117 warnings.warn("""The CompareACE application wrapper is deprecated and 118 is likely to be removed in a future release of Biopython, 119 since an up to date version of the AlignACE software 120 cannot be obtained anymore. If you have a copy of 121 AlignACE 4, please consider contacting the Biopython 122 developers.""", BiopythonDeprecationWarning) 123 self.parameters = \ 124 [ 125 _Argument(["motif1"], 126 "name of file containing motif 1", 127 checker_function=lambda x: isinstance(x, str), 128 filename=True), 129 _Argument(["motif2"], 130 "name of file containing motif 2", 131 checker_function=lambda x: isinstance(x, str), 132 filename=True), 133 ] 134 AbstractCommandline.__init__(self, cmd, **kwargs)
135 136
137 -def _test():
138 """Run the module's doctests (PRIVATE).""" 139 print("Running alignace doctests...") 140 import doctest 141 doctest.testmod() 142 print("Done")
143 144 145 if __name__ == "__main__": 146 _test() 147