Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::NeuralNetwork::Gene::Pattern::PatternRepository::__init__ (   self,
  pattern_info 
)

Initialize a repository with patterns,

Arguments:

o pattern_info - A representation of all of the patterns found in
a *Finder search. This should be a dictionary, where the keys
are patterns, and the values are the number of times a pattern is
found. 

The patterns are represented interally as a list of two
tuples, where the first element is the number of times a pattern
occurs, and the second is the pattern itself. This makes it easy
to sort the list and return the top N patterns.

Definition at line 115 of file Pattern.py.

00115                                     :
        """Initialize a repository with patterns,

        Arguments:

        o pattern_info - A representation of all of the patterns found in
        a *Finder search. This should be a dictionary, where the keys
        are patterns, and the values are the number of times a pattern is
        found. 

        The patterns are represented interally as a list of two
        tuples, where the first element is the number of times a pattern
        occurs, and the second is the pattern itself. This makes it easy
        to sort the list and return the top N patterns.
        """
        self._pattern_dict = pattern_info

        # create the list representation
        self._pattern_list = []
        for pattern_name in self._pattern_dict.keys():
            self._pattern_list.append((self._pattern_dict[pattern_name],
                                       pattern_name))

        self._pattern_list.sort()
        self._pattern_list.reverse()

    def get_all(self):


Generated by  Doxygen 1.6.0   Back to index