Package csb :: Package bio :: Package io :: Module clans :: Class ClansEntry |
[frames] | no frames]

# Class ClansEntry

source code

    object --+
             |
            ClansEntry

Class holding the data of one CLANS sequence entry.

Instance Methods
__init__(self, name=None, seq=`'````'`, coords=None, parent=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code
__repr__(self) repr(x) | source code
add_hsp(self, other, value) Creates an HSP from self to other with the given value. | source code
str |
get_id(self) Returns the id of the current entry. | source code
initialize_coordinates(self) Sets the coordinates to random numbers in [-1, 1] | source code
str |
output_string_hsp(self) Creates the CLANS <hsp> block format representation of the entry. | source code
str |
output_string_pos(self) Create the CLANS <pos> block format representation of the entry. | source code
str |
output_string_seq(self) Creates the CLANS <seq> block format representation of the entry. | source code
remove_hsp(self, other) Removes the HSP between `self` and `other`; if none exists, does nothing. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
string | coords entry coordinates in 3D space
list | groups ClansSeqgroups that contain the entry
dict | hsp connections between this and another ClansEntry
string | name name of the entry
Clans | parent Clans instance that parents this ClansEntry
string | seq protein sequence of the entry
Inherited from `object`: `__class__`

Method Details

### __init__(self, name=None, seq=`'````'`, coords=None, parent=None) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Parameters: `name` (str) - the entry name `seq` (str) - the entry's amino acid sequence `coords` (iterable with 3 items) - coordinates in 3D space `parent` (Clans instance) - parent of this entry Overrides: object.__init__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)

### add_hsp(self, other, value) | source code
Creates an HSP from self to other with the given value. Parameters: `other` (ClansEntry instance) - the other entry `value` (float) - the value of the HSP

### get_id(self) | source code
Returns the id of the current entry. Note: the first call to this method triggers Clans._update_index, which will make it appear slower than successive calls. Returns: str the entrys' id is returned unless it has no parent in which case -1 is returned

### output_string_hsp(self) | source code
Creates the CLANS <hsp> block format representation of the entry. Returns: str entrys' representation in CLANS <hsp> block format

### output_string_pos(self) | source code
Create the CLANS <pos> block format representation of the entry. Returns: str entrys' representation in CLANS <pos> block format

### output_string_seq(self) | source code
Creates the CLANS <seq> block format representation of the entry. Returns: str entrys' representation in CLANS <seq> block format

### remove_hsp(self, other) | source code
Removes the HSP between `self` and `other`; if none exists, does nothing. Parameters: `other` (ClansEntry instance) - the other entry

Property Details

### coords entry coordinates in 3D space raises ValueError if `value` is not an iterable with 3 items Get Method: unreachable.coords(self) - entry coordinates in 3D space Set Method: unreachable.coords(self, value) Type: string

### groups ClansSeqgroups that contain the entry Get Method: unreachable.groups(self) - ClansSeqgroups that contain the entry Type: list

### hsp connections between this and another ClansEntry Get Method: unreachable.hsp(self) - connections between this and another ClansEntry Type: dict

### name name of the entry raises ValueError if `value` is not a string Get Method: unreachable.name(self) - name of the entry Set Method: unreachable.name(self, value) Type: string

### parent Clans instance that parents this ClansEntry Get Method: unreachable.parent(self) - Clans instance that parents this ClansEntry Type: Clans

### seq protein sequence of the entry raises ValueError if `value` is not a string Get Method: unreachable.seq(self) - protein sequence of the entry Set Method: unreachable.seq(self, value) Type: string