# 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 containing 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__()

    Initialize the class.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 37
  __static_attributes__ = ('comments', 'file_name', 'seq', 'seq_trimmed', 'sites')

Bio.Sequencing.Phd.read(source)

  Read one PHD record from the file and return it as a Record object.

  Argument source is a file-like object opened in text mode, or a path to a file.

  This function reads PHD file data line by line from the source, and returns a single Record object. A ValueError is raised if more than one record is found in the file.

Bio.Sequencing.Phd.parse(source)

  Iterate over a file yielding multiple PHD records.

  Argument source is a file-like object opened in text mode, or a path to a file.

  The data is read line by line from the source.

  Typical usage:

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

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub