Package csb :: Package bio :: Package io :: Module clans :: Class ClansSeqgroup

[frames] | no frames]

# Class ClansSeqgroup

source code

    object --+
             |
            ClansSeqgroup

Class holding the data of one CLANS group (seqgroup).

Instance Methods

__init__(self, **kw) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__len__(self) | source code

__repr__(self) repr(x) | source code

add(self, new_member) Adds entry `new_member` to this ClansSeqgroup. | source code

bool

is_empty(self) Checks if the group contains entries. | source code

str

output_string(self) Creates the CLANS <seqgroup> block format representation of the group. | source code

remove(self, member) Removes ClansEntry `member` from this group. | source code

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

Properties
Color | color color of the seqgroup
int | hide if True, the seqgroup's symbols in the graphical output are not drawn
list | members the members of this seqgroup
string | name name of the seqgroup
int | size size of the symbol used to represent the seqgroup in the graphical output
int | type symbol used to represent the seqgroup in the graphical output
Inherited from `object`: `__class__`

Method Details

### __init__(self, **kw)
(Constructor)

source code

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

Parameters:
  - `name` (string) - name of the seqgroup
  - `type` (int) - symbol used to represent the seqgroup in the graphical output
  - `size` (int) - size of the symbol used to represent the seqgroup in the graphical output
  - `hide` (bool) - if True, the seqgroup's symbols in the graphical output are not drawn; default: False
  - `color` (Color or string formatted like 'x;y;z') - color of the seqgroup
  - `members` (list) - list of members of this seqgroup
Overrides: object.__init__
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)

### add(self, new_member)

source code

Adds entry `new_member` to this ClansSeqgroup.

Parameters:
  - `new_member` (ClansEntry instance) - the member that shall be added to this ClansSeqgroup
Raises:
  - `TypeError` - if `new_member` is no ClansEntry instance
  - `ValueError` - if `new_member` is already contained in this ClansSeqgroup

Note: ClansEntry-s added using this method that are not part of the main Clans instance need to be added to the Clans instance manually.

### is_empty(self)

source code

Checks if the group contains entries.

Returns: bool
  True if the group contains no entries, else False.

### output_string(self)

source code

Creates the CLANS <seqgroup> block format representation of the group.

Returns: str
  entrys' representation in CLANS <seqgroup> block format

### remove(self, member)

source code

Removes ClansEntry `member` from this group.

Parameters:
  - `member` (a ClansEntry instance) - the member to be removed
Raises:
  - `TypeError` - if `member` is no ClansEntry instance
  - `ValueError` - if `member` is not part of this ClansSeqgroup

Property Details

### color

color of the seqgroup

raises ValueError if set to a wrongly formatted string (correct: '{r};{g};{b}')

Get Method:
  unreachable.color(self) - color of the seqgroup
Set Method:
  unreachable.color(self, value, separator=`'``;``'`)
Type:
  Color

### hide

if True, the seqgroup's symbols in the graphical output are not drawn

raises ValueError if `value` is no bool

Get Method:
  unreachable.hide(self) - if True, the seqgroup's symbols in the graphical output are not drawn
Set Method:
  unreachable.hide(self, value)
Type:
  int

### members

the members of this seqgroup

Get Method:
  unreachable.members(self) - the members of this seqgroup
Type:
  list

### name

name of the seqgroup

raises ValueError if `value` is no string

Get Method:
  unreachable.name(self) - name of the seqgroup
Set Method:
  unreachable.name(self, value)
Type:
  string

### size

size of the symbol used to represent the seqgroup in the graphical output

raises ValueError if `value` is not castable to int

Get Method:
  unreachable.size(self) - size of the symbol used to represent the seqgroup in the graphical output
Set Method:
  unreachable.size(self, value)
Type:
  int

### type

symbol used to represent the seqgroup in the graphical output

raises ValueError if `value` is not castable to int

Get Method:
  unreachable.type(self) - symbol used to represent the seqgroup in the graphical output
Set Method:
  unreachable.type(self, value)
Type:
  int