Bio.Align.fasta module

Bio.Align support for aligned FASTA files.

Aligned FASTA files are FASTA files in which alignment gaps in a sequence are represented by dashes. Each sequence line in an aligned FASTA should have the same length.

class Bio.Align.fasta.AlignmentWriter(target)

Bases: Bio.Align.interfaces.AlignmentWriter

Alignment file writer for the aligned FASTA file format.

__init__(target)

Create an AlignmentWriter object.

Arguments:
  • target - output stream or file name

format_alignment(alignment)

Return a string with the alignment in aligned FASTA format.

class Bio.Align.fasta.AlignmentIterator(source)

Bases: Bio.Align.interfaces.AlignmentIterator

Alignment iterator for aligned FASTA files.

An aligned FASTA file contains one multiple alignment. Alignment gaps are represented by dashes in the sequence lines. Header lines start with ‘>’ followed by the name of the sequence, and optionally a description.

__init__(source)

Create an AlignmentIterator object.

Arguments:
  • source - input data or file name

__abstractmethods__ = frozenset({})