Package Bio :: Package NeuralNetwork :: Package Gene :: Module Signature :: Class SignatureFinder
[hide private]
[frames] | no frames]

Class SignatureFinder

source code

object --+
         |
        SignatureFinder

Find Signatures in a group of sequence records.

In this simple implementation, signatures are just defined as a
two motifs separated by a gap. We need something a lot smarter than
this to find more complicated signatures.

Instance Methods [hide private]
 
__init__(self, alphabet_strict=1)
Initialize a finder to get signatures.
source code
 
find(self, seq_records, signature_size, max_gap)
Find all signatures in a group of sequences.
source code
 
_get_signature_dict(self, seq_records, sig_size, max_gap)
Return a dictionary with all signatures and their counts.
source code
 
_add_sig(self, sig_dict, sig_to_add)
Add a signature to the given dictionary.
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, alphabet_strict=1)
(Constructor)

source code 
Initialize a finder to get signatures.

Arguments:

o alphabet_strict - Specify whether signatures should be required
to have all letters in the signature be consistent with the
alphabet of the original sequence. This requires that all Seqs
used have a consistent alphabet. This helps protect against getting
useless signatures full of ambiguity signals.

Overrides: object.__init__

find(self, seq_records, signature_size, max_gap)

source code 
Find all signatures in a group of sequences.

Arguments:

o seq_records - A list of SeqRecord objects we'll use the sequences
from to find signatures.

o signature_size - The size of each half of a signature (ie. if this
is set at 3, then the signature could be AGC-----GAC)

o max_gap - The maximum gap size between two parts of a signature.

_get_signature_dict(self, seq_records, sig_size, max_gap)

source code 
Return a dictionary with all signatures and their counts.

This internal function does all of the hard work for the
find_signatures function.