Visualizing DBM results on Mouse Average - CoBrALab/documentation GitHub Wiki
Making pretty figures using MRIcrotome to display results from DBM analysis
See wiki page: pydpiper: Introduction to twolevel_model_building.py
Below is the R code to visualise the results of you DBM analyses:
Here is a list of the modules that were loaded to run this code:
module load minc-toolkit/1.9.17 R/3.5.1 anaconda/5.1.0-python3 minc-stuffs/0.1.24^minc-toolkit-1.9.17 RMINC/1.5.2.2^minc-toolkit-1.9.17^R-3.5.1 rstudio/1.1.463
### visualizing results of mincLM model####
library(grid)
library(tidyverse)
library(MRIcrotome)
library(RMINC)
library(magrittr) #to be able to use "%>%"
#use the [pipeline-name]-nlin-3.mnc output file from your MBM run to display the results
anatVol <- mincArray(mincGetVolume("/data/chamal/projects/stephanie/Tau35-collab-Vernon/derivatives/mbm_20190910B/TAU20190910_nlin/TAU20190910-nlin-3.mnc"))
tFDR5 = 2.4
tmax = 5.8
sliceSeries(nrow = 5, ncol=5, begin = 12, end = 152) %>% #slice sequence to display stats
anatomy(anatVol, low=700, high=1400) %>%
overlay(mincArray(mincLM, "tvalue-genotypeWT"), # specify which column of the mincLM model
low=tFDR5, high=tmax, symmetric = T) %>% # t score range; symmetric = T means show positive and negative t values
legend("t-statistics") %>%
draw()
Tip: to find the best begin and end slices to display your results, you can use the mincbbox command on your mask minc file in your terminal to narrow down the slices that are likely to have results.
mincbbox -minccrop /data/chamal/projects/stephanie/Tau35-collab-Vernon/derivatives/mbm_20190910B/TAU20190910_nlin/TAU20190910-nlin-3_mask.mnc
output: -xlim 11 101 -ylim 12 152 -zlim 5 71
Use the first number from ylim for your begin and the last number from ylim for your end
For more information about the options for the mincPlotSliceSeries command: https://github.com/Mouse-Imaging-Centre/RMINC/blob/master/man/mincPlotSliceSeries.Rd
For other ways to visualize the data, please see: https://htmlpreview.github.io/?https://github.com/Mouse-Imaging-Centre/MRIcrotome/blob/master/vignettes/figures.html