|
15 | 15 | "cell_type": "markdown", |
16 | 16 | "metadata": {}, |
17 | 17 | "source": [ |
18 | | - "# STable 1: Cross ancestry meta analysis statistics" |
| 18 | + "# Legend" |
19 | 19 | ] |
20 | 20 | }, |
21 | 21 | { |
|
24 | 24 | "metadata": {}, |
25 | 25 | "outputs": [], |
26 | 26 | "source": [ |
27 | | - "meta_file = \"../data/meta/tables/all_ancestry.xlsx\"\n", |
| 27 | + "import pandas as pd\n", |
| 28 | + "\n", |
| 29 | + "# Define the data\n", |
| 30 | + "data = {\n", |
| 31 | + " \"Name\": [\n", |
| 32 | + " \"Supplementary Table 1\", \"Supplementary Table 2\", \"Supplementary Table 3\",\n", |
| 33 | + " \"Supplementary Table 4\", \"Supplementary Table 5\", \"Supplementary Table 6\",\n", |
| 34 | + " \"Supplementary Table 7\", \"Supplementary Table 8\", \"Supplementary Table 9\",\n", |
| 35 | + " \"Supplementary Table 10\", \"Supplementary Table 11\", \"Supplementary Table 12\",\n", |
| 36 | + " \"Supplementary Table 13\", \"Supplementary Table 14\", \"Supplementary Table 15\",\n", |
| 37 | + " \"Supplementary Table 16\", \"Supplementary Table 17\", \"Supplementary Table 18\",\n", |
| 38 | + " \"Supplementary Table 19\"\n", |
| 39 | + " ],\n", |
| 40 | + " \"Description\": [\n", |
| 41 | + " \"Cross ancestry meta analysis statistics (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 42 | + " \"Cross ancestry meta analysis statistics using METAL (two-sided Wald Z-tests from fixed-effects meta-analysis implemented in METAL).\",\n", |
| 43 | + " \"Cross ancestry meta analysis conditioned on common variants (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 44 | + " \"Leave one variant out stats for five study-identified associations (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 45 | + " \"Cochran's Q statistics for ancestral heterogeneity (Cochran’s Q test).\",\n", |
| 46 | + " \"Ancestral heterogeneity ANCOVA statistics for APBA1 gene (ANCOVA, two-sided F statistic).\",\n", |
| 47 | + " \"Ancestral heterogeneity ANCOVA statistics for GRM7 gene (ANCOVA, two-sided F statistic).\",\n", |
| 48 | + " \"Cross ancestry meta analysis conditioned on medications (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 49 | + " \"Obesity category enrichment statistics for 13 genes (two-sided Fisher’s exact test).\",\n", |
| 50 | + " \"Obesity associated comorbidity statistics for 13 genes (two-sided Fisher’s exact test).\",\n", |
| 51 | + " \"Structural equation modelling statistics for four genes (SEM, two-sided Wald Z-tests for path coefficients).\",\n", |
| 52 | + " \"Singificant PheWAS results for five previously unrepoted genes (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 53 | + " \"Interaction statistics between rare variants and PGS in BMI-associated genes (two-sided Wald Z-tests from inverse-variance–weighted fixed-effects meta-analysis).\",\n", |
| 54 | + " \"BMI distribution statistics in Europeans stratified by PGS quintiles (descriptive statistics with two-sided t-tests for group comparisons).\",\n", |
| 55 | + " \"Plasma protein model coefficients of BMI-associated gene carrier status (linear regression with two-sided t-tests statistics).\",\n", |
| 56 | + " \"Plasma protein model coefficients for BMI (linear regression with two-sided t-tests statistics).\",\n", |
| 57 | + " \"Cross ancestry meta analysis statistics of known obesity genes (two-sided Wald Z-tests from fixed-effects meta-analysis).\",\n", |
| 58 | + " \"Cross ancestry meta analysis statistics of known sex-specific obesity genes (two-sided Wald Z-tests from fixed-effects meta-analysis, stratified by sex).\",\n", |
| 59 | + " \"Comorbidity selected (list of ICD-10 codes for each comorbidity along with reference for the codes aggregated for each trait).\"\n", |
| 60 | + " ],\n", |
| 61 | + " \"Manuscript heading\": [\n", |
| 62 | + " \"Result 1\", \"Result 1\", \"Result 1\", \"Result 1\", \"Result 1\", \"Result 1\", \"Result 1\", \"Result 1\",\n", |
| 63 | + " \"Result 2\", \"Result 2\", \"Result 2\", \"Result 2\", \"Result 3\", \"Result 3\",\n", |
| 64 | + " \"Result 4\", \"Result 4\", \"Result 5\", \"Result 5\", \"Methods\",\n", |
| 65 | + "\n", |
| 66 | + " ]\n", |
| 67 | + "}\n", |
| 68 | + "\n", |
| 69 | + "# Create the DataFrame\n", |
| 70 | + "df = pd.DataFrame(data)\n", |
| 71 | + "\n" |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + "cell_type": "markdown", |
| 76 | + "metadata": {}, |
| 77 | + "source": [ |
| 78 | + "# STable 1: Cross ancestry meta analysis statistics" |
| 79 | + ] |
| 80 | + }, |
| 81 | + { |
| 82 | + "cell_type": "code", |
| 83 | + "execution_count": 3, |
| 84 | + "metadata": {}, |
| 85 | + "outputs": [], |
| 86 | + "source": [ |
| 87 | + "meta_file = \"../data/meta/tables/all_ancestry_with_nvariants.xlsx\"\n", |
28 | 88 | "meta_df = pd.read_excel(meta_file, index_col=[0,1], header=[0,1,2])" |
29 | 89 | ] |
30 | 90 | }, |
|
37 | 97 | }, |
38 | 98 | { |
39 | 99 | "cell_type": "code", |
40 | | - "execution_count": 3, |
| 100 | + "execution_count": 4, |
41 | 101 | "metadata": {}, |
42 | 102 | "outputs": [], |
43 | 103 | "source": [ |
|
54 | 114 | }, |
55 | 115 | { |
56 | 116 | "cell_type": "code", |
57 | | - "execution_count": 4, |
| 117 | + "execution_count": 5, |
58 | 118 | "metadata": {}, |
59 | 119 | "outputs": [], |
60 | 120 | "source": [ |
|
71 | 131 | }, |
72 | 132 | { |
73 | 133 | "cell_type": "code", |
74 | | - "execution_count": 5, |
| 134 | + "execution_count": 6, |
75 | 135 | "metadata": {}, |
76 | 136 | "outputs": [], |
77 | 137 | "source": [ |
|
88 | 148 | }, |
89 | 149 | { |
90 | 150 | "cell_type": "code", |
91 | | - "execution_count": 6, |
| 151 | + "execution_count": 7, |
92 | 152 | "metadata": {}, |
93 | 153 | "outputs": [], |
94 | 154 | "source": [ |
|
105 | 165 | }, |
106 | 166 | { |
107 | 167 | "cell_type": "code", |
108 | | - "execution_count": 7, |
| 168 | + "execution_count": 8, |
109 | 169 | "metadata": {}, |
110 | 170 | "outputs": [], |
111 | 171 | "source": [ |
|
122 | 182 | }, |
123 | 183 | { |
124 | 184 | "cell_type": "code", |
125 | | - "execution_count": 8, |
| 185 | + "execution_count": 9, |
126 | 186 | "metadata": {}, |
127 | 187 | "outputs": [], |
128 | 188 | "source": [ |
|
139 | 199 | }, |
140 | 200 | { |
141 | 201 | "cell_type": "code", |
142 | | - "execution_count": 9, |
| 202 | + "execution_count": 10, |
143 | 203 | "metadata": {}, |
144 | 204 | "outputs": [], |
145 | 205 | "source": [ |
|
156 | 216 | }, |
157 | 217 | { |
158 | 218 | "cell_type": "code", |
159 | | - "execution_count": 10, |
| 219 | + "execution_count": 11, |
160 | 220 | "metadata": {}, |
161 | 221 | "outputs": [], |
162 | 222 | "source": [ |
|
173 | 233 | }, |
174 | 234 | { |
175 | 235 | "cell_type": "code", |
176 | | - "execution_count": 11, |
| 236 | + "execution_count": 12, |
177 | 237 | "metadata": {}, |
178 | 238 | "outputs": [], |
179 | 239 | "source": [ |
|
192 | 252 | }, |
193 | 253 | { |
194 | 254 | "cell_type": "code", |
195 | | - "execution_count": 12, |
| 255 | + "execution_count": 13, |
196 | 256 | "metadata": {}, |
197 | 257 | "outputs": [], |
198 | 258 | "source": [ |
|
209 | 269 | }, |
210 | 270 | { |
211 | 271 | "cell_type": "code", |
212 | | - "execution_count": 13, |
| 272 | + "execution_count": 14, |
213 | 273 | "metadata": {}, |
214 | 274 | "outputs": [], |
215 | 275 | "source": [ |
|
226 | 286 | }, |
227 | 287 | { |
228 | 288 | "cell_type": "code", |
229 | | - "execution_count": 14, |
| 289 | + "execution_count": 15, |
230 | 290 | "metadata": {}, |
231 | 291 | "outputs": [], |
232 | 292 | "source": [ |
|
243 | 303 | }, |
244 | 304 | { |
245 | 305 | "cell_type": "code", |
246 | | - "execution_count": 15, |
| 306 | + "execution_count": 16, |
247 | 307 | "metadata": {}, |
248 | 308 | "outputs": [], |
249 | 309 | "source": [ |
|
260 | 320 | }, |
261 | 321 | { |
262 | 322 | "cell_type": "code", |
263 | | - "execution_count": 16, |
| 323 | + "execution_count": 17, |
264 | 324 | "metadata": {}, |
265 | 325 | "outputs": [], |
266 | 326 | "source": [ |
|
277 | 337 | }, |
278 | 338 | { |
279 | 339 | "cell_type": "code", |
280 | | - "execution_count": 17, |
| 340 | + "execution_count": 18, |
281 | 341 | "metadata": {}, |
282 | 342 | "outputs": [], |
283 | 343 | "source": [ |
|
313 | 373 | }, |
314 | 374 | { |
315 | 375 | "cell_type": "code", |
316 | | - "execution_count": 18, |
| 376 | + "execution_count": 19, |
317 | 377 | "metadata": {}, |
318 | 378 | "outputs": [], |
319 | 379 | "source": [ |
|
329 | 389 | }, |
330 | 390 | { |
331 | 391 | "cell_type": "code", |
332 | | - "execution_count": 19, |
| 392 | + "execution_count": 20, |
333 | 393 | "metadata": {}, |
334 | 394 | "outputs": [], |
335 | 395 | "source": [ |
|
345 | 405 | }, |
346 | 406 | { |
347 | 407 | "cell_type": "code", |
348 | | - "execution_count": 20, |
| 408 | + "execution_count": 21, |
349 | 409 | "metadata": {}, |
350 | 410 | "outputs": [], |
351 | 411 | "source": [ |
352 | | - "with pd.ExcelWriter('../manuscript/drafts_review1/Supplementary.xlsx', engine='xlsxwriter', mode=\"w\") as writer:\n", |
| 412 | + "with pd.ExcelWriter('../manuscript/drafts_review3/Supplementary.xlsx', engine='xlsxwriter', mode=\"w\") as writer:\n", |
353 | 413 | " for i, df in enumerate(supp_dfs):\n", |
354 | 414 | " df.to_excel(writer, sheet_name=f\"Supplementary Table {i+1}\", index=True)\n" |
355 | 415 | ] |
|
0 commit comments