Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
23 stars 17 forks source link

R function to create vertex related tables for publication. #207

Open egarza opened 6 years ago

egarza commented 6 years ago

Dear all,

After I finish the vertexLm and get the t-value thresholds with vertexFDR, I needed to go to minc Display and get the MNI coordinates of each significant PEAK by hand. I could not find a better way to get all the information I needed in one place (significant peak brain area, MNI coordinate, vertex and t-value).

So I made a small function with some of my students that solved my particular problem, called Vertex Coordinate Atlas: vertex_coordatlas.

The output is a table that one can export to Word or use ztable or whatever.

table_vertex

I would like to share this function and get feedback for it, and perhaps someone can improve it. It has some issues, for example, it uses the AAL labels as factors, and from there it finds the MAX t-value, and uses that particular row. So if you have 2 clusters in the same AAL label, you only get the MAX t-value MNI coordinate.

For now it needs some files I created based on the AAL atlas with 4,0962 vertices.

Thanks in advance,

Eduardo

jasonlerch commented 6 years ago

Neat!

Also check out how to do it in RMINC, if you’re curious:

https://mouse-imaging-centre.github.io/blog/post/2018-02-08_peaks-intro/

Jason

On Apr 5, 2018, 11:44 AM -0400, Eduardo Garza-Villarreal notifications@github.com, wrote:

Dear all,

After I finish the vertexLm and get the t-value thresholds with vertexFDR, I needed to go to minc Display and get the MNI coordinates of each significant PEAK by hand. I could not find a better way to get all the information I needed in one place (significant peak brain area, MNI coordinate, vertex and t-value).

So I made a small function with some of my students that solved my particular problem, called Vertex Coordinate Atlas: vertex_coordatlashttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_egarza_scripts&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=HeHbjTJnvHS1LfU-oVbj4xp56MzXc8SwpgPYe318jo0&m=YZHHs2TWZm1hTu0A3eeVnUSepYFCNXXXGzMDFJ8hxvE&s=Kk-2W7DoucvEyl3ZKdGCER_sT7RUecj7lNbtIYgrt7Y&e=.

The output is a table that one can export to Word or use ztable or whatever.

[table_vertex]https://urldefense.proofpoint.com/v2/url?u=https-3A__user-2Dimages.githubusercontent.com_5741446_38376283-2Dde967c38-2D38bd-2D11e8-2D9f33-2Dd8d55e84af27.png&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=HeHbjTJnvHS1LfU-oVbj4xp56MzXc8SwpgPYe318jo0&m=YZHHs2TWZm1hTu0A3eeVnUSepYFCNXXXGzMDFJ8hxvE&s=Z2PdT_fbDxnwwysR3_SG7Mcd44aRSEQFTL0Bo7Wsh0s&e=

I would like to share this function and get feedback for it, and perhaps someone can improve it. It has some issues, for example, it uses the AAL labels as factors, and from there it finds the MAX t-value, and uses that particular row. So if you have 2 clusters in the same AAL label, you only get the MAX t-value MNI coordinate.

For now it needs some files I created based on the AAL atlas with 4,0962 vertices.

Thanks in advance,

Eduardo

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Mouse-2DImaging-2DCentre_RMINC_issues_207&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=HeHbjTJnvHS1LfU-oVbj4xp56MzXc8SwpgPYe318jo0&m=YZHHs2TWZm1hTu0A3eeVnUSepYFCNXXXGzMDFJ8hxvE&s=c_8at5joBtNH-hBTBL-mtWNvwDh_A_XZl2g3XRDdhx8&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAxd-5F-2DMaVVMW9BUtAbap7oiqPr1axY-2Dqks5tljvrgaJpZM4TIsnu&d=DwMCaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=HeHbjTJnvHS1LfU-oVbj4xp56MzXc8SwpgPYe318jo0&m=YZHHs2TWZm1hTu0A3eeVnUSepYFCNXXXGzMDFJ8hxvE&s=bkoRVR3f7jeDsP8iB5I2f-Zd4VE13xGAxYL5vidVmYw&e=.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

egarza commented 6 years ago

Ah, thanks, Jason.

Didn't find this before.

cfhammill commented 6 years ago

Thanks Eduardo, in addition to Jason's comment, we have an vertexFindPeaks variant in addition to the volumetric one: https://github.com/Mouse-Imaging-Centre/RMINC/blob/master/R/minc_graphs.R#L105. I think having a combined function that will take peak information and and atlas to construct a nice table would be a valuable addition to the package. I suspect fixing the problems mentioned in your earlier post wouldn't be too hard.

If you're interested in helping make this happen consider opening a pull request, from there we can work on it together.

gdevenyi commented 6 years ago

Tangentally related to https://github.com/Mouse-Imaging-Centre/RMINC/issues/163

egarza commented 6 years ago

I will be happy to contribute, Chris. I'm not an expert R programmer but I'll do my best.

Where do you want to pull request, should I just create a new branch on my function and create the pull request there?

Thanks

Ed

cfhammill commented 6 years ago

Hi Eduardo,

If you fork RMINC, checkout the branch develop then add your function to either minc_graphs or minc_vertex_statistics. Include a roxygen documentation block about the function (follow an example from the package). Then issue a pull request against our develop branch.

I'll merge the function in and try to make it easy to use from this side.

egarza commented 6 years ago

Great, thanks, I'm on it. I'll add it to minc_vertex_statistics.