netneurolab / neuromaps

A toolbox for comparing brain maps
https://netneurolab.github.io/neuromaps
Other
235 stars 53 forks source link

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

Open PeerHerholz opened 1 year ago

PeerHerholz commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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:

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 commented 1 year ago

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)