Package Bio :: Package NeuralNetwork :: Package Gene :: Module Motif :: Class MotifCoder
[hide private]
[frames] | no frames]

Class MotifCoder

source code

object --+
         |
        MotifCoder

Convert motifs and a sequence into neural network representations.

This is designed to convert a sequence into a representation that
can be fed as an input into a neural network. It does this by
representing a sequence based the motifs present.

Instance Methods [hide private]
 
__init__(self, motifs)
Initialize an input producer with motifs to look for.
source code
 
representation(self, sequence)
Represent a sequence as a set of motifs.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, motifs)
(Constructor)

source code 
Initialize an input producer with motifs to look for.

Arguments:

o motifs - A complete list of motifs, in order, that are to be
searched for in a sequence.

Overrides: object.__init__

representation(self, sequence)

source code 
Represent a sequence as a set of motifs.

Arguments:

o sequence - A Bio.Seq object to represent as a motif.

This converts a sequence into a representation based on the motifs.
The representation is returned as a list of the relative amount of
each motif (number of times a motif occurred divided by the total
number of motifs in the sequence). The values in the list correspond
to the input order of the motifs specified in the initializer.