Package Bio :: Package Align :: Package Applications :: Module _MSAProbs
[hide private]
[frames] | no frames]

Source Code for Module Bio.Align.Applications._MSAProbs

 1  # Copyright 2013 by Christian Brueffer. All rights reserved. 
 2  # 
 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  """Command line wrapper for the multiple sequence alignment program MSAProbs. 
 7  """ 
 8   
 9  from __future__ import print_function 
10   
11  __docformat__ = "restructuredtext en"  # Don't just use plain text in epydoc API pages! 
12   
13  from Bio.Application import _Argument, _Option, _Switch, AbstractCommandline 
14   
15   
16 -class MSAProbsCommandline(AbstractCommandline):
17 """Command line wrapper for MSAProbs. 18 19 http://msaprobs.sourceforge.net 20 21 Example: 22 -------- 23 24 >>> from Bio.Align.Applications import MSAProbsCommandline 25 >>> in_file = "unaligned.fasta" 26 >>> out_file = "aligned.cla" 27 >>> cline = MSAProbsCommandline(infile=in_file, outfile=out_file, clustalw=True) 28 >>> print(cline) 29 msaprobs -o aligned.cla -clustalw unaligned.fasta 30 31 You would typically run the command line with cline() or via 32 the Python subprocess module, as described in the Biopython tutorial. 33 34 Citation: 35 --------- 36 37 Yongchao Liu, Bertil Schmidt, Douglas L. Maskell: "MSAProbs: multiple 38 sequence alignment based on pair hidden Markov models and partition 39 function posterior probabilities". Bioinformatics, 2010, 26(16): 1958 -1964 40 41 Last checked against version: 0.9.7 42 """ 43
44 - def __init__(self, cmd="msaprobs", **kwargs):
45 # order of parameters is the same as in msaprobs -help 46 self.parameters = \ 47 [ 48 _Option(["-o", "--outfile", "outfile"], 49 "specify the output file name (STDOUT by default)", 50 filename=True, 51 equate=False), 52 _Option(["-num_threads", "numthreads"], 53 "specify the number of threads used, and otherwise detect automatically", 54 checker_function=lambda x: isinstance(x, int)), 55 _Switch(["-clustalw", "clustalw"], 56 "use CLUSTALW output format instead of FASTA format"), 57 _Option(["-c", "consistency"], 58 "use 0 <= REPS <= 5 (default: 2) passes of consistency transformation", 59 checker_function=lambda x: isinstance(x, int) and 0 <= x <= 5), 60 _Option(["-ir", "--iterative-refinement", "iterative_refinement"], 61 "use 0 <= REPS <= 1000 (default: 10) passes of iterative-refinement", 62 checker_function=lambda x: isinstance(x, int) and 0 <= x <= 1000), 63 _Switch(["-v", "verbose"], 64 "report progress while aligning (default: off)"), 65 _Option(["-annot", "annot"], 66 "write annotation for multiple alignment to FILENAME", 67 filename=True), 68 _Switch(["-a", "--alignment-order", "alignment_order"], 69 "print sequences in alignment order rather than input order (default: off)"), 70 _Option(["-version", "version"], 71 "print out version of MSAPROBS"), 72 _Argument(["infile"], 73 "Multiple sequence input file", 74 filename=True), 75 ] 76 AbstractCommandline.__init__(self, cmd, **kwargs)
77 78
79 -def _test():
80 """Run the module's doctests (PRIVATE).""" 81 print("Running MSAProbs doctests...") 82 import doctest 83 doctest.testmod() 84 print("Done")
85 86 87 if __name__ == "__main__": 88 _test() 89