OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Data Structures | Functions
ost.bindings.blast Namespace Reference

Data Structures

class  AlignedPatch
class  BlastHit
class  BlastError

Functions

def ParseBlastOutput
def BlastVersion
def Blast

Function Documentation

def ost.bindings.blast.Blast (   query,
  database,
  gap_open = 11,
  gap_ext = 1,
  matrix = 'BLOSUM62',
  blast_location = None 
)
Runs a protein vs. protein blast search. The results are returned as a 
list of :class:`BlastHit` instances.

:param query: the query sequence
:type query: :class:`seq.ConstSequenceHandle`

:param database: The filename of the sequence database. Make sure that 
    formatdb has been run on the database and the <database>.pin or
    <database>.pal file exists.
:param matrix: The substitution matrix to be used. Must be one of 'BLOSUM45',
   'BLOSUM62', 'BLOSUM80', 'PAM30', 'PAM70'.
:param gap_open: Gap opening penalty. Note that only a subset of gap opening 
   penalties is supported for each substitutition matrix. Consult the blast 
   docs for more information.
:param gap_ext: Gap extension penalty. Only a subset of gap extension 
   penalties are supported for each of the substitution matrices. Consult the 
   blast docs for more information.

:raises: :class:`~ost.settings.FileNotFound` if the BLAST executable could not 
         be found
:raises: :class:`BlastError` if there was a problem during execution of BLAST.
:raises: :class:`ValueError` if the substitution matrix is invalid
:raises: :class:`IOError` if the database does not exist

Definition at line 144 of file blast.py.

def ost.bindings.blast.BlastVersion (   blast_location = None)
Returns the version of the BLAST executable, e.g. 2.2.24 as a string

Definition at line 128 of file blast.py.

def ost.bindings.blast.ParseBlastOutput (   string)
Parses the blast output and returns a list of :class:`BlastHit` instances.

:raises: :class:`BlastError` if the output could not be parsed.

This functions is only capable of dealing with the BLAST XML output.

Definition at line 80 of file blast.py.