Package csb :: Package bio :: Package io :: Module svg :: Class SSCartoonBuilder
[frames] | no frames]

Class SSCartoonBuilder

source code

object --+
         |
        SSCartoonBuilder

Creates 2D vector diagrams from SecondaryStructure objects.

Instance Methods
 
__init__(self, ss, width, height, thickness='2px', helix='#C24641', strand='#6698FF', coil='#FF8C00', gap='#E0E0E0', cap='round')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
str (SVG document)
build(self)
Build a SVG image using the current size and color settings.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, ss, width, height, thickness='2px', helix='#C24641', strand='#6698FF', coil='#FF8C00', gap='#E0E0E0', cap='round')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • ss (str or SecondaryStructure) - source secondary structure (either a SS string or a SS object)
  • width (int) - output width of the diagram in pixels
  • height (int) - output height of the diagram in pixels
  • thickness - stroke-width (2px by default)
  • helix - SVG color for helicies (red by default)
  • strand - SVG color for strands (blue by default)
  • coil - SVG color for coils (orange by default)
  • gap - SVG color for gaps (grey by default)
  • cap - stroke-linecap (round by default)
Overrides: object.__init__
(inherited documentation)

build(self)

source code 

Build a SVG image using the current size and color settings.

Returns: str (SVG document)
SVG diagram