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