Package Bio :: Package NeuralNetwork :: Package Gene :: Module Schema :: Class SchemaCoder
[hide private]
[frames] | no frames]

Class SchemaCoder

source code

object --+
         |
        SchemaCoder

Convert a sequence into a representation of ambiguous motifs (schemas).

This takes a sequence, and returns the number of times specified motifs are found in the sequence. This lets you represent a sequence as just a count of (possibly ambiguous) motifs.

Instance Methods [hide private]
 
__init__(self, schemas, ambiguous_converter)
Initialize the coder to convert sequences
source code
 
representation(self, sequence)
Represent the given input sequence as a bunch of motif counts.
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, schemas, ambiguous_converter)
(Constructor)

source code 

Initialize the coder to convert sequences

Arguments:

o schema - A list of all of the schemas we want to search for in input sequences.

o ambiguous_converter - An Schema class which can be used to convert motifs into regular expressions for searching.

Overrides: object.__init__

representation(self, sequence)

source code 

Represent the given input sequence as a bunch of motif counts.

Arguments:

o sequence - A Bio.Seq object we are going to represent as schemas.

This takes the sequence, searches for the motifs within it, and then returns counts specifying the relative number of times each motifs was found. The frequencies are in the order the original motifs were passed into the initializer.