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
Parameters: |
|
---|
Removes all the allele options from the list
Returns one random choice from the options list
Removes the option from list
Parameters: |
|
---|
GAlleleRange Class - The range allele type
>>> ranges = GAlleleRange(0,100)
>>> ranges.getRandomAllele() >= 0 and ranges.getRandomAllele() <= 100
True
Parameters: |
|
---|
Add a new range
Parameters: |
|
---|
Removes all ranges
Return the maximum of all the ranges
Return type: | the maximum value |
---|
Return the minimum of all the ranges
Return type: | the minimum value |
---|
Returns one random choice between the range
Returns True if the range is real or False if it is integer
Sets True if the range is real or False if is integer
Parameters: |
|
---|
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
Parameters: |
|
---|