Skip to content

add a notebook for comparing cbmr and cbma on neurosynth - #835

Open
yifan0330 wants to merge 12 commits into
neurostuff:mainfrom
yifan0330:add_neurosynth_notebook
Open

add a notebook for comparing cbmr and cbma on neurosynth#835
yifan0330 wants to merge 12 commits into
neurostuff:mainfrom
yifan0330:add_neurosynth_notebook

Conversation

@yifan0330

Copy link
Copy Markdown
Contributor

Closes # .

Changes proposed in this pull request:

  • Compare spatial convergence between pain studies and non-pain studies (in Neurosynth dataset) via CBMR and MKDA Chi-square analysis

@jdkent jdkent changed the title add a notebook for comparing cbmr and cbma on neuroth add a notebook for comparing cbmr and cbma on neurosynth Sep 15, 2023
@codecov

codecov Bot commented Sep 15, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.07%. Comparing base (d0b4c0f) to head (63e6e4c).
⚠️ Report is 124 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##           main     #835       +/-   ##
=========================================
+ Coverage      0   89.07%   +89.07%     
=========================================
  Files         0       48       +48     
  Lines         0     6113     +6113     
=========================================
+ Hits          0     5445     +5445     
- Misses        0      668      +668     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdkent jdkent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some spelling errors to fix for now!

# of spatial intensity between pain studies and non-pain studies in Neurosynth.
# The null hypothesis assumes spatial intensity estimations of two groups are equal
# at voxel level, $H_0: \mu_{1j}=\mu_{2j}, j=1,\cdots,N$, where $N$ is number of
# voxels within brain mask, $j$ is the index of voxel. Areas with significant p-vaules

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# voxels within brain mask, $j$ is the index of voxel. Areas with significant p-vaules
# voxels within brain mask, $j$ is the index of voxel. Areas with significant p-values

# The null hypothesis assumes spatial intensity estimations of two groups are equal
# at voxel level, $H_0: \mu_{1j}=\mu_{2j}, j=1,\cdots,N$, where $N$ is number of
# voxels within brain mask, $j$ is the index of voxel. Areas with significant p-vaules
# (siginificant difference in spatial intensity estimation between two groups) are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# (siginificant difference in spatial intensity estimation between two groups) are
# (significant difference in spatial intensity estimation between two groups) are

# voxels within brain mask, $j$ is the index of voxel. Areas with significant p-vaules
# (siginificant difference in spatial intensity estimation between two groups) are
# highlighted. We found that estimated activation level are significantly different
# in ... between pain group and non-pain group.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# in ... between pain group and non-pain group.
# in ... between the pain group and non-pain group.

# Run MKDA on Neurosynth dataset
# -----------------------------------------------------------------------------
# For the purpose of justifying the validity of CBMR framework, we compare the estimated
# spatial covergence of activation regions between pain studies and non-pain fMRI studies

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# spatial covergence of activation regions between pain studies and non-pain fMRI studies
# spatial convergence of activation regions between pain studies and non-pain fMRI studies

)

###############################################################################
# This figure (displayed as z-statistics map) shows MKDA spatial covergence of

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# This figure (displayed as z-statistics map) shows MKDA spatial covergence of
# This figure (displayed as a z-statistic map) shows MKDA spatial convergence of

coordinate-based meta-analysis (CBMA) in NiMARE

CBMR is a generative framework to approximate smooth activation intensity function and investigate
the effect of study-level moderators (e.g., year of pubilication, sample size, subtype of stimuli).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the effect of study-level moderators (e.g., year of pubilication, sample size, subtype of stimuli).
the effect of study-level moderators (e.g., year of publication, sample size, subtype of stimuli).

This tutorial is intended to provide an intuitive comparison of CBMA and MKDA results on
neurosynth dataset.

For more detailed introduction to CBMR implementation in NiMARE, see the `CBMR tutoral

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For more detailed introduction to CBMR implementation in NiMARE, see the `CBMR tutoral
For more detailed introduction to CBMR implementation in NiMARE, see the `CBMR tutorial


For more detailed introduction to CBMR implementation in NiMARE, see the `CBMR tutoral
<https://nimare.readthedocs.io/en/latest/auto_examples/02_meta-analyses/11_plot_cbmr.html>`_ and
`documatation <https://nimare.readthedocs.io/en/latest/generated/nimare.meta.cbmr.html>`_.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`documatation <https://nimare.readthedocs.io/en/latest/generated/nimare.meta.cbmr.html>`_.
`documentation <https://nimare.readthedocs.io/en/latest/generated/nimare.meta.cbmr.html>`_.

###############################################################################
# Download the Neurosynth Dataset
# -----------------------------------------------------------------------------
# Neurosynth is a large-scale functional magnetic resonance imaing (fMRI) database.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Neurosynth is a large-scale functional magnetic resonance imaing (fMRI) database.
# Neurosynth is a large-scale functional magnetic resonance imaging (fMRI) database.

@yifan0330

Copy link
Copy Markdown
Contributor Author

just some spelling errors to fix for now!

Sorry for the spelling errors! I've fixed them now

Comment on lines +61 to +62
neurosynth_dset = download_abstracts(neurosynth_dset, "example@example.edu")
neurosynth_dset.save(os.path.join(out_dir, "neurosynth_dataset_with_abstracts.pkl.gz"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this bit can be removed, we are not using abstracts for this notebook

@jdkent jdkent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for changing my mind about this, could you add a .ipynb notebook to misc-notebooks with the cells executed? Since this notebook is a bit intensive it would be nice to have a version of this where the code is already run and visible.

@jdkent jdkent added this to Planning Dec 19, 2025
@jdkent jdkent moved this to In review in Planning Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants