Bio.Sequencing.Phd module

Parser for PHD files output by PHRED and used by PHRAP and CONSED.

This module can be used directly which will return Record objects which should contain all the original data in the file.

Alternatively, using Bio.SeqIO with the “phd” format will call this module internally. This will give SeqRecord objects for each contig sequence.

class Bio.Sequencing.Phd.Record

Bases: object

Hold information from a PHD file.

__init__(self)

Initialize the class.

Bio.Sequencing.Phd.read(handle)

Read the next PHD record from the file, return it as a Record object.

This function reads PHD file data line by line from the handle, and returns a single Record object.

Bio.Sequencing.Phd.parse(handle)

Iterate over a file yielding multiple PHD records.

The data is read line by line from the handle. The handle can be a list of lines, an open file, or similar; the only requirement is that we can iterate over the handle to retrieve lines from it.

Typical usage:

records = parse(handle)
for record in records:
    # do something with the record object