Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
plot_stat_map(cres.get_map('consistency_z_FDR_corr-FDR_method-fdr_bh'),
threshold=1.65, cut_coords=[0, 0, -8], draw_cross=False,
cmap='RdBu_r')
###############################################################################
# MKDA Chi2 with FWE correction
# --------------------------------------------------
corr = nimare.correct.FWECorrector(method='permutation', n_iters=10, n_cores=1)
cres = corr.transform(mkda.results)
plot_stat_map(cres.get_map('consistency_z'), threshold=1.65,
cut_coords=[0, 0, -8], draw_cross=False, cmap='RdBu_r')
###############################################################################
# KDA
# --------------------------------------------------
kda = nimare.meta.cbma.KDA(kernel__r=10)
kda.fit(dset)
corr = nimare.correct.FWECorrector(method='permutation', n_iters=10, n_cores=1)
cres = corr.transform(kda.results)
plot_stat_map(cres.get_map('logp_level-voxel_corr-FWE_method-permutation'),
cut_coords=[0, 0, -8], draw_cross=False, cmap='RdBu_r')
###############################################################################
# ALE
# --------------------------------------------------
ale = nimare.meta.cbma.ALE()
ale.fit(dset)
corr = nimare.correct.FWECorrector(method='permutation', n_iters=10, n_cores=1)
cres = corr.transform(ale.results)
plot_stat_map(cres.get_map('logp_level-cluster_corr-FWE_method-permutation'),
cut_coords=[0, 0, -8], draw_cross=False, cmap='RdBu_r')
###############################################################################
# Load Dataset
# --------------------------------------------------
dset_file = os.path.join(get_test_data_path(), 'nidm_pain_dset.json')
dset = nimare.dataset.Dataset(dset_file)
###############################################################################
# MKDA kernel maps
# --------------------------------------------------
kernel = nimare.meta.cbma.MKDAKernel(r=8)
mkda_r08 = kernel.transform(dset)
kernel = nimare.meta.cbma.MKDAKernel(r=9)
mkda_r09 = kernel.transform(dset)
kernel = nimare.meta.cbma.MKDAKernel(r=10)
mkda_r10 = kernel.transform(dset)
kernel = nimare.meta.cbma.MKDAKernel(r=11)
mkda_r11 = kernel.transform(dset)
fig, axes = plt.subplots(nrows=4, ncols=1, figsize=(10, 17.5))
plot_stat_map(mkda_r08[2], cut_coords=[-2, -10, -4],
title='r=8mm', vmax=2, axes=axes[0],
draw_cross=False)
plot_stat_map(mkda_r09[2], cut_coords=[-2, -10, -4],
title='r=9mm', vmax=2, axes=axes[1],
draw_cross=False)
plot_stat_map(mkda_r10[2], cut_coords=[-2, -10, -4],
title='r=10mm', vmax=2, axes=axes[2],
draw_cross=False)
plot_stat_map(mkda_r11[2], cut_coords=[-2, -10, -4],
title='r=11mm', vmax=2, axes=axes[3],
draw_cross=False)
fig.show()