9
9
"source" : [
10
10
" # Neurosynth Compose Notebook\n " ,
11
11
" \n " ,
12
- " After you've built your meta-analysis on [neurosynth compose](compose.neurosynth.org), you can use this notebook to execute and view the meta-analytic results."
12
+ " After you've built your meta-analysis on [neurosynth compose](https:// compose.neurosynth.org), you can use this notebook to execute and view the meta-analytic results."
13
13
]
14
14
},
15
15
{
45
45
"execution_count" : null ,
46
46
"id" : " 178c5406-2625-4048-af3c-c01bdb5e1b56" ,
47
47
"metadata" : {
48
- "colab" : {
49
- "base_uri" : " https://localhost:8080/"
50
- },
51
- "id" : " 178c5406-2625-4048-af3c-c01bdb5e1b56" ,
52
- "outputId" : " ed849b76-32ee-40a4-8279-b5d9a998da44"
53
- },
54
- "outputs" : [
55
- {
56
- "name" : " stdout" ,
57
- "output_type" : " stream" ,
58
- "text" : [
59
- " Paste the 12 character ID of the meta-analysis here: 6YA5FqTPNJEq\n "
60
- ]
61
- }
62
- ],
48
+ "id" : " 178c5406-2625-4048-af3c-c01bdb5e1b56"
49
+ },
50
+ "outputs" : [],
63
51
"source" : [
64
52
" #@title Set your Neurosynth-Compose Meta-Analysis ID { run: \" auto\" }\n " ,
65
53
" META_ID = input(\" Paste the 12 character ID of the meta-analysis here: \" ) # for example: \" 8dJ6tG7wfbyS\"\n " ,
88
76
},
89
77
"outputs" : [],
90
78
"source" : [
91
- " from nimare.workflows import compose_workflow # special workflow to run meta-analysis"
79
+ " from pynsc.run import run # special workflow to run meta-analysis"
92
80
]
93
81
},
94
82
{
101
89
"outputs" : [],
102
90
"source" : [
103
91
" if META_ID is not None:\n " ,
104
- " meta_result = compose_workflow (META_ID)\n " ,
92
+ " _, meta_result = run (META_ID)\n " ,
105
93
" else:\n " ,
106
94
" print(\" UPDATE META_ID VARIABLE TO YOUR META-ANALYSIS\" )"
107
95
]
154
142
},
155
143
"outputs" : [],
156
144
"source" : [
157
- " STAT_NAME = \" z\"\n " ,
145
+ " STAT_NAME = \" z\" # you will typically only want to look at corrected output \n " ,
158
146
" stat_map = meta_result.get_map(STAT_NAME)"
159
147
]
160
148
},
171
159
]
172
160
},
173
161
{
174
- "cell_type" : " markdown" ,
175
- "id" : " b43d40b3-9c1d-490c-a3a2-173e04755932" ,
162
+ "cell_type" : " code" ,
163
+ "source" : [
164
+ " # here are your for tables\n " ,
165
+ " print(\"\\ n\" .join(list(meta_result.tables.keys())))"
166
+ ],
176
167
"metadata" : {
177
- "id" : " b43d40b3-9c1d-490c-a3a2-173e04755932 "
168
+ "id" : " sFqMmeQ-xNvM "
178
169
},
179
- "source" : [
180
- " ## Investigate what studies contributed to which clusters\n " ,
181
- " \n " ,
182
- " Dive into your results to discover which analyses are driving your results."
183
- ]
170
+ "id" : " sFqMmeQ-xNvM" ,
171
+ "execution_count" : null ,
172
+ "outputs" : []
184
173
},
185
174
{
186
175
"cell_type" : " code" ,
187
- "execution_count" : null ,
188
- "id" : " 5732cece-ec55-44cb-996c-e56a26ba1639" ,
176
+ "source" : [
177
+ " # get a cluster table\n " ,
178
+ " cluster_key = next(t for t in meta_result.tables.keys() if \" clust\" in t)\n " ,
179
+ " meta_result.tables[cluster_key]"
180
+ ],
189
181
"metadata" : {
190
- "id" : " 5732cece-ec55-44cb-996c-e56a26ba1639 "
182
+ "id" : " qgm3KfxqyD34 "
191
183
},
192
- "outputs" : [],
193
- "source" : [
194
- " from nimare.diagnostics import FocusCounter # Only works for coordinate-based meta-analyses\n " ,
195
- " fc = FocusCounter(target_image=STAT_NAME)"
196
- ]
184
+ "id" : " qgm3KfxqyD34" ,
185
+ "execution_count" : null ,
186
+ "outputs" : []
197
187
},
198
188
{
199
- "cell_type" : " code" ,
200
- "execution_count" : null ,
201
- "id" : " 2908b852-a2c4-4f8e-92ce-436ab79ce5f9" ,
189
+ "cell_type" : " markdown" ,
190
+ "id" : " b43d40b3-9c1d-490c-a3a2-173e04755932" ,
202
191
"metadata" : {
203
- "id" : " 2908b852-a2c4-4f8e-92ce-436ab79ce5f9 "
192
+ "id" : " b43d40b3-9c1d-490c-a3a2-173e04755932 "
204
193
},
205
- "outputs" : [],
206
194
"source" : [
207
- " contribution_table, cluster_img = fc.transform(meta_result)"
195
+ " ## Investigate what studies contributed to which clusters\n " ,
196
+ " \n " ,
197
+ " Dive into your results to discover which analyses are driving your results."
208
198
]
209
199
},
210
200
{
211
201
"cell_type" : " code" ,
212
202
"execution_count" : null ,
213
- "id" : " eaa9b534-d3ac-4b02-bc90-2aa60fec62c1 " ,
203
+ "id" : " 5732cece-ec55-44cb-996c-e56a26ba1639 " ,
214
204
"metadata" : {
215
- "id" : " eaa9b534-d3ac-4b02-bc90-2aa60fec62c1 "
205
+ "id" : " 5732cece-ec55-44cb-996c-e56a26ba1639 "
216
206
},
217
207
"outputs" : [],
218
208
"source" : [
219
- " contribution_table"
209
+ " # Only works for coordinate-based meta-analyses\n " ,
210
+ " diagnostic_key = next(t for t in meta_result.tables.keys() if \" clust\" not in t)\n " ,
211
+ " meta_result.tables[diagnostic_key]"
220
212
]
221
213
}
222
214
],
244
236
},
245
237
"nbformat" : 4 ,
246
238
"nbformat_minor" : 5
247
- }
239
+ }
0 commit comments