Package Bio :: Package SeqIO :: Module Interfaces :: Class SequenceWriter
[hide private]
[frames] | no frames]

Class SequenceWriter

source code

object --+
         |
        SequenceWriter
Known Subclasses:

This class should be subclassed.

Interlaced file formats (e.g. Clustal) should subclass directly.

Sequential file formats (e.g. Fasta, GenBank) should subclass
the SequentialSequenceWriter class instead.

Instance Methods [hide private]
 
__init__(self, handle)
Creates the writer object.
source code
 
_get_seq_string(self, record)
Use this to catch errors like the sequence being None.
source code
 
clean(self, text)
Use this to avoid getting newlines in the output.
source code
 
write_file(self, records)
Use this to write an entire file containing the given records.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle)
(Constructor)

source code 
Creates the writer object.

Use the method write_file() to actually record your sequence records.

Overrides: object.__init__

write_file(self, records)

source code 
Use this to write an entire file containing the given records.

records - A list or iterator returning SeqRecord objects

Should return the number of records (as an integer).

This method can only be called once.