→ summary
******************************************************************************************
Module Evolife.Genetics.DNA:
===========================
EVOLIFE: Module DNA:
The genome of each creature in EVOLIFE is defined as a binary string
The way this binary string is implemented (e.g. list of binary numbers
or bits compacted into integers) should remain private to this module
******************************************************************************************
**************************************************************************************
Class DNA:
=========
class DNA: individuals’ ‘DNA’ defined as a string of bits
**************************************************************************************
----------------------------------------------------------------------------------
Method DNA.__init__
----------------------------------------------------------------------------------
Arguments:
. Scenario
. Nb_nucleotides
----------------------------------------------------------------------------------
Method DNA.DNAfill:
==================
fills the DNA with given Nucleotides
----------------------------------------------------------------------------------
Arguments:
. Nucleotides
----------------------------------------------------------------------------------
Method DNA.hybrid:
=================
builds the child’s DNA from the parents’ DNA
----------------------------------------------------------------------------------
Arguments:
. mother
. father
. number_crossover
----------------------------------------------------------------------------------
Method DNA.mutate:
=================
computing the expected number of mutations
----------------------------------------------------------------------------------
Arguments:
. mutation_rate
----------------------------------------------------------------------------------
Method DNA.read_DNA:
===================
reads a chunk of DNA
----------------------------------------------------------------------------------
Arguments:
. start
. end
. coding
----------------------------------------------------------------------------------
Method DNA.hamming:
==================
computes the Hamming distance between two DNA strings
----------------------------------------------------------------------------------
Arguments:
. alter
----------------------------------------------------------------------------------
Method DNA.get_DNA:
==================
returns DNA as a tuple
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Method DNA.display
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Method DNA.save
----------------------------------------------------------------------------------
Back to Evolife