-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtGD_gene_clvr.py
90 lines (80 loc) · 4.63 KB
/
tGD_gene_clvr.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import tGD_aux as aux
genotypes = (
'WWWWWW', 'WWWWRW', 'WWWWBW', 'WWWWRR', 'WWWWBR', 'WWWWBB',
'CWWWWW', 'CWWWRW', 'CWWWBW', 'CWWWRR', 'CWWWBR', 'CWWWBB',
'WGWWWW', 'WGWWRW', 'WGWWBW', 'WGWWRR', 'WGWWBR', 'WGWWBB',
'CGWWWW', 'CGWWRW', 'CGWWBW', 'CGWWRR', 'CGWWBR', 'CGWWBB',
'CWCWWW', 'CWCWRW', 'CWCWBW', 'CWCWRR', 'CWCWBR', 'CWCWBB',
'CWWGWW', 'CWWGRW', 'CWWGBW', 'CWWGRR', 'CWWGBR', 'CWWGBB',
'CGCWWW', 'CGCWRW', 'CGCWBW', 'CGCWRR', 'CGCWBR', 'CGCWBB',
'WGWGWW', 'WGWGRW', 'WGWGBW', 'WGWGRR', 'WGWGBR', 'WGWGBB',
'CGWGWW', 'CGWGRW', 'CGWGBW', 'CGWGRR', 'CGWGBR', 'CGWGBB',
'CGCGWW', 'CGCGRW', 'CGCGBW', 'CGCGRR', 'CGCGBR', 'CGCGBB'
)
###############################################################################
# Ecology genotype counts
###############################################################################
# WA --------------------------------------------------------------------------
wAGenes = (('W', (0, 2)), )
wAPos = aux.aggregateGeneAppearances(genotypes, wAGenes)
# H ---------------------------------------------------------------------------
hGenes = (('G', (1, 3)), )
hPos = aux.aggregateGeneAppearances(genotypes, hGenes)
# RA --------------------------------------------------------------------------
rAGenes = (('R', (0, 2)), ('B', (0, 2)))
rAPos = aux.aggregateGeneAppearances(genotypes, rAGenes)
# RB --------------------------------------------------------------------------
rBGenes = (('R', (1, 3)), ('B', (1, 3)))
rBPos = aux.aggregateGeneAppearances(genotypes, rBGenes)
# G ---------------------------------------------------------------------------
gGenes = (('C', (0, 2)), )
gPos = aux.aggregateGeneAppearances(genotypes, gGenes)
# WB --------------------------------------------------------------------------
wBGenes = (('W', (1, 3)), )
wBPos = aux.aggregateGeneAppearances(genotypes, wBGenes)
# Full set --------------------------------------------------------------------
TGD_ECO = (wAPos, hPos, rAPos, rBPos, gPos, wBPos)
###############################################################################
# Health genotype counts
###############################################################################
# H* --------------------------------------------------------------------------
hGenes = (('G', (1, 3)), )
hPos = set(aux.aggregateGeneAppearances(genotypes, hGenes))
# O- --------------------------------------------------------------------------
wGenes = (('W', (1, 3)), ('R', (1, 3)), ('B', (1, 3)))
wPos = set(aux.aggregateGeneAppearances(genotypes, wGenes))
# Full set --------------------------------------------------------------------
TGD_HLT = [list(i) for i in (hPos, wPos - hPos, wPos | hPos)]
###############################################################################
# Trash genotype counts
###############################################################################
# C* --------------------------------------------------------------------------
hGenes = (('C', (0, 2)), )
hPos = set(aux.aggregateGeneAppearances(genotypes, hGenes))
# O* --------------------------------------------------------------------------
wGenes = (('W', (0, 2)), ('R', (0, 2)), ('B', (0, 2)))
wPos = set(aux.aggregateGeneAppearances(genotypes, wGenes))
# Full set --------------------------------------------------------------------
TGD_TRS = [list(i) for i in (hPos, wPos - hPos, wPos | hPos)]
###############################################################################
# Wild genotype counts
###############################################################################
# H ---------------------------------------------------------------------------
hGenes = (('C', (0, 2)), ('R', (0, 2)), ('B', (0, 2)))
hPos = set(aux.aggregateGeneAppearances(genotypes, hGenes))
# W* --------------------------------------------------------------------------
wGenes = (('W', (0, 2)), )
wPos = set(aux.aggregateGeneAppearances(genotypes, wGenes))
# Full set --------------------------------------------------------------------
TGD_WLD = [list(i) for i in (hPos - wPos, wPos, hPos | wPos)]
###############################################################################
# Custom genotype counts
###############################################################################
# H ---------------------------------------------------------------------------
hGenes = (('C', (0, 2)), )
hPos = set(aux.aggregateGeneAppearances(genotypes, hGenes))
# W* --------------------------------------------------------------------------
wGenes = (('G', (1, 3)), )
wPos = set(aux.aggregateGeneAppearances(genotypes, wGenes))
# Full set --------------------------------------------------------------------
TGD_CST = [list(i) for i in (hPos - wPos, wPos, hPos | wPos)]