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.