Package csb :: Package bio :: Package structure :: Class SecondaryStructureElement

[frames] | no frames]

# Class SecondaryStructureElement

source code

    object --+
             |
            SecondaryStructureElement

Describes a Secondary Structure Element.

Instance Methods

__eq__(self, other) | source code

__init__(self, start, end, type, score=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__lt__(self, other) | source code

__repr__(self) repr(x) | source code

__str__(self) str(x) | source code

SecondaryStructureElement

merge(self, other) Merge `self` and `other`. | source code

bool

overlaps(self, other) Return True if `self` overlaps with `other`. | source code

simplify(self) Convert to three-state secondary structure (Helix, Strand, Coil). | source code

str

to_string(self) Dump the element as a string. | source code

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

Properties
int | end End position (1-based)
int | length Number of residues covered by this element
CollectionContainer | score Secondary structure confidence values for each residue
int | start Start position (1-based)
enum item | type Secondary structure type - a member of SecStructures
Inherited from `object`: `__class__`

Method Details

### __init__(self, start, end, type, score=None)
(Constructor)

source code

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

Parameters:
  - `start` (float) - start position with reference to the chain
  - `end` (float) - end position with reference to the chain
  - `type` (csb.core.EnumItem) - element type - a member of the SecStructures enum
  - `score` (int) - secondary structure prediction confidence, if available
Raises:
  - `IndexError` - if start/end positions are out of range
Overrides: object.__init__
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)

### __str__(self)
(Informal representation operator)

source code

str(x)

Overrides: object.__str__
  (inherited documentation)

### merge(self, other)

source code

Merge `self` and `other`.

Parameters:
  - `other` (SecondaryStructureElement)
Returns: SecondaryStructureElement
  a new secondary structure element

Bug: confidence scores are lost

### overlaps(self, other)

source code

Return True if `self` overlaps with `other`.

Parameters:
  - `other` (SecondaryStructureElement)
Returns: bool

### to_string(self)

source code

Dump the element as a string.

Returns: str
  string representation of the element

Property Details

### end

End position (1-based)

Get Method:
  unreachable.end(self) - End position (1-based)
Set Method:
  unreachable.end(self, value)
Type:
  int

### length

Number of residues covered by this element

Get Method:
  unreachable.length(self) - Number of residues covered by this element
Type:
  int

### score

Secondary structure confidence values for each residue

Get Method:
  unreachable.score(self) - Secondary structure confidence values for each residue
Set Method:
  unreachable.score(self, scores)
Type:
  CollectionContainer

### start

Start position (1-based)

Get Method:
  unreachable.start(self) - Start position (1-based)
Set Method:
  unreachable.start(self, value)
Type:
  int

### type

Secondary structure type - a member of SecStructures

Get Method:
  unreachable.type(self) - Secondary structure type - a member of SecStructures
Set Method:
  unreachable.type(self, value)
Type:
  enum item