Bio.Align.mauve module

Bio.Align support for “xmfa” output from Mauve/ProgressiveMauve.

You are expected to use this module via the Bio.Align functions.

class Bio.Align.mauve.AlignmentWriter(target, metadata=None, identifiers=None)

Bases: Bio.Align.interfaces.AlignmentWriter

Mauve/XMFA alignment writer.

__init__(target, metadata=None, identifiers=None)

Create an AlignmentWriter object.

Arguments:
  • target - output stream or file name

  • metadata - metadata to be included in the output. If metadata

    is None, then the alignments object to be written must have an attribute metadata.

  • identifiers - list of the IDs of the sequences included in the

    alignment. Sequences will be numbered according to their index in this list. If identifiers is None, then the alignments object to be written must have an attribute identifiers.

write_header(alignments)

Write the file header to the output file.

write_file(alignments)

Write a file with the alignments, and return the number of alignments.

alignments - A Bio.Align.mauve.AlignmentIterator object.

format_alignment(alignment)

Return a string with a single alignment in the Mauve format.

class Bio.Align.mauve.AlignmentIterator(source)

Bases: Bio.Align.interfaces.AlignmentIterator

Mauve xmfa alignment iterator.

__init__(source)

Create an AlignmentIterator object.

Arguments:
  • source - input data or file name

__abstractmethods__ = frozenset({})