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

display p-values overlay #38

Open
knutj opened this issue Apr 7, 2022 · 1 comment
Open

display p-values overlay #38

knutj opened this issue Apr 7, 2022 · 1 comment
Assignees
Labels
question Usage question.

Comments

@knutj
Copy link

knutj commented Apr 7, 2022

Describe the feature you are missing
A clear and concise description of the feature. Should include information on the expected inputs and output.

FSbrain should be able to load p-value or other MGH with surface data and display it. FDR correction would also be helpfule.

Use Cases

  • Your use case for the feature.
  • Why do you think that this feature is of general interest, e.g., not only relevant to you.

Automatic p-values maps is very useful when publishing neuroimaging from Fressurfer data.

@dfsp-spirit
Copy link
Owner

You can already do that, an example that loads an overlay from MGH/MGZ files and displays it with a suitable colorbar in fsbrain can be found in this live notebook, at the very bottom, section Results: vertex-based.

Here is some example code, copied from that notebook:

subjects_dir = file.path(find.freesurferhome()$found_at, 'subjects');
subject_id = 'fsaverage';

lh_demo_cluster_file = system.file("extdata", "lh.clusters_fsaverage.mgz", package = "fsbrain", mustWork = TRUE);
rh_demo_cluster_file = system.file("extdata", "rh.clusters_fsaverage.mgz", package = "fsbrain", mustWork = TRUE);

lh_clust = freesurferformats::read.fs.morph(lh_demo_cluster_file);   # contains a single positive cluster (activation, group difference), the other values are 0
rh_clust = freesurferformats::read.fs.morph(rh_demo_cluster_file);   # contains two negative clusters

vis.symmetric.data.on.subject(subjects_dir, subject_id, lh_clust, rh_clust, bg="curv_light");

If you need correction for multiple comparisons (FDR or something else), stats::p.adjust() should do that for you.

Please let me know whether that helps, or what problems you are facing.

@dfsp-spirit dfsp-spirit self-assigned this Jul 1, 2022
@dfsp-spirit dfsp-spirit added the question Usage question. label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usage question.
Projects
None yet
Development

No branches or pull requests

2 participants