| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Creating Overlays Using False Discovery Rate

Page history last edited by PBworks 13 years, 10 months ago

Note: I am currently fixing a bug in our FDR software! -- Joe 02-02-07

 

You'll need an 8-bit mask and a floating point ("Real32") Z map, in Analyze format. For the sake of examples below, let's assume that the mask is named mask.img and the Z map is named zmap.img, but your own mask and Z map will probably have different names.

 

(1) Check Dimensions of Images

 

Run dordhdr4B on each of the header files, e.g.

 

dordhdr4B mask.hdr

dordhdr4B zmap.hdr

 

Each of these commands will produce a list of numbers. The first three numbers are the XYZ dimensions of each image. They must be the same if you want to proceed; i.e., if the first three numbers for mask.hdr are "91 109 91", then the first three numbers for zmap.hdr must also be "91 109 91".

 

(2) Compute Z Threshold Using FDR

 

Use the script computeFdr.csh to compute the Z threshold. You need to give it four arguments:

 

 

  • name of the floating point Z map
  • name of the 8-bit mask
  • desired False Discovery Rate; start off with using 0.05
  • a flag (1 or 2) indicating whether you'd like to look at both activations and deactivations (i.e., 2-tailed) or just activations (i.e., just 1-tailed).

 

E.g.

 

computeFdr.csh zmap.img mask.img 0.05 2

 

This script will take a few seconds to run, printing a lot of text to the screen, and invoking MATLAB along the way. The very last thing it prints to the screen is the Z threshold that you should use, given the FDR you selected and whether you indicated that you were going to look at both both activations and deactivations or just activations. This will look something like this:

 

UseThisForTheZvalThreshold =

4.712

 

e.g., indicating that you should use a Z threshold of 4.712. If it gives you no number but instead gives you "Inf"

 

UseThisForTheZvalThreshold =

Inf

 

then unfortunately your results were non-significant, and there is no Z threshold that you could use to control the false discovery rate at the selected FDR level.

 

(3) Create Overlays

 

Use the script ThresholdOverlay.csh to generate an overlay, using the Z threshold you just used. Feed this script the following four arguments:

 

  • name of the 8-bit mask
  • name of the floating point Z map
  • negative threshold
  • positive threshold

 

For the positive threshold, simply use the Z threshold that you computed in step (2), e.g. 4.712. If you want to look at deactivations as well (meaning you set the last argument of computeFdr.csh to "2" when you ran it), set the negative threshold to the same value as the positive threshold, but multiplied by -1, e.g. -4.712. E.g.

 

ThresholdOverlay.csh mask.img zmap.img -4.712 4.712

 

If you don't want to look at deactivations, just set the negative threshold to some ridiculously large (in magnitude) negative value like -100. This script will print lots of stuff to the screen, but at the end it will tell you the name of the output overly image, saying something like

 

 

ThresholdOverlay.csh: output written to Overlay.zmap._-4.712_4.712.hdr

 

which you can then load into MEDx, apply color lookup tables, and create screenshots.

Comments (0)

You don't have permission to comment on this page.