ComplexHeatmap-py 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ComplexHeatmap.py +7 -0
- complexheatmap/__init__.py +221 -0
- complexheatmap/_base.py +56 -0
- complexheatmap/_options.py +165 -0
- complexheatmap/anno_funcs.py +2781 -0
- complexheatmap/annotations.py +1611 -0
- complexheatmap/colors.py +848 -0
- complexheatmap/data/dmr_summary/cgi_anno.csv +9 -0
- complexheatmap/data/dmr_summary/dist_tss.csv +9 -0
- complexheatmap/data/dmr_summary/gene_anno.csv +9 -0
- complexheatmap/data/dmr_summary/label.csv +9 -0
- complexheatmap/data/dmr_summary/mat_enrich_gf.csv +9 -0
- complexheatmap/data/dmr_summary/mat_enrich_st.csv +9 -0
- complexheatmap/data/dmr_summary/mat_pct_st.csv +9 -0
- complexheatmap/data/dmr_summary/mean_meth.csv +9 -0
- complexheatmap/data/dmr_summary/n_corr.csv +9 -0
- complexheatmap/data/dmr_summary/n_gr.csv +9 -0
- complexheatmap/data/gene_expression.csv +156 -0
- complexheatmap/data/gr.csv +2416 -0
- complexheatmap/data/measles.csv +60 -0
- complexheatmap/data/meth/enhancer.csv +1001 -0
- complexheatmap/data/meth/expr.csv +1001 -0
- complexheatmap/data/meth/meth.csv +1001 -0
- complexheatmap/data/meth/row_meta.csv +1001 -0
- complexheatmap/data/rand_mat.csv +19 -0
- complexheatmap/data/random_meth_expr_data/anno.csv +21 -0
- complexheatmap/data/random_meth_expr_data/anno_states.csv +1001 -0
- complexheatmap/data/random_meth_expr_data/mat_expr.csv +1001 -0
- complexheatmap/data/random_meth_expr_data/mat_meth.csv +1001 -0
- complexheatmap/data/random_meth_expr_data/row_meta.csv +1001 -0
- complexheatmap/data/sample_order.txt +172 -0
- complexheatmap/data/tcga_lung_adenocarcinoma.csv +27 -0
- complexheatmap/decorate.py +159 -0
- complexheatmap/dendrogram.py +937 -0
- complexheatmap/density.py +276 -0
- complexheatmap/genomic.py +348 -0
- complexheatmap/grid.py +1580 -0
- complexheatmap/heatmap.py +2244 -0
- complexheatmap/heatmap_list.py +1569 -0
- complexheatmap/legend.py +992 -0
- complexheatmap/oncoprint.py +488 -0
- complexheatmap/text.py +655 -0
- complexheatmap/three_d.py +188 -0
- complexheatmap/translate.py +338 -0
- complexheatmap/units.py +718 -0
- complexheatmap/upset.py +886 -0
- complexheatmap/utils.py +183 -0
- complexheatmap_py-0.1.0.dist-info/METADATA +96 -0
- complexheatmap_py-0.1.0.dist-info/RECORD +52 -0
- complexheatmap_py-0.1.0.dist-info/WHEEL +5 -0
- complexheatmap_py-0.1.0.dist-info/licenses/LICENSE +24 -0
- complexheatmap_py-0.1.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
TCGA-91-6836-01
|
|
2
|
+
TCGA-50-5941-01
|
|
3
|
+
TCGA-05-4250-01
|
|
4
|
+
TCGA-05-4433-01
|
|
5
|
+
TCGA-49-4510-01
|
|
6
|
+
TCGA-67-3774-01
|
|
7
|
+
TCGA-55-1592-01
|
|
8
|
+
TCGA-73-4668-01
|
|
9
|
+
TCGA-49-4507-01
|
|
10
|
+
TCGA-91-6835-01
|
|
11
|
+
TCGA-44-2657-01
|
|
12
|
+
TCGA-49-6745-01
|
|
13
|
+
TCGA-75-5122-01
|
|
14
|
+
TCGA-75-6211-01
|
|
15
|
+
TCGA-44-6145-01
|
|
16
|
+
TCGA-05-4249-01
|
|
17
|
+
TCGA-50-5933-01
|
|
18
|
+
TCGA-05-4427-01
|
|
19
|
+
TCGA-05-4417-01
|
|
20
|
+
TCGA-44-6777-01
|
|
21
|
+
TCGA-64-5815-01
|
|
22
|
+
TCGA-05-4415-01
|
|
23
|
+
TCGA-35-3615-01
|
|
24
|
+
TCGA-64-5774-01
|
|
25
|
+
TCGA-67-4679-01
|
|
26
|
+
TCGA-64-5778-01
|
|
27
|
+
TCGA-38-4626-01
|
|
28
|
+
TCGA-44-6776-01
|
|
29
|
+
TCGA-50-5936-01
|
|
30
|
+
TCGA-49-6744-01
|
|
31
|
+
TCGA-05-4390-01
|
|
32
|
+
TCGA-05-4430-01
|
|
33
|
+
TCGA-05-4405-01
|
|
34
|
+
TCGA-05-4418-01
|
|
35
|
+
TCGA-50-5932-01
|
|
36
|
+
TCGA-64-1677-01
|
|
37
|
+
TCGA-73-4670-01
|
|
38
|
+
TCGA-91-6828-01
|
|
39
|
+
TCGA-73-4662-01
|
|
40
|
+
TCGA-05-4244-01
|
|
41
|
+
TCGA-05-4395-01
|
|
42
|
+
TCGA-05-4403-01
|
|
43
|
+
TCGA-44-2668-01
|
|
44
|
+
TCGA-44-6144-01
|
|
45
|
+
TCGA-44-6146-01
|
|
46
|
+
TCGA-49-4505-01
|
|
47
|
+
TCGA-50-5051-01
|
|
48
|
+
TCGA-55-1595-01
|
|
49
|
+
TCGA-55-6642-01
|
|
50
|
+
TCGA-64-5775-01
|
|
51
|
+
TCGA-67-3773-01
|
|
52
|
+
TCGA-73-4659-01
|
|
53
|
+
TCGA-73-4677-01
|
|
54
|
+
TCGA-75-5126-01
|
|
55
|
+
TCGA-75-6206-01
|
|
56
|
+
TCGA-50-5946-01
|
|
57
|
+
TCGA-55-5899-01
|
|
58
|
+
TCGA-05-4420-01
|
|
59
|
+
TCGA-05-5428-01
|
|
60
|
+
TCGA-35-4122-01
|
|
61
|
+
TCGA-44-2662-01
|
|
62
|
+
TCGA-05-4389-01
|
|
63
|
+
TCGA-05-4382-01
|
|
64
|
+
TCGA-50-6594-01
|
|
65
|
+
TCGA-75-5146-01
|
|
66
|
+
TCGA-44-6774-01
|
|
67
|
+
TCGA-05-4410-01
|
|
68
|
+
TCGA-44-2666-01
|
|
69
|
+
TCGA-44-3918-01
|
|
70
|
+
TCGA-50-5044-01
|
|
71
|
+
TCGA-50-5942-01
|
|
72
|
+
TCGA-05-4396-01
|
|
73
|
+
TCGA-50-5944-01
|
|
74
|
+
TCGA-73-4658-01
|
|
75
|
+
TCGA-35-4123-01
|
|
76
|
+
TCGA-67-3771-01
|
|
77
|
+
TCGA-38-4631-01
|
|
78
|
+
TCGA-64-1680-01
|
|
79
|
+
TCGA-05-4434-01
|
|
80
|
+
TCGA-71-6725-01
|
|
81
|
+
TCGA-44-3396-01
|
|
82
|
+
TCGA-49-4486-01
|
|
83
|
+
TCGA-75-5125-01
|
|
84
|
+
TCGA-49-4488-01
|
|
85
|
+
TCGA-38-4625-01
|
|
86
|
+
TCGA-49-4506-01
|
|
87
|
+
TCGA-64-1676-01
|
|
88
|
+
TCGA-44-6778-01
|
|
89
|
+
TCGA-64-1678-01
|
|
90
|
+
TCGA-50-6591-01
|
|
91
|
+
TCGA-05-4397-01
|
|
92
|
+
TCGA-50-5930-01
|
|
93
|
+
TCGA-67-6215-01
|
|
94
|
+
TCGA-44-6775-01
|
|
95
|
+
TCGA-44-2656-01
|
|
96
|
+
TCGA-50-6590-01
|
|
97
|
+
TCGA-50-5049-01
|
|
98
|
+
TCGA-50-6592-01
|
|
99
|
+
TCGA-49-4490-01
|
|
100
|
+
TCGA-49-6767-01
|
|
101
|
+
TCGA-91-6829-01
|
|
102
|
+
TCGA-05-4402-01
|
|
103
|
+
TCGA-50-5072-01
|
|
104
|
+
TCGA-55-1594-01
|
|
105
|
+
TCGA-05-4426-01
|
|
106
|
+
TCGA-05-4398-01
|
|
107
|
+
TCGA-44-3398-01
|
|
108
|
+
TCGA-55-6712-01
|
|
109
|
+
TCGA-05-4424-01
|
|
110
|
+
TCGA-38-4628-01
|
|
111
|
+
TCGA-50-5045-01
|
|
112
|
+
TCGA-50-5931-01
|
|
113
|
+
TCGA-75-5147-01
|
|
114
|
+
TCGA-05-4422-01
|
|
115
|
+
TCGA-05-5715-01
|
|
116
|
+
TCGA-38-4630-01
|
|
117
|
+
TCGA-44-2655-01
|
|
118
|
+
TCGA-49-4487-01
|
|
119
|
+
TCGA-73-4676-01
|
|
120
|
+
TCGA-80-5611-01
|
|
121
|
+
TCGA-86-6562-01
|
|
122
|
+
TCGA-05-4384-01
|
|
123
|
+
TCGA-05-4425-01
|
|
124
|
+
TCGA-05-4432-01
|
|
125
|
+
TCGA-05-5420-01
|
|
126
|
+
TCGA-05-5423-01
|
|
127
|
+
TCGA-05-5425-01
|
|
128
|
+
TCGA-05-5429-01
|
|
129
|
+
TCGA-35-5375-01
|
|
130
|
+
TCGA-38-4627-01
|
|
131
|
+
TCGA-38-4629-01
|
|
132
|
+
TCGA-38-4632-01
|
|
133
|
+
TCGA-38-6178-01
|
|
134
|
+
TCGA-44-2659-01
|
|
135
|
+
TCGA-44-2661-01
|
|
136
|
+
TCGA-44-2665-01
|
|
137
|
+
TCGA-44-3919-01
|
|
138
|
+
TCGA-44-4112-01
|
|
139
|
+
TCGA-44-5643-01
|
|
140
|
+
TCGA-44-5645-01
|
|
141
|
+
TCGA-44-6147-01
|
|
142
|
+
TCGA-44-6148-01
|
|
143
|
+
TCGA-44-6779-01
|
|
144
|
+
TCGA-49-4494-01
|
|
145
|
+
TCGA-49-4501-01
|
|
146
|
+
TCGA-49-4512-01
|
|
147
|
+
TCGA-49-4514-01
|
|
148
|
+
TCGA-49-6742-01
|
|
149
|
+
TCGA-49-6743-01
|
|
150
|
+
TCGA-50-5055-01
|
|
151
|
+
TCGA-50-5066-01
|
|
152
|
+
TCGA-50-5068-01
|
|
153
|
+
TCGA-50-5935-01
|
|
154
|
+
TCGA-50-5939-01
|
|
155
|
+
TCGA-50-6593-01
|
|
156
|
+
TCGA-50-6595-01
|
|
157
|
+
TCGA-50-6597-01
|
|
158
|
+
TCGA-55-1596-01
|
|
159
|
+
TCGA-55-6543-01
|
|
160
|
+
TCGA-64-5779-01
|
|
161
|
+
TCGA-64-5781-01
|
|
162
|
+
TCGA-67-3770-01
|
|
163
|
+
TCGA-67-3772-01
|
|
164
|
+
TCGA-67-6216-01
|
|
165
|
+
TCGA-67-6217-01
|
|
166
|
+
TCGA-73-4666-01
|
|
167
|
+
TCGA-73-4675-01
|
|
168
|
+
TCGA-75-6203-01
|
|
169
|
+
TCGA-75-6205-01
|
|
170
|
+
TCGA-75-6207-01
|
|
171
|
+
TCGA-75-6212-01
|
|
172
|
+
TCGA-91-6831-01
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"row_name","TCGA-05-4384-01","TCGA-05-4390-01","TCGA-05-4425-01","TCGA-38-4631-01","TCGA-38-4632-01","TCGA-38-6178-01","TCGA-44-6144-01","TCGA-44-6145-01","TCGA-44-6146-01","TCGA-44-6147-01","TCGA-44-6148-01","TCGA-49-4488-01","TCGA-50-5930-01","TCGA-50-5931-01","TCGA-50-5932-01","TCGA-50-5933-01","TCGA-50-5935-01","TCGA-50-5941-01","TCGA-50-5942-01","TCGA-50-5944-01","TCGA-50-5946-01","TCGA-50-6591-01","TCGA-50-6592-01","TCGA-50-6593-01","TCGA-50-6594-01","TCGA-55-6543-01","TCGA-67-4679-01","TCGA-67-6215-01","TCGA-67-6216-01","TCGA-67-6217-01","TCGA-73-4658-01","TCGA-73-4676-01","TCGA-75-5122-01","TCGA-75-5125-01","TCGA-75-5126-01","TCGA-75-6203-01","TCGA-75-6205-01","TCGA-75-6206-01","TCGA-75-6207-01","TCGA-75-6211-01","TCGA-75-6212-01","TCGA-86-6562-01","TCGA-05-4396-01","TCGA-05-4405-01","TCGA-05-4410-01","TCGA-05-4415-01","TCGA-05-4417-01","TCGA-05-4424-01","TCGA-05-4427-01","TCGA-05-4433-01","TCGA-44-6774-01","TCGA-44-6775-01","TCGA-44-6776-01","TCGA-44-6777-01","TCGA-44-6778-01","TCGA-44-6779-01","TCGA-49-4487-01","TCGA-49-4490-01","TCGA-49-4512-01","TCGA-49-4514-01","TCGA-49-6742-01","TCGA-49-6743-01","TCGA-49-6744-01","TCGA-49-6745-01","TCGA-49-6767-01","TCGA-50-5044-01","TCGA-50-5051-01","TCGA-50-5072-01","TCGA-50-6590-01","TCGA-50-6595-01","TCGA-50-6597-01","TCGA-55-6642-01","TCGA-55-6712-01","TCGA-71-6725-01","TCGA-91-6828-01","TCGA-91-6829-01","TCGA-91-6831-01","TCGA-91-6835-01","TCGA-91-6836-01","TCGA-35-3615-01","TCGA-44-2655-01","TCGA-44-2656-01","TCGA-44-2659-01","TCGA-44-2662-01","TCGA-44-2665-01","TCGA-44-2666-01","TCGA-44-2668-01","TCGA-55-1592-01","TCGA-55-1594-01","TCGA-55-1595-01","TCGA-55-1596-01","TCGA-64-1676-01","TCGA-64-1677-01","TCGA-64-1678-01","TCGA-64-1680-01","TCGA-67-3770-01","TCGA-67-3771-01","TCGA-67-3772-01","TCGA-67-3773-01","TCGA-67-3774-01","TCGA-05-4244-01","TCGA-05-4249-01","TCGA-05-4250-01","TCGA-35-4122-01","TCGA-35-4123-01","TCGA-44-2657-01","TCGA-44-2661-01","TCGA-44-3398-01","TCGA-44-3918-01","TCGA-44-3919-01","TCGA-44-4112-01","TCGA-05-4382-01","TCGA-05-4389-01","TCGA-05-4395-01","TCGA-05-4397-01","TCGA-05-4398-01","TCGA-05-4402-01","TCGA-05-4403-01","TCGA-05-4418-01","TCGA-05-4420-01","TCGA-05-4422-01","TCGA-05-4426-01","TCGA-05-4430-01","TCGA-05-4432-01","TCGA-05-4434-01","TCGA-38-4625-01","TCGA-38-4626-01","TCGA-38-4627-01","TCGA-38-4628-01","TCGA-38-4629-01","TCGA-38-4630-01","TCGA-44-3396-01","TCGA-49-4486-01","TCGA-49-4494-01","TCGA-49-4501-01","TCGA-49-4505-01","TCGA-49-4506-01","TCGA-49-4507-01","TCGA-49-4510-01","TCGA-73-4659-01","TCGA-73-4662-01","TCGA-73-4666-01","TCGA-73-4668-01","TCGA-73-4670-01","TCGA-73-4675-01","TCGA-73-4677-01","TCGA-05-5420-01","TCGA-05-5423-01","TCGA-05-5425-01","TCGA-05-5428-01","TCGA-05-5429-01","TCGA-05-5715-01","TCGA-35-5375-01","TCGA-44-5643-01","TCGA-44-5645-01","TCGA-50-5045-01","TCGA-50-5049-01","TCGA-50-5055-01","TCGA-50-5066-01","TCGA-50-5068-01","TCGA-50-5936-01","TCGA-50-5939-01","TCGA-55-5899-01","TCGA-64-5774-01","TCGA-64-5775-01","TCGA-64-5778-01","TCGA-64-5779-01","TCGA-64-5781-01","TCGA-64-5815-01","TCGA-75-5146-01","TCGA-75-5147-01","TCGA-80-5611-01"
|
|
2
|
+
"KRAS","","MUT;","","","","","MUT;","MUT;","MUT;","","","","","","MUT;","MUT;","","MUT;AMP;","","","","","","","","","MUT;","","","","","","AMP;","","MUT;","","","MUT;","","HOMDEL;","","","","MUT;","","MUT;","MUT;","","MUT;","MUT;AMP;","","","MUT;","MUT;","","","","","","","","","MUT;","AMP;","","","MUT;","","","","","MUT;","","","MUT;","","","AMP;","MUT;AMP;","MUT;","","","","","","","MUT;","AMP;","","MUT;","","","MUT;","","","","","","MUT;","MUT;AMP;","MUT;","MUT;","MUT;AMP;","","","AMP;","","","","","","","","MUT;","","","","MUT;","MUT;","","","","MUT;","","","","MUT;","","","","","","","","","MUT;","","AMP;","MUT;AMP;","MUT;","MUT;","","AMP;","MUT;","","MUT;","","","","","","","","","","","","","","","MUT;","","","MUT;","MUT;","MUT;","","","MUT;","","",""
|
|
3
|
+
"HRAS","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","",""
|
|
4
|
+
"BRAF","","","","","","","","AMP;","","","","","","","","MUT;","","MUT;","MUT;","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","MUT;","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","MUT;","","MUT;","","AMP;","","","","","","","","","","","","","","MUT;","","AMP;","","","","","MUT;","","","MUT;","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;AMP;","","","","","","","","","","","","","","","","","","","","MUT;","",""
|
|
5
|
+
"RAF1","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
6
|
+
"MAP3K1","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
7
|
+
"MAP3K2","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","MUT;","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
8
|
+
"MAP3K3","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","",""
|
|
9
|
+
"MAP3K4","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","MUT;","","","","","","","","","MUT;","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","MUT;","","","","","MUT;","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","MUT;","","","","","",""
|
|
10
|
+
"MAP3K5","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","AMP;","MUT;","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","HOMDEL;","","","","","","","",""
|
|
11
|
+
"MAP2K1","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","MUT;","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
12
|
+
"MAP2K2","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
13
|
+
"MAP2K3","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","MUT;","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","MUT;","","","","","","MUT;","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","",""
|
|
14
|
+
"MAP2K4","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","",""
|
|
15
|
+
"MAP2K5","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
16
|
+
"MAPK1","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
17
|
+
"MAPK3","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
18
|
+
"MAPK4","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","HOMDEL;","","","","","","","","","","","MUT;","","","","","","MUT;","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
19
|
+
"MAPK6","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
20
|
+
"MAPK7","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","MUT;","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","MUT;","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
21
|
+
"MAPK8","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
22
|
+
"MAPK9","","","","","","","","","","","","","","","","","","","","AMP;","","","","","AMP;","","","","","","","","","","","","","","","HOMDEL;","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","MUT;","","","MUT;","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","AMP;","",""
|
|
23
|
+
"MAPK12","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","HOMDEL;","HOMDEL;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
24
|
+
"MAPK14","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","MUT;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
25
|
+
"DAB2","","","","","","","","","","","","","","AMP;","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","MUT;AMP;","","","","","MUT;AMP;","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","MUT;","AMP;","","","","","","MUT;","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AMP;","","","","","","","AMP;","","","","","","","","","","","","","","AMP;","AMP;","","","","","","MUT;AMP;","","","","","","AMP;","","","","","","","","","","AMP;","","","","","AMP;",""
|
|
26
|
+
"RASSF1","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""
|
|
27
|
+
"RAB25","","","","","","","","","","","","","","","AMP;","","","","","","","","","","","","","AMP;","","","","AMP;","","","","","","","","","","AMP;","AMP;","","","","","","AMP;","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","AMP;","","AMP;","MUT;AMP;","AMP;","AMP;","","","","","","","","","","","AMP;","","","","","AMP;","","","","","AMP;","","","","","","","","","","","AMP;","","AMP;","","","","AMP;","","AMP;","","","","","","","","AMP;","","AMP;","","","","","","AMP;","AMP;","","","AMP;","","","","","","","","","","","AMP;","","","","","","","","","","","","","","","","","","","","AMP;"
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"""Decoration functions matching R ComplexHeatmap::decorate_*."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, Callable
|
|
6
|
+
|
|
7
|
+
from .grid import current_device, seekViewport
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class _DecoratorContext:
|
|
11
|
+
"""Context manager, decorator, or eager runner for named viewport decoration."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, vp_name: str) -> None:
|
|
14
|
+
self.vp_name = vp_name
|
|
15
|
+
self._saved_stack: list[Any] | None = None
|
|
16
|
+
|
|
17
|
+
def __enter__(self) -> "_DecoratorContext":
|
|
18
|
+
dev = current_device(create=False)
|
|
19
|
+
self._saved_stack = list(dev.vp_stack)
|
|
20
|
+
seekViewport(self.vp_name)
|
|
21
|
+
return self
|
|
22
|
+
|
|
23
|
+
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
|
|
24
|
+
if self._saved_stack is not None:
|
|
25
|
+
dev = current_device(create=False)
|
|
26
|
+
dev.vp_stack = self._saved_stack
|
|
27
|
+
self._saved_stack = None
|
|
28
|
+
|
|
29
|
+
def __call__(self, fn: Callable[[], Any]) -> Callable[[], Any]:
|
|
30
|
+
with self:
|
|
31
|
+
fn()
|
|
32
|
+
return fn
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _run_or_context(vp_name: str, code: Callable[[], Any] | None) -> _DecoratorContext | None:
|
|
36
|
+
ctx = _DecoratorContext(vp_name)
|
|
37
|
+
if code is not None:
|
|
38
|
+
if not callable(code):
|
|
39
|
+
raise TypeError("`code` must be a callable function/lambda or None (for `with` / `@` usage).")
|
|
40
|
+
with ctx:
|
|
41
|
+
code()
|
|
42
|
+
return None
|
|
43
|
+
return ctx
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def decorate_heatmap_body(
|
|
47
|
+
heatmap: str,
|
|
48
|
+
code: Callable[[], Any] | None = None,
|
|
49
|
+
slice: int = 1,
|
|
50
|
+
row_slice: int | None = None,
|
|
51
|
+
column_slice: int = 1,
|
|
52
|
+
) -> _DecoratorContext | None:
|
|
53
|
+
"""Seek a heatmap body slice viewport `{heatmap}_heatmap_body_{row_slice}_{column_slice}`."""
|
|
54
|
+
rs = slice if row_slice is None else row_slice
|
|
55
|
+
vp_name = f"{heatmap}_heatmap_body_{rs}_{column_slice}"
|
|
56
|
+
return _run_or_context(vp_name, code)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def decorate_dend(
|
|
60
|
+
heatmap: str,
|
|
61
|
+
code: Callable[[], Any] | None = None,
|
|
62
|
+
slice: int = 1,
|
|
63
|
+
which: str = "column",
|
|
64
|
+
) -> _DecoratorContext | None:
|
|
65
|
+
"""Seek a dendrogram slice viewport `{heatmap}_dend_{which}_{slice}`."""
|
|
66
|
+
if which not in ("column", "row"):
|
|
67
|
+
raise ValueError("`which` must be 'column' or 'row'.")
|
|
68
|
+
vp_name = f"{heatmap}_dend_{which}_{slice}"
|
|
69
|
+
return _run_or_context(vp_name, code)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def decorate_column_dend(
|
|
73
|
+
heatmap: str,
|
|
74
|
+
code: Callable[[], Any] | None = None,
|
|
75
|
+
slice: int = 1,
|
|
76
|
+
) -> _DecoratorContext | None:
|
|
77
|
+
"""Seek a column dendrogram slice viewport."""
|
|
78
|
+
return decorate_dend(heatmap=heatmap, code=code, slice=slice, which="column")
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def decorate_row_dend(
|
|
82
|
+
heatmap: str,
|
|
83
|
+
code: Callable[[], Any] | None = None,
|
|
84
|
+
slice: int = 1,
|
|
85
|
+
) -> _DecoratorContext | None:
|
|
86
|
+
"""Seek a row dendrogram slice viewport."""
|
|
87
|
+
return decorate_dend(heatmap=heatmap, code=code, slice=slice, which="row")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def decorate_dimnames(
|
|
91
|
+
heatmap: str,
|
|
92
|
+
code: Callable[[], Any] | None = None,
|
|
93
|
+
slice: int = 1,
|
|
94
|
+
which: str = "column",
|
|
95
|
+
) -> _DecoratorContext | None:
|
|
96
|
+
"""Seek a dimension-names slice viewport `{heatmap}_{which}_names_{slice}`."""
|
|
97
|
+
if which not in ("column", "row"):
|
|
98
|
+
raise ValueError("`which` must be 'column' or 'row'.")
|
|
99
|
+
vp_name = f"{heatmap}_{which}_names_{slice}"
|
|
100
|
+
return _run_or_context(vp_name, code)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def decorate_row_names(
|
|
104
|
+
heatmap: str,
|
|
105
|
+
code: Callable[[], Any] | None = None,
|
|
106
|
+
slice: int = 1,
|
|
107
|
+
) -> _DecoratorContext | None:
|
|
108
|
+
"""Seek a row-names slice viewport."""
|
|
109
|
+
return decorate_dimnames(heatmap=heatmap, code=code, slice=slice, which="row")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def decorate_column_names(
|
|
113
|
+
heatmap: str,
|
|
114
|
+
code: Callable[[], Any] | None = None,
|
|
115
|
+
slice: int = 1,
|
|
116
|
+
) -> _DecoratorContext | None:
|
|
117
|
+
"""Seek a column-names slice viewport."""
|
|
118
|
+
return decorate_dimnames(heatmap=heatmap, code=code, slice=slice, which="column")
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def decorate_title(
|
|
122
|
+
heatmap: str,
|
|
123
|
+
code: Callable[[], Any] | None = None,
|
|
124
|
+
slice: int = 1,
|
|
125
|
+
which: str = "column",
|
|
126
|
+
) -> _DecoratorContext | None:
|
|
127
|
+
"""Seek a title slice viewport `{heatmap}_{which}_title_{slice}`."""
|
|
128
|
+
if which not in ("column", "row"):
|
|
129
|
+
raise ValueError("`which` must be 'column' or 'row'.")
|
|
130
|
+
vp_name = f"{heatmap}_{which}_title_{slice}"
|
|
131
|
+
return _run_or_context(vp_name, code)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def decorate_row_title(
|
|
135
|
+
heatmap: str,
|
|
136
|
+
code: Callable[[], Any] | None = None,
|
|
137
|
+
slice: int = 1,
|
|
138
|
+
) -> _DecoratorContext | None:
|
|
139
|
+
"""Seek a row-title slice viewport."""
|
|
140
|
+
return decorate_title(heatmap=heatmap, code=code, slice=slice, which="row")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def decorate_column_title(
|
|
144
|
+
heatmap: str,
|
|
145
|
+
code: Callable[[], Any] | None = None,
|
|
146
|
+
slice: int = 1,
|
|
147
|
+
) -> _DecoratorContext | None:
|
|
148
|
+
"""Seek a column-title slice viewport."""
|
|
149
|
+
return decorate_title(heatmap=heatmap, code=code, slice=slice, which="column")
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def decorate_annotation(
|
|
153
|
+
annotation: str,
|
|
154
|
+
code: Callable[[], Any] | None = None,
|
|
155
|
+
slice: int = 1,
|
|
156
|
+
) -> _DecoratorContext | None:
|
|
157
|
+
"""Seek an annotation slice viewport `annotation_{annotation}_{slice}`."""
|
|
158
|
+
vp_name = f"annotation_{annotation}_{slice}"
|
|
159
|
+
return _run_or_context(vp_name, code)
|