Print

Print


Hi Mark,
I’ve sent you a patch off-list with an updated randomise and setup-masks that is more efficient for the larger designs (all the masks are concatenated into one 4D file ). I’m not sure about the 2.0.18 numbering - it may mean something to your sys-admins!

Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre 
John Radcliffe Hospital
University of Oxford

On 24 Aug 2017, at 16:21, Mark Wagshul <[log in to unmask]> wrote:

 
Mark
 
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
FAX: 718-430-3399
 
<image003.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Matthew Webster
Sent: Thursday, August 24, 2017 11:15 AM
To: [log in to unmask]
Subject: Re: [FSL] handling of zeros in randomise
 
Hi Mark,
                 I’m sure about the version number - can you tell me the result of running   
 
cat $FSLDIR/etc/fslversion
 
?
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre 
John Radcliffe Hospital
University of Oxford
 
On 24 Aug 2017, at 15:16, Mark Wagshul <[log in to unmask]> wrote:
 
We are running fsl 2.0.18, and CentOS 6.9.  I was actually shocked when I saw the FSL version, i never checked it and just relied on our system admin's and that they had installed the latest version.  I know the current version is 5 something.  I would assume you would recommend we upgrade immediately, could this be the issue with the setup_masks?
 
If we do upgrade, is there somewhere I can get a list of changes between these versions?  I need to assess what impact the upgrade will have on our processing pipeline.
 
Thanks,
 
Mark

_______________________ 
Mark Wagshul, PhD 
Albert Einstein College of Medicine
Bronx, NY
 
Sent from my iPhone


On Aug 24, 2017, at 9:20 AM, Matthew Webster <[log in to unmask]> wrote:

Hello Mark, 
  Can you confirm which FSL version and platform ( OSX, Centos 6 etc ) you are using?
 
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre 
John Radcliffe Hospital
University of Oxford
 
On 21 Aug 2017, at 21:47, Mark Wagshul <[log in to unmask]> wrote:
 
Matthew,
 
Sorry, I am sending multiple messages on the same topic, but because of the time difference between us, I have already solved the last issue and run into one more.
 
It was indeed a memory issue, I got it to run if I limited the analysis to the white matter and only a 10 slice slab.  It now gets to the point where it is ready to run the permutation testing and I get the error shown below.  I am assuming the 133 is from the number of EV’s (although I thought this should be 134 = 6 covariates + 128 masks).  But it wants Rows >= Columns, which is odd, since it seems like the rows is the number of subjects, and the columns are the number of EV’s, which will always be > number of subjects since I must have one mask file per subject.
 
Here’s the error:
___________________
ERROR: Program failed
An exception has been thrown
Logic error:- detected by Newmat: Want no. Rows >= no. Cols
MatrixType = Rect   # Rows = 128; # Cols = 133
Trace: SVD.
Exiting
___________________
 
 
___________________
_
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
FAX: 718-430-3399
 
<image003.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Matthew Webster
Sent: Tuesday, August 15, 2017 8:48 AM
To: [log in to unmask]

Subject: Re: [FSL] handling of zeros in randomise
 
Hello Mark,
                          Is it possible your design.mat has a rogue carriage-return ( or other whitespace character )? Can you run Vest2Text on your ( original ) design.mat and let me know the result of running wc -l on the output of that?
 
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre 
John Radcliffe Hospital
University of Oxford
 
On 15 Aug 2017, at 11:47, Mark Wagshul <[log in to unmask]> wrote:
 
I can't send the data for a few days, but I think I can describe the problem quite simply.
 
In the example I sent, the input data and design matrix have four subjects.  According to the instructions on the website, setup_masks should need 7 inputs in this case: 1) input design matrix, 2) input contrast file, 3) base name for the output, and four mask files (nifti images).  However, I find that it only works with 8 inputs, requiring 5 nifti files instead of the expected 4. 
 
 Is it possible that there is an error in the description of the usage of the function and there is some additional nifti file needed, such as the original nifti data file with the data from my four subjects?  The first step in the process seems to be fslmerge for which in my case it is merging the 5 nifti files I gave it as inputs (i.e. The last five inputs to the function call), which I assume will be used as the regressor, so I would expect it to have the same dimensionality as my data, i.e. 4 in this case, not 5. 
 
But, from the output design matrix file, it seems that my dimensionality has changed to 5, since an additional line has been added (the first line, 1 0 0 0 0).  In which case, it would work with the new file, I'm just not sure what the extra nifti file should be.
 
Hope this helps.  If not, I will send the data files over in a couple of days.  Thanks again for all the help.  Best,
 

Mark

_______________________ 
Mark Wagshul, PhD 
Albert Einstein College of Medicine
Bronx, NY
 
Sent from my iPhone


On Aug 14, 2017, at 12:27 AM, Anderson M. Winkler <[log in to unmask]> wrote:

Hi Mark, 
 
I'm unsure I quite get what the problem is but if you believe there is a problem and would like to upload your input files to some file sharing service and send the link off-list, I could have a look.
 
All the best,
 
Anderson
 
 
On 11 August 2017 at 15:11, Mark Wagshul <[log in to unmask]> wrote:
Anderson,
 
Just following up on this.  I confirmed with a very simple case that there is an extra file needed in the mask list.  I shortened my design matrix to 4 subjects, and got setup_masks to run successfully with a list of 5 mask files (the last one was a dummy file with all zeros).  Here are the input and output design matrices and you can see that the new design matrix has 5 lines, rather than four.
 
Original file: (note the numbers are obviously wrong, I just used the first four entries from my original large table, but I’m just trying to see what setup_masks will produce).
 
/NumWaves 6
/NumPoints 4
/PPheights 26.7031 0.6875 6.38281 0.17523 3.4375 0.5
/Matrix
19.7031 0.6875 3.3828 0.1752 -0.5625 -0.5000
17.7031 -0.3125 1.3828 0.0752 -0.5625 -0.5000
0.7031 -0.3125 1.3828 0.1752 -0.5625 -0.5000
0.7031 0.6875 0.3828 0.1752 1.4375 -0.5000
 
 
New file:
/NumWaves 9
/NumPoints 5
/Matrix
    1 0 0 0 0 
19.7031 0.6875 3.3828 0.1752 -0.5625 -0.5000    0 1 0 0 0
17.7031 -0.3125 1.3828 0.0752 -0.5625 -0.5000   0 0 1 0 0
0.7031 -0.3125 1.3828 0.1752 -0.5625 -0.5000    0 0 0 1 0
0.7031 0.6875 0.3828 0.1752 1.4375 -0.5000      0 0 0 0 1
 
I’m not sure how this will work, since the first entry has fewer columns than the other. 
 
Sorry this is taking so much effort to debug, but I really appreciate the help in figuring this out.  Thanks!
 
Mark
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
 
<image005.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Mark Wagshul
Sent: Thursday, August 10, 2017 12:08 PM

To: [log in to unmask]
Subject: Re: [FSL] handling of zeros in randomise
 
 
Anderson,
 
I have double checked this and I am completely sure that I am entering the right number of mask files, and yet it is failing as before.  Re the email I send earlier, the reason I thought I was off, was because I found that it would run if I added one additional mask to the list (just a copy of the last one).  So, it seems that it is only working if there are n+1 masks in the list.
 
Mark
 
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
 
<image003.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Anderson M. Winkler
Sent: Wednesday, August 9, 2017 9:53 PM
To: [log in to unmask]

Subject: Re: [FSL] handling of zeros in randomise
 
Hi Mark,
 
Could you double check that you didn't enter the design matrix (.mat file) twice when invoking setup_masks? That seems to be the case from the command line you showed.
 
All the best,
 
Anderson
 
 
On 9 August 2017 at 13:58, Mark Wagshul <[log in to unmask]> wrote:
Anderson,
 
 
Thanks.  Unfortunately, this did not work.  I got the following error.  Have attached the design and contrast matrix files, in case you’d like to look at it, but I’m pretty sure these are configured correctly.
 
“ERROR:: design matrix of different size to number of masks specified”
 
The command used to run setup_masks as “setup_masks ICVF_Q1vsQ4_124subj_2017Aug09.mat ICVF_Q1vsQ4_124subj_2017Aug09.mat ICVF_Q1vsQ4_124subj_2017Aug09_masked mask1 mask2 … mask124”.
 
Can it not handle this large a dataset?  Thanks for any advice you can provide.
 
Mark
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
 
<image003.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Anderson M. Winkler
Sent: Wednesday, August 9, 2017 9:22 AM

To: [log in to unmask]
Subject: Re: [FSL] handling of zeros in randomise
 
Hi Mark,
 
That's exactly it. For subject with no lesions, use an all zeroes mask (i.e., a blank volume).
 
All the best,
 
Anderson
 
 
On 7 August 2017 at 10:30, Mark Wagshul <[log in to unmask]> wrote:
Anderson,
 
Sorry, I just noticed this response from you.  I did see that comment, but didn’t have time to look carefully into this option.  I now understand what you mean and will try this out.  You’re right, I think this is exactly what we need to run.
 
Just to clarify how setup_masks works – I have to specify a mask for each volume, irrespective of whether or not I want to mask that volume (since it requires the masks to be in the same order as the images in the input image).  Not quite sure what the EV’s will look like, since the EV’s are now images (masks), but I guess it generates these automatically, so I will find out once it runs.
 
Thanks for the help!
 
Mark
 
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
 
<image003.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Anderson M. Winkler
Sent: Sunday, July 30, 2017 4:10 PM

To: [log in to unmask]
Subject: Re: [FSL] handling of zeros in randomise
 
Hi Mark,
 
Have you considered setup_masks that I commented in the earlier email? It should do what you need...
 
All the best,
 
Anderson
 
 
On 27 July 2017 at 18:12, Mark Wagshul <[log in to unmask]> wrote:
Thanks, Anderson (sorry for the delayed response!).
 
So, if I understand you correctly, it is NOT possible to ignore the zeros with randomize and the best approach would be to leave the non-physical values in.  This will work for FA, since most of these problematic voxels are areas where there are imperfections in a few of the directions (or where the imperfection is in the b=0 image, such that its value is lower than some of the b~=0 images).  In this case, the FA will be slightly above 1, but as you suggest the actual value is still likely high.  
 
This will unfortunately not work for NODDI.  Many of the errors in these maps give values which are way off, e.g. ICVF << 0, and are likely due to imperfections in the data which lead to erroneous fitting of the NODDI model.  In these cases, I think it’s unwise to leave the data as is since these will look like extreme parameter values for this subject, and the real solution would be to zero out those voxels for only that subject.  But, it seems that this feature is not available for randomize, so that the only way to prevent erroneous results in these voxels is to zero them out for all subjects.  Would this be your recommendation as well?
 
Thanks for any further advice you can provide.
 
Best,
 
Mark
 
____________________
Mark Wagshul, PhD
Associate Professor
Gruss Magnetic Resonance Research Center
Albert Einstein College of Medicine
Bronx, NY 10461

Ph: 718-430-4011
 
<image004.jpg>
This email message and any accompanying attachments may contain privileged information intended only for the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately.
 
 
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Anderson M. Winkler
Sent: Tuesday, July 18, 2017 11:27 AM
To: [log in to unmask]
Subject: Re: [FSL] handling of zeros in randomise
 
Hi Mark,
 
Please see below:
 
On 17 July 2017 at 14:46, Mark Wagshul <[log in to unmask]> wrote:
Dear FSL experts,

How does randomise handle zeros in the parameter maps?  I am analyzing DTI and NODDI data and there are instances where the parameter maps contain values which are non-physical (e.g. FA > 1).  I would like to zero out these data points for this subject alone, rather than masking out the voxel for all subjects.  Is this possible, or will randomise still calculate the statistics based on this subject with a value of zero?
 
I think you can leave these values as is, i.e., even if non-physical, they are still the best estimate of the diffusion parameters given the data, and randomise can benefit from them if you leave them there.
 
Zeroeing out or removing will be worse as the value randomise will see is much farther from the reality than the non-physical value. Say the true (unseen) FA value is 0.95, and the estimate found was 1.06 (non-physical). This 1.06 is closer to the truth than 0. Removing the voxel from the analysis (see the script setup_masks) may be just as bad, as the 1.06 provides some information (i.e., that FA is high for this subject), whereas knocking the voxel out will toss that information away.
 

Obviously, if it were possible to exclude individual subjects with zeroed-out data this will change the number of degrees of freedom across the image, but for a large enough sample (> 50 subjects per group), and assuming the zeros are occurring in random locations due to imperfections in the data, this should be a pretty small effect (alternatively, randomise may be able to handle the varying DOF's across the image).
 
The script setup_masks is useful for this purpose. If the DOF becomes a problem, it's possible to make small syntax changes and run using PALM with the option "-zstat", that will remove the dependency on the DOF.
 
Hope this helps!
 
All the best,
 
Anderson
 

Any advice you can give me on this would be much appreciated.

Thanks,

Mark Wagshul
 
 
 
 
 
<image005.jpg><image003.jpg><image003.jpg><image003.jpg><image004.jpg>