pyani.blast module

Code for handling BLAST output files.

pyani.blast.parse_blasttab(fhandle: TextIO) → List[List[str]][source]

Return the passed BLAST tab output file as a list of lists.

Parameters:fhandle – TextIO, filehandle containing BLAST output file

This is used when testing for conserved BLAST output, as the exact format of the BLAST result can depend on the software version. For instance, the locally-installed version may be BLASTN+ 2.6.0, which reports match identity to 3sf, and the version in CI may be BLASTN+ 2.2.28, which reports to 2sf.

Returning a list of lines, parsed into the appropriate data type, allows for direct comparison of line content independent of formatting.