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

def test_GAMutation::ConversionTest::t_always_mutate (   self  ) 

Test ability to cause mutations.

Definition at line 83 of file test_GAMutation.py.

00083                              :
        """Test ability to cause mutations.
        mutator = ConversionMutation(mutation_rate = 1.0)

        # when we mutate randomly by chance, we expect to get 2/3
        # visible mutations (there are three letters in the alphabet and
        # one change cannot be observed since it is a mutation back to itself)
        # For a four letter genome, the chance of being exactly the same
        # after mutations is about .01, so being better than 90% different
        # if a reasonable expectation.
        expected_percent = .9

        self._always_mutate(mutator, expected_percent)

    def t_never_mutate(self):

Generated by  Doxygen 1.6.0   Back to index