-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTPT_gene.py
61 lines (55 loc) · 1.9 KB
/
TPT_gene.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/python
# -*- coding: utf-8 -*-
import MoNeT_MGDrivE as monet
import TPT_gene_LDR as LDR
import TPT_gene_HUM as HUM
import TPT_gene_INC as INC
import TPT_aux as aux
###############################################################################
# Drive
###############################################################################
def driveSelector(DRIVE, TYPE, popSize=(100*12000), humSize=350e3):
###########################################################################
if (TYPE == 'HUM'):
(aggD, yRange, folder) = HUM.driveParameters(TYPE, popSize=humSize)
elif (TYPE == 'INC'):
(aggD, yRange, folder) = INC.driveParameters(TYPE, popSize=aux.INC_SIZE)
else:
if (DRIVE == 'LDR'):
(aggD, yRange, folder) = LDR.driveParameters(TYPE, popSize)
###########################################################################
if TYPE == 'ECO':
colors = monet.COLEN
elif TYPE == 'HLT':
colors = ['#f2008955', '#0d47a155', '#d6d6d611']
elif TYPE == 'TRS':
colors = monet.COLTN
elif TYPE == 'WLD':
colors = monet.COLWN
elif TYPE == 'HUM':
colors = ['#274c7700', '#6f2dbdAA', '#dee2ff55']
elif TYPE == 'INC':
colors = ['#8CD9FF00', '#16db6544', '#dee2ff55']
###########################################################################
geneDict = {
'gDict': aggD, 'yRange': yRange, 'colors': colors, 'folder': folder
}
return geneDict
def maleFemaleSelector(AOI):
if (AOI == 'HLT') or (AOI == 'INC'):
MF = (False, True)
elif (AOI == 'HUM'):
MF = (False, True)
else:
MF = (True, True)
return MF
def colorSelector(AOI):
if AOI == 'ECO':
colors = monet.COLEO
elif AOI == 'HLT':
colors = monet.COLHO
elif AOI == 'TRS':
colors = monet.COLTO
elif AOI == 'WLD':
colors = monet.COLWO
return colors