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

Class RandomMotifGenerator

source code

Generate a random motif within given parameters.

Instance Methods [hide private]
 
__init__(self, alphabet, min_size=12, max_size=17)
Initialize with the motif parameters.
source code
 
random_motif(self)
Create a random motif within the given parameters.
source code
Method Details [hide private]

__init__(self, alphabet, min_size=12, max_size=17)
(Constructor)

source code 

Initialize with the motif parameters.

Arguments:

o alphabet - An alphabet specifying what letters can be inserted in a motif.

o min_size, max_size - Specify the range of sizes for motifs.

random_motif(self)

source code 

Create a random motif within the given parameters.

This returns a single motif string with letters from the given alphabet. The size of the motif will be randomly chosen between max_size and min_size.