Package Bio :: Package SeqIO :: Module StockholmIO :: Class StockholmWriter
[hide private]
[frames] | no frames]

Class StockholmWriter

source code

      Interfaces.SequenceWriter --+    
                                  |    
Interfaces.SequentialSequenceWriter --+
                                      |
                                     StockholmWriter

Class to write PFAM style Stockholm format files

Note that sequences and their annotation are recorded together (rather than having a block of annotation followed by a block of aligned sequences).

Instance Methods [hide private]
 
__init__(self, handle)
Creates the writer object
source code
 
write_header(self, count)
Must supply the number of records (count)
source code
 
write_file(self, records)
Use this to write an entire file containing the given records.
source code
 
write_record(self, record)
Write a single Stockholm record to the file
source code
 
write_footer(self) source code

Inherited from Interfaces.SequentialSequenceWriter: write_records

Inherited from Interfaces.SequenceWriter: clean

Class Variables [hide private]
  pfam_gr_mapping = {'active_site': 'AS', 'intron': 'IN', 'ligan...
  pfam_gs_mapping = {'look': 'LO', 'organism': 'OS', 'organism_c...
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: Interfaces.SequenceWriter.__init__

write_header(self, count)

source code 

Must supply the number of records (count)

Overrides: Interfaces.SequentialSequenceWriter.write_header

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.
          If len(records) is not supported, then it will be
          converted into a list.

This method should only be called once for each file.

Overrides: Interfaces.SequenceWriter.write_file

write_record(self, record)

source code 

Write a single Stockholm record to the file

Overrides: Interfaces.SequentialSequenceWriter.write_record

write_footer(self)

source code 
Overrides: Interfaces.SequentialSequenceWriter.write_footer

Class Variable Details [hide private]

pfam_gr_mapping

Value:
{'active_site': 'AS',
 'intron': 'IN',
 'ligand_binding': 'LI',
 'posterior_probability': 'PP',
 'secondary_structure': 'SS',
 'surface_accessibility': 'SA',
 'transmembrane': 'TM'}

pfam_gs_mapping

Value:
{'look': 'LO', 'organism': 'OS', 'organism_classification': 'OC'}