Package Bio :: Package Align :: Package Applications :: Module _Probcons :: Class ProbconsCommandline
[hide private]
[frames] | no frames]

Class ProbconsCommandline

source code

                     object --+    
                              |    
Application.AbstractCommandline --+
                                  |
                                 ProbconsCommandline

Command line wrapper for the multiple alignment program PROBCONS.

http://probcons.stanford.edu/

Example:

To align a FASTA file (unaligned.fasta) with the output in ClustalW format, and otherwise default settings, use:

>>> from Bio.Align.Applications import ProbconsCommandline
>>> probcons_cline = ProbconsCommandline(input="unaligned.fasta",
...                                      clustalw=True)
>>> print(probcons_cline)
probcons -clustalw unaligned.fasta

You would typically run the command line with probcons_cline() or via the Python subprocess module, as described in the Biopython tutorial. Note that PROBCONS will write the alignment to stdout, which you may want to save to a file and then parse, e.g.:

stdout, stderr = probcons_cline()
with open("aligned.aln", "w") as handle:
    handle.write(stdout)
from Bio import AlignIO
align = AlignIO.read("aligned.fasta", "clustalw")

Alternatively, to parse the output with AlignIO directly you can use StringIO to turn the string into a handle:

stdout, stderr = probcons_cline()
from StringIO import StringIO
from Bio import AlignIO
align = AlignIO.read(StringIO(stdout), "clustalw")

Citations:

Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. 2005. PROBCONS: Probabilistic Consistency-based Multiple Sequence Alignment. Genome Research 15: 330-340.

Last checked against version: 1.12

Instance Methods [hide private]
 
__init__(self, cmd='probcons', **kwargs)
Create a new instance of a command line wrapper object.
source code

Inherited from Application.AbstractCommandline: __call__, __repr__, __setattr__, __str__, set_parameter

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cmd='probcons', **kwargs)
(Constructor)

source code 
Create a new instance of a command line wrapper object.
Overrides: object.__init__
(inherited documentation)