Package biana :: Package BianaObjects :: Module Sequence :: Class Sequence
[hide private]
[frames] | no frames]

Class Sequence

source code


Class to represent a biologic sequencial entity, as nucleotide sequences, protein sequences, etc

This class is suposed to be an abstract class. Only instances for their subclasses should be created

Instance Methods [hide private]
 
__init__(self, sequence, sequenceMD5=None, sequenceID=None, sequence_type=None)
"sequence": the sequence itself.
source code
 
__str__(self)
str(x)
source code
 
get_length(self) source code
 
get_sequence(self) source code
 
get_type(self) source code
 
_get_fragmented_sequence(self, using_size, using_translation_method, using_list)
it returns a list with the ordered indices of the fragments
source code
 
get_fragmented_sequence(self) source code
 
get_sequence_MD5(self)
Now: SequenceMD5 is used only for internal working, and it is represented in a 16-byte string
source code
 
get_sequenceID(self) source code
 
set_sequenceID(self, sequenceID, force=False)
Sets the sequenceID for a sequence.
source code

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

Static Methods [hide private]
 
read_sequences_file(inputPath, format='fasta', sequences_type='protein')
Returns a list of sequence objects contained in a file in the specified format
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sequence, sequenceMD5=None, sequenceID=None, sequence_type=None)
(Constructor)

source code 

"sequence": the sequence itself. It is processed to eliminate non sequence elements

"sequenceMD5" is the digested md5 code of the sequence. It usually has not to be defined as a parameter, as it implements a method to calculate it

"sequenceID" is the unique identifier for the sequence. A sequence must have a sequenceID only when it has been inserted into database

"sequence_type" is the type of sequence (protein, dna or rna)

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

get_sequence_MD5(self)

source code 

Now: SequenceMD5 is used only for internal working, and it is represented in a 16-byte string

Previous: Return MD5 code for sequence "sequence" (MD5 hexdigestion of sequence + its leading 4 chars + its last 4 chars)

set_sequenceID(self, sequenceID, force=False)

source code 

Sets the sequenceID for a sequence.

If it contains a sequence ID it should not be modified. In special cases where it should be able to be modified, use the parameter force=True

read_sequences_file(inputPath, format='fasta', sequences_type='protein')
Static Method

source code 

Returns a list of sequence objects contained in a file in the specified format

"format" can be: fasta

"sequences_type" can be: protein, dna or rna