Blast Tools

Introduction

The bio_utils’ blast_tools subpackage contains a few tools for making BLAST output easier to work with. They are from extensive but what they do provide may be useful to some developers.

blast_to_cigar

A simple function that converts the query sequence, subject sequence, and midline fields of BLAST+ XML output (M7) to a CIGAR string. This function supports both the newer and older versions of CIGAR strings.

b6_evalue_filter

This function iterates through any iterator yielding lines of a B6/M8 file. This iterator only returns the lines above an E-value threshold as B6Entry.

query_sequence_retriever

Retrieve the aligned query sequence for each alignment in a B6 file above an E-value threshold.

subject_sequence_retriever

Identical to query_sequence_retriever except it returns subject sequences.