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:
SequenceIterator
Parser for Xdna files.
- modes = 'b'
- __init__(source)
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.
- __next__()
Return the next SeqRecord.
This method must be implemented by the subclass.
- __abstractmethods__ = frozenset({})
- __parameters__ = ()
- class Bio.SeqIO.XdnaIO.XdnaWriter(target)
Bases:
SequenceWriter
Write files in the Xdna format.
- modes = 'b'
- __init__(target)
Initialize an Xdna writer object.
- Arguments:
target - Output stream opened in binary mode, or a path to a file.
- write_file(records)
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.