Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

yifan0330
Copy link
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
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d0b4c0f) 0.00% compared to head (63e6e4c) 89.07%.

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     

see 48 files with indirect coverage changes

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

Copy link
Member

@jdkent jdkent left a comment

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
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
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
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
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
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
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
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
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
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
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, "[email protected]")
neurosynth_dset.save(os.path.join(out_dir, "neurosynth_dataset_with_abstracts.pkl.gz"))
Copy link
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

Copy link
Member

@jdkent jdkent left a comment

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.

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