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

def Bio::NeuralNetwork::Gene::Pattern::PatternRepository::remove_polyA (   self,
  at_percentage = .9 
)

Remove patterns which are likely due to polyA tails from the lists.

This is just a helper function to remove pattenrs which are likely
just due to polyA tails, and thus are not really great motifs.
This will also get rid of stuff like ATATAT, which might be a
useful motif, so use at your own discretion.

XXX Could we write a more general function, based on info content
or something like that?

Arguments:

o at_percentage - The percentage of A and T residues in a pattern
that qualifies it for being removed.

Definition at line 221 of file Pattern.py.

00221                                               :
        """Remove patterns which are likely due to polyA tails from the lists.

        This is just a helper function to remove pattenrs which are likely
        just due to polyA tails, and thus are not really great motifs.
        This will also get rid of stuff like ATATAT, which might be a
        useful motif, so use at your own discretion.

        XXX Could we write a more general function, based on info content
        or something like that?
        
        Arguments:

        o at_percentage - The percentage of A and T residues in a pattern
        that qualifies it for being removed.
        """
        remove_list = []
        # find all of the really AT rich patterns
        for pattern_info in self._pattern_list:
            pattern_at = (float(string.count(pattern_info[1], 'A') +
                              string.count(pattern_info[1], 'T')) /
                        float(len(pattern_info[1])))
            if pattern_at > at_percentage:
                remove_list.append(pattern_info)

        # now remove them from the master list
        for to_remove in remove_list:
            self._pattern_list.remove(to_remove)

    def count(self, pattern):


Generated by  Doxygen 1.6.0   Back to index