biopython v1.71.0 Bio.Blast.NCBIStandalone.BlastErrorParser

Attempt to catch and diagnose BLAST errors while parsing.

This utilizes the BlastParser module but adds an additional layer of complexity on top of it by attempting to diagnose ValueErrors that may actually indicate problems during BLAST parsing.

Current BLAST problems this detects are:

  • LowQualityBlastError - When BLASTing really low quality sequences (ie. some GenBank entries which are just short stretches of a single nucleotide), BLAST will report an error with the sequence and be unable to search with this. This will lead to a badly formatted BLAST report that the parsers choke on. The parser will convert the ValueError to a LowQualityBlastError and attempt to provide useful information.

Link to this section Summary

Functions

Initialize a parser that tries to catch BlastErrors

Attempt to diagnose an error in the passed handle

Parse a handle, attempting to diagnose errors

Link to this section Functions

Initialize a parser that tries to catch BlastErrors.

Arguments:

  • bad_report_handle - An optional argument specifying a handle where bad reports should be sent. This would allow you to save all of the bad reports to a file, for instance. If no handle is specified, the bad reports will not be saved.
Link to this function _diagnose_error()

Attempt to diagnose an error in the passed handle.

Arguments:

  • handle - The handle potentially containing the error
  • data_record - The data record partially created by the consumer.

Parse a handle, attempting to diagnose errors.