Package obitools :: Class BioSequence
[hide private]
[frames] | no frames]

Class BioSequence

source code


BioSequence class is the base class for biological sequence representation.

It provides storage of :

BioSequence is an abstract class and must be instanciated from its subclasses

Instance Methods [hide private]
 
__init__(self, id, seq, definition=None, **info)
BioSequence constructor.
source code
str
getDefinition(self)
Sequence definition getter
source code
 
setDefinition(self, value) source code
 
getId(self) source code
 
setId(self, value) source code
str
getStr(self)
Return the sequence as a string
source code
str
getSymbolAt(self, position)
Return the symbole at position in the sequence
source code
 
getSubSeq(self, location) source code
 
extractTaxon(self) source code
 
__str__(self)
str(x)
source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code
 
__iter__(self)
Iterate through the sequence symbols
source code
 
__len__(self) source code
 
__contains__(self, key) source code
 
iteritems(self) source code
 
items(self) source code
 
iterkeys(self) source code
 
keys(self) source code
 
getTags(self) source code
 
getRoot(self) source code
 
getWrappers(self) source code
 
register(self, wrapper) source code
 
_unregister(self, ref) source code

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

Properties [hide private]
  wrappers
  definition
Sequence Definition
  id
Sequence identifier

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, seq, definition=None, **info)
(Constructor)

source code 

BioSequence constructor.

Parameters:
  • id (str) - sequence identifier
  • seq (str) - the sequence
  • definition (str) - sequence definition (optional)
  • info - extra named parameters can be add to associate complementary data to the sequence
Overrides: object.__init__

getDefinition(self)

source code 

Sequence definition getter

Returns: str
the sequence definition

getStr(self)

source code 

Return the sequence as a string

Returns: str
the string representation of the sequence

getSymbolAt(self, position)

source code 

Return the symbole at position in the sequence

Parameters:
  • position (int) - the desired position. Position start from 0 if position is < 0 then they are considered to reference the end of the sequence.
Returns: str
a one letter string

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

wrappers

Get Method:
getWrappers(self)

definition

Sequence Definition

Get Method:
getDefinition(self) - Sequence definition getter
Set Method:
setDefinition(self, value)

id

Sequence identifier

Get Method:
getId(self)
Set Method:
setId(self, value)