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.
-
__init__
(self, 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.
-
parse
(self, handle)¶ Start parsing the file, and return a SeqRecord generator.
-
iterate
(self, handle, header)¶ Parse the file and generate SeqRecord objects.
-
-
class
Bio.SeqIO.XdnaIO.
XdnaWriter
(target)¶ Bases:
Bio.SeqIO.Interfaces.SequenceWriter
Write files in the Xdna format.
-
__init__
(self, target)¶ Initialize an Xdna writer object.
- Arguments:
target - Output stream opened in binary mode, or a path to a file.
-
write_file
(self, 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.
-