Package Bio :: Package Blast :: Module Applications :: Class NcbiblastformatterCommandline
[hide private]
[frames] | no frames]

Class NcbiblastformatterCommandline

source code

                     object --+        
                              |        
Application.AbstractCommandline --+    
                                  |    
          _NcbibaseblastCommandline --+
                                      |
                                     NcbiblastformatterCommandline

Wrapper for the NCBI BLAST+ program blast_formatter.

With the release of BLAST 2.2.24+ (i.e. the BLAST suite rewritten in C++
instead of C), the NCBI added the ASN.1 output format option to all the
search tools, and extended the blast_formatter to support this as input.

The blast_formatter command allows you to convert the ASN.1 output into
the other output formats (XML, tabular, plain text, HTML).

>>> from Bio.Blast.Applications import NcbiblastformatterCommandline
>>> cline = NcbiblastformatterCommandline(archive="example.asn", outfmt=5, out="example.xml")
>>> cline
NcbiblastformatterCommandline(cmd='blast_formatter', out='example.xml', outfmt=5, archive='example.asn')
>>> print(cline)
blast_formatter -out example.xml -outfmt 5 -archive example.asn

You would typically run the command line with cline() or via the Python
subprocess module, as described in the Biopython tutorial.

Note that this wrapper is for the version of blast_formatter from BLAST
2.2.24+ (or later) which is when the NCBI first announced the inclusion
this tool. There was actually an early version in BLAST 2.2.23+ (and
possibly in older releases) but this did not have the -archive option
(instead -rid is a mandatory argument), and is not supported by this
wrapper.

Instance Methods [hide private]
 
__init__(self, cmd='blast_formatter', **kwargs)
Create a new instance of a command line wrapper object.
source code
 
_validate(self)
Make sure the required parameters have been set (PRIVATE).
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='blast_formatter', **kwargs)
(Constructor)

source code 
Create a new instance of a command line wrapper object.

Overrides: object.__init__
(inherited documentation)

_validate(self)

source code 
Make sure the required parameters have been set (PRIVATE).

No return value - it either works or raises a ValueError.

This is a separate method (called from __str__) so that subclasses may
override it.

Overrides: Application.AbstractCommandline._validate
(inherited documentation)