This document is for OpenStructure version 1.2, the latest version is 2.9.0 !

blast - Search related sequences in databases

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 BlastHit instances.

Parameters:
  • query (seq.ConstSequenceHandle) – the query sequence
  • 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.
  • matrix – The substitution matrix to be used. Must be one of ‘BLOSUM45’, ‘BLOSUM62’, ‘BLOSUM80’, ‘PAM30’, ‘PAM70’.
  • 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.
  • 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 :

FileNotFound if the BLAST executable could not be found

Raises :

BlastError if there was a problem during execution of BLAST.

Raises :

ValueError if the substitution matrix is invalid

Raises :

IOError if the database does not exist

ParseBlastOutput(string)

Parses the blast output and returns a list of BlastHit instances.

Raises :BlastError if the output could not be parsed.

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

class AlignedPatch(aln, bit_score, score, evalue)

An aligned patch, aka. HSP

aln

The local alignment. Sequence offset of both sequences in the alignment are set to the starting position in the query and target sequence, respectively.

Type :AlignmentHandle
bit_score

The bit score of the HSP

score

The score of the HSP

evalue

The E-value of the HSP

class BlastHit(identifier, aligned_patches)

A positive match found by BLAST.

Each blast hit consists of one or more HSPs, encoded by the AlignedPatch class.

identifier

The identifier of the matching sequence

aligned_patches

list of AlignedPatch instances holding the actual HSPs.

class BlastError(brief, details)

Raised when something goes wrong during parsing/execution of the blast executable.

brief

Short explanation of the problem

details

If set, explains in more detail what caused the error. Might be empty.

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

dev / 2.9.0 / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / (Currently viewing 1.2) / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.