How to use the nimare.meta.cbma.ALE function in NiMARE

To help you get started, we’ve selected a few NiMARE examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neurostuff / NiMARE / nimare / workflows / ale.py View on Github external
33(1), 113.
- Fonov, V., Evans, A. C., Botteron, K., Almli, C. R., McKinstry, R. C.,
Collins, D. L., & Brain Development Cooperative Group. (2011).
Unbiased average age-appropriate atlases for pediatric studies.
Neuroimage, 54(1), 313-327.
- Fonov, V. S., Evans, A. C., McKinstry, R. C., Almli, C. R., & Collins, D. L.
(2009). Unbiased nonlinear average age-appropriate brain templates from birth
to adulthood. NeuroImage, (47), S102.
- Laird, A. R., Fox, P. M., Price, C. J., Glahn, D. C., Uecker, A. M.,
Lancaster, J. L., ... & Fox, P. T. (2005). ALE meta‐analysis: Controlling the
false discovery rate and performing statistical contrasts. Human brain mapping,
25(1), 155-164.
        """

        ale1 = ALE(kernel__fwhm=fwhm)
        ale2 = ALE(kernel__fwhm=fwhm)

        LGR.info('Performing meta-analysis...')
        res1 = ale1.fit(dset1)
        res2 = ale2.fit(dset2)
        corr = FWECorrector(method='permutation', n_iters=n_iters,
                            voxel_thresh=v_thr, n_cores=n_cores)
        cres1 = corr.transform(res1)
        cres2 = corr.transform(res2)
        sub = ALESubtraction(n_iters=n_iters)
        sres = sub.fit(
            ale1, ale2,
            image1=cres1.get_map('logp_level-cluster_corr-FWE_method-permutation', return_type='image'),
            image2=cres2.get_map('logp_level-cluster_corr-FWE_method-permutation', return_type='image'))

        boilerplate = boilerplate.format(
            n_exps1=len(dset1.ids),
github neurostuff / NiMARE / nimare / workflows / ale.py View on Github external
Collins, D. L., & Brain Development Cooperative Group. (2011).
Unbiased average age-appropriate atlases for pediatric studies.
Neuroimage, 54(1), 313-327.
- Fonov, V. S., Evans, A. C., McKinstry, R. C., Almli, C. R., & Collins, D. L.
(2009). Unbiased nonlinear average age-appropriate brain templates from birth
to adulthood. NeuroImage, (47), S102.
- Turkeltaub, P. E., Eden, G. F., Jones, K. M., & Zeffiro, T. A. (2002).
Meta-analysis of the functional neuroanatomy of single-word reading: method
and validation. NeuroImage, 16(3 Pt 1), 765780.
- Turkeltaub, P. E., Eickhoff, S. B., Laird, A. R., Fox, M., Wiener, M.,
& Fox, P. (2012). Minimizing within-experiment and within-group effects in
Activation Likelihood Estimation meta-analyses. Human Brain Mapping,
33(1), 113.
        """

        ale = ALE(kernel__fwhm=fwhm)

        LGR.info('Performing meta-analysis...')
        results = ale.fit(dset)
        corr = FWECorrector(method='permutation', n_iters=n_iters,
                            voxel_thresh=v_thr, n_cores=n_cores)
        cres = corr.transform(results)

        boilerplate = boilerplate.format(
            n_exps=len(dset.ids),
            n_subs=n_subs,
            n_foci=dset.coordinates.shape[0],
            unc=v_thr,
            n_iters=n_iters,
            fwhm_str=fwhm_str)
    else:
        dset1 = convert_sleuth_to_dataset(sleuth_file, target='ale_2mm')
github neurostuff / NiMARE / nimare / workflows / macm.py View on Github external
mode network using coordinate-based meta-analytic modeling. The Journal of
Neuroscience: The Official Journal of the Society for Neuroscience, 29(46),
1449614505.
- Robinson, J. L., Laird, A. R., Glahn, D. C., Lovallo, W. R., & Fox, P. T.
(2009). Metaanalytic connectivity modeling: Delineating the functional
connectivity of the human amygdala. Human Brain Mapping, 31(2), 173-184.
- Turkeltaub, P. E., Eden, G. F., Jones, K. M., & Zeffiro, T. A. (2002).
Meta-analysis of the functional neuroanatomy of single-word reading: method
and validation. NeuroImage, 16(3 Pt 1), 765780.
- Turkeltaub, P. E., Eickhoff, S. B., Laird, A. R., Fox, M., Wiener, M.,
& Fox, P. (2012). Minimizing within-experiment and within-group effects in
Activation Likelihood Estimation meta-analyses. Human Brain Mapping,
33(1), 113.
    """

    ale = ALE(dset)

    LGR.info('Performing meta-analysis...')
    ale.fit(n_iters=n_iters, ids=sel_ids, voxel_thresh=v_thr, corr='FWE',
            n_cores=n_cores)

    boilerplate = boilerplate.format(
        n_exps_db=len(dset.ids),
        n_subs_db=n_subs_db,
        n_foci_db=dset.coordinates.shape[0],
        n_exps_sel=len(sel_ids),
        n_subs_sel=n_subs_sel,
        n_foci_sel=sel_coords.shape[0],
        unc=v_thr,
        n_iters=n_iters)

    if output_dir is None:
github neurostuff / NiMARE / examples / 02_meta-analyses / run_cbmas.py View on Github external
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')

###############################################################################
# SCALE
# --------------------------------------------------
ijk = np.vstack(np.where(mask_img.get_data())).T
scale = nimare.meta.cbma.SCALE(ijk=ijk, n_iters=10, n_cores=1)
scale.fit(dset)
plot_stat_map(scale.results.get_map('z_vthresh'), cut_coords=[0, 0, -8],
              draw_cross=False, cmap='RdBu_r')
github neurostuff / NiMARE / nimare / workflows / ale.py View on Github external
Activation Likelihood Estimation meta-analyses. Human Brain Mapping,
33(1), 113.
- Fonov, V., Evans, A. C., Botteron, K., Almli, C. R., McKinstry, R. C.,
Collins, D. L., & Brain Development Cooperative Group. (2011).
Unbiased average age-appropriate atlases for pediatric studies.
Neuroimage, 54(1), 313-327.
- Fonov, V. S., Evans, A. C., McKinstry, R. C., Almli, C. R., & Collins, D. L.
(2009). Unbiased nonlinear average age-appropriate brain templates from birth
to adulthood. NeuroImage, (47), S102.
- Laird, A. R., Fox, P. M., Price, C. J., Glahn, D. C., Uecker, A. M.,
Lancaster, J. L., ... & Fox, P. T. (2005). ALE meta‐analysis: Controlling the
false discovery rate and performing statistical contrasts. Human brain mapping,
25(1), 155-164.
        """

        ale1 = ALE(kernel__fwhm=fwhm)
        ale2 = ALE(kernel__fwhm=fwhm)

        LGR.info('Performing meta-analysis...')
        res1 = ale1.fit(dset1)
        res2 = ale2.fit(dset2)
        corr = FWECorrector(method='permutation', n_iters=n_iters,
                            voxel_thresh=v_thr, n_cores=n_cores)
        cres1 = corr.transform(res1)
        cres2 = corr.transform(res2)
        sub = ALESubtraction(n_iters=n_iters)
        sres = sub.fit(
            ale1, ale2,
            image1=cres1.get_map('logp_level-cluster_corr-FWE_method-permutation', return_type='image'),
            image2=cres2.get_map('logp_level-cluster_corr-FWE_method-permutation', return_type='image'))

        boilerplate = boilerplate.format(