Find motifs in a set of Sequence Records.
Methods
|
|
__init__
_add_motif
_get_motif_dict
find
find_differences
|
|
__init__
|
__init__ ( self, alphabet_strict=1 )
Initialize a finder to get motifs.
Arguments:
|
|
_add_motif
|
_add_motif (
self,
motif_dict,
motif_to_add,
)
Add a motif to the given dictionary.
|
|
_get_motif_dict
|
_get_motif_dict (
self,
seq_records,
motif_size,
)
Return a dictionary with information on motifs.
This internal function essentially does all of the hard work for
finding motifs, and returns a dictionary containing the found motifs
and their counts. This is internal so it can be reused by
find_motif_differences.
|
|
find
|
find (
self,
seq_records,
motif_size,
)
Find all motifs of the given size in the passed SeqRecords.
Arguments:
Returns:
A PatternRepository object that contains all of the motifs (and their
counts) found in the training sequences).
|
|
find_differences
|
find_differences (
self,
first_records,
second_records,
motif_size,
)
Find motifs in two sets of records and return the differences.
This is used for finding motifs, but instead of just counting up all
of the motifs in a set of records, this returns the differences
between two listings of seq_records.
first_records, second_records - Two listings of SeqRecord objects
to have their motifs compared.
motif_size - The size of the motifs we are looking for.
Returns:
A PatternRepository object that has motifs, but instead of their
raw counts, this has the counts in the first set of records
subtracted from the counts in the second set.
|
|