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