Bio.SeqIO.XdnaIO module

Bio.SeqIO support for the “xdna” file format.

The Xdna binary format is generated by Christian Marck’s DNA Strider program and also used by Serial Cloner.

class Bio.SeqIO.XdnaIO.XdnaIterator(source)

Bases: Bio.SeqIO.Interfaces.SequenceIterator

Parser for Xdna files.


Parse a Xdna file and return a SeqRecord object.

Argument source is a file-like object in binary mode or a path to a file.

Note that this is an “iterator” in name only since an Xdna file always contain a single sequence.


Start parsing the file, and return a SeqRecord generator.

iterate(handle, header)

Parse the file and generate SeqRecord objects.

__abstractmethods__ = frozenset({})
class Bio.SeqIO.XdnaIO.XdnaWriter(target)

Bases: Bio.SeqIO.Interfaces.SequenceWriter

Write files in the Xdna format.


Initialize an Xdna writer object.

  • target - Output stream opened in binary mode, or a path to a file.


Write the specified record to a Xdna file.

Note that the function expects a list (or iterable) of records as per the SequenceWriter interface, but the list should contain only one record as the Xdna format is a mono-record format.