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

Class ProbconsCommandline

source code

                     object --+    
Application.AbstractCommandline --+

Command line wrapper for the multiple alignment program PROBCONS.


Last checked against version: 1.12


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.


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:
from Bio import AlignIO
align ="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 =, "clustalw")
Instance Methods [hide private]
__init__(self, cmd='probcons', **kwargs)
Initialize the class.
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__

Class Variables [hide private]

Inherited from Application.AbstractCommandline: parameters

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 
Initialize the class.
Overrides: object.__init__