In this module, there are the GAllele.GAlleles class (which is the class that holds the allele types) and all the allele types to use with the supported chromosomes.
GAlleleList Class - The list allele type
>>> alleles = GAlleles()
>>> choices = [1,2,3,4]
>>> lst = GAlleleList(choices)
>>> alleles.add(lst)
>>> alleles[0].getRandomAllele() in lst
True
Appends one option to the options list
| Parameter: | option – option to be added in the list |
|---|
Removes the option from list
| Parameter: | option – remove the option from the list |
|---|
GAlleleRange Class - The range allele type
>>> ranges = GAlleleRange(0,100)
>>> ranges.getRandomAllele() >= 0 and ranges.getRandomAllele() <= 100
True
| Parameters: |
|
|---|
Add a new range
| Parameters: |
|
|---|
Sets True if the range is real or False if is integer
| Parameter: | flag – True or False |
|---|
GAlleles Class - The set of alleles
>>> alleles = GAlleles()
>>> choices = [1,2,3,4]
>>> lst = GAlleleList(choices)
>>> alleles.add(lst)
>>> alleles[0].getRandomAllele() in lst
True
| Parameters: |
|
|---|
Appends one allele to the alleles list
| Parameter: | allele – allele to be added |
|---|