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

Use of spatial null models on non whole-brain maps per hemisphere #79

Open
PeerHerholz opened this issue Oct 28, 2022 · 3 comments
Open

Comments

@PeerHerholz
Copy link

Ahoi hoi everyone,

thank you very much for your hard and dedicated work on this fantastic resource.

I'm currently using neuromaps to compare some of the provided maps to maps obtained within my analyses
and would like to ask a question regarding the null models (Sorry, I wasn't sure if y'all are answering questions through
neurostars.org. Thus, I'm very sorry if this is the wrong place to ask questions.).

My plan was to compare maps within a mask (parts of the temporal lobe) for each hemisphere separately using the burt2020 approach. However, it seems that all related functions assume either whole-brain or parcellated maps from both hemispheres (e.g. compare_images, get_surface_distance, etc.). Therefore, it seems like I would have to compute the distance matrix of vertices within my mask and then use brainsmash to create the surrogate maps. However, I wanted to ask if that's actually the case or if I missed something.

Sorry once more if this is not the right place to ask such questions.
Thanks again.

Best, Peer

@justinehansen
Copy link
Contributor

Hey Peer sorry about the late reply!
Honestly I wasn't sure myself so I checked with Ross and he confimed that your brainsmash route is probably the way to go. Neuromaps doesn't elegantly handle masked regions right now 🙁

Also this is definitely a good place to ask questions!

Best,
Justine

@PeerHerholz
Copy link
Author

PeerHerholz commented Nov 5, 2022

Hi @justinehansen,

thx for the reply and no problemo at all!
Ok, good, then I followed the recommendation hehe. I have code that appears to work for volume and surface data. It works roughly like the following:

  • compute distance (euclidean/surface distance) between voxels/vertices in a given mask per hemisphere
  • compute & evaluate variograms per hemisphere
  • create n surrogate maps based on variogram fit per hemisphere
  • compute correlation between non-permuted maps per hemisphere
  • compute correlation between non-permuted map and surrogate maps per hemisphere
  • get p value based non-parametric test

I thus basically mimics the existing workflows but adds the mask and hemisphere part. If you would be interested in adding the respective steps to neuromaps at a later point in time, please let me know. The code might need some slight restructuring but that shouldn't be too much of a hassle.

Thanks again. Best, Peer

@justinehansen
Copy link
Contributor

Hey @PeerHerholz , this sounds awesome!! We should totally add it to neuromaps. If you'd like, you could open a PR with the "rough" code and we could work with it from there? I'm flexible, happy to proceed however you see fit 🙂 (And there's obviously no urgency - can be whenever)

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

No branches or pull requests

2 participants