processing-scripts > some small questions
Showing 1-10 of 10 posts
Display:
Results per page:
Mar 21, 2011  02:03 AM | Daniel Keeser
some small questions
First of all: A thousand thanks for the great script and the provision to the field! I have some small issues in regard to the parameter setting:

1) Very general: Am I right to use for all scripts (1-8) the raw data (mprage, epi) if the script asks me for 'name of resting-state scan' and 'name of anatomical scan'? Or do I have to use the preprocessed data (e.g. _brain) in the following analysis steps (scripts 3-8)?

2) Does the script like to have the TR (repetition time)  
value in seconds (s) or in miliseconds (ms)?

3) The most important output files are explained in the Wiki. Is there any source explaining all output files. I do understand  some of the output files but not all and maybe I am not alone?

Thanks in forward!
Dan






Mar 24, 2011  04:03 PM | Maarten Mennes
RE: some small questions
Hi Dan,

Thanks for using the scripts!! (sorry for the slow response)

1) yes, the name of the scans refers to the raw data name

2) The TR should be in seconds (e.g., 2.5) 

3) No, unfortunately there is no source explaining all output files. However, we've tried naming all files so the names refer to the operation that what was done to them. To understand what every file is, take a look in the 1_anatpreproc.sh, 2_funcpreproc.sh etc. scripts. All commands are listed there together with basic comments on what happens. From those you should be able to understand what every intermediate file means.

Hope this helps!
Maarten
Mar 24, 2011  06:03 PM | Daniel Keeser
RE: some small questions
Maarten, many thanks for your answer!

Meanwhile I went through the scripts and the description is largely self-explanatory. However, I am wondering about the dimensions of the rest_res.nii.gz output files. It seems so that the preprocessing steps (scripts 1-5) are changing the data dimensions.

See raw functional file:

sizeof_hdr     348
data_type      INT16
dim0           4
dim1           64
dim2           64
dim3           28
dim4           120
dim5           1
dim6           1
dim7           1
vox_units      mm
time_units     s
datatype       4
nbyper         2
bitpix         16
pixdim0        0.0000000000
pixdim1        3.0000000000
pixdim2        3.0000000000
pixdim3        4.4000000954
pixdim4        3.0000000000
pixdim5        1.0000000000
pixdim6        1.0000000000
pixdim7        1.0000000000
vox_offset     352
cal_max        0.0000
cal_min        0.0000
scl_slope      1.000000
scl_inter      0.000000
phase_dim      0
freq_dim       0
slice_dim      0
slice_name     Unknown
slice_code     0
slice_start    0
slice_end      0
slice_duration 0.000000
time_offset    0.000000
intent         Unknown
intent_code    0
intent_name   
intent_p1      0.000000
intent_p2      0.000000
intent_p3      0.000000
qform_name     Scanner Anat
qform_code     1
qto_xyz:1      -3.000000  0.000000  -0.000000  96.000000
qto_xyz:2      0.000000  2.999104  0.107502  -101.711632
qto_xyz:3      -0.000000  -0.073297  4.398687  -14.906696
qto_xyz:4      0.000000  0.000000  0.000000  1.000000
qform_xorient  Right-to-Left
qform_yorient  Posterior-to-Anterior
qform_zorient  Inferior-to-Superior
sform_name     Scanner Anat
sform_code     1
sto_xyz:1      -3.000000  0.000000  0.000000  96.000000
sto_xyz:2      0.000000  2.999104  0.107502  -101.711632
sto_xyz:3      0.000000  -0.073297  4.398687  -14.906696
sto_xyz:4      0.000000  0.000000  0.000000  1.000000
sform_xorient  Right-to-Left
sform_yorient  Posterior-to-Anterior
sform_zorient  Inferior-to-Superior
file_type      NIFTI-1+
file_code      1
descrip       
aux_file  

and the rest_res.nii.gz data file:

sizeof_hdr     348
data_type      FLOAT32
dim0           4
dim1           64
dim2           64
dim3           28
dim4           120
dim5           1
dim6           1
dim7           1
vox_units      mm
time_units     s
datatype       16
nbyper         4
bitpix         32
pixdim0        0.0000000000
pixdim1        3.0000000000
pixdim2        3.0000000000
pixdim3        4.4000000954
pixdim4        3.0000000000
pixdim5        0.0000000000
pixdim6        0.0000000000
pixdim7        0.0000000000
vox_offset     6928
cal_max        0.0000
cal_min        0.0000
scl_slope      0.000000
scl_inter      0.000000
phase_dim      0
freq_dim       0
slice_dim      3
slice_name     Unknown
slice_code     0
slice_start    0
slice_end      27
slice_duration 0.000000
time_offset    0.000000
intent         Unknown
intent_code    0
intent_name   
intent_p1      0.000000
intent_p2      0.000000
intent_p3      0.000000
qform_name     Scanner Anat
qform_code     1
qto_xyz:1      -3.000000  -0.000000  -0.000000  96.000000
qto_xyz:2      0.000000  3.000000  -0.000000  -101.711632
qto_xyz:3      -0.000000  0.000000  4.400000  -14.906696
qto_xyz:4      0.000000  0.000000  0.000000  1.000000
qform_xorient  Right-to-Left
qform_yorient  Posterior-to-Anterior
qform_zorient  Inferior-to-Superior
sform_name     Scanner Anat
sform_code     1
sto_xyz:1      -3.000000  -0.000000  -0.000000  96.000000
sto_xyz:2      -0.000000  3.000000  -0.000000  -101.711632
sto_xyz:3      0.000000  0.000000  4.400000  -14.906696
sto_xyz:4      0.000000  0.000000  0.000000  1.000000
sform_xorient  Right-to-Left
sform_yorient  Posterior-to-Anterior
sform_zorient  Inferior-to-Superior
file_type      NIFTI-1+
file_code      1
descrip       
aux_file

Whereas the datatype (FLOAT32 vs. INT16) doesn't seem to be the problem I think something went wrong with 16 elements of the s- and qform matrix. I tried to run a single-session ICA using MELODIC and re-referenced the rest_res.nii.gz output file to the MNI152_T1_2mm_brain template and got strong registration problems (see attached file). Using fslorient didn't solve the problem (should I use fslwapdim ?).

Using the registrated rest_res2standard.nii.gz-file and deselecting registration in MELODIC also shows me activations outside the range of the cortex.

Did I miss something very simple?

Thanks in forward for any help!

Dan
Mar 24, 2011  06:03 PM | Maarten Mennes
RE: some small questions
Hi Dan,

Looking at the q-form and s-form values, it seems that the differences between the preprocessed and raw file are mere differences in rounding? (e.g., 4.398687 to 4.4).

Did you register the rest straigth to the MNI brain without going via the anaotmical image of the subject first (main structural image in melodic registration)? I.e., you would first align the rest with the anatomical, align the antomical with the MNI anatomy and then apply that alignment to the subject-space aligned rest.

Maarten
Mar 25, 2011  05:03 PM | Daniel Keeser
RE: some small questions
Hi Maarten,

I thought the script preprocessing step 3 (./3_registration.sh) already did this? However, even if I use the anatmoical brain for the main structural image selection in MELODIC the allignment looks anything but good (see attachment).

For comparison: Am I using the raw data (functional and anatomical scans) in single- or group MELODIC analyses I get an almost perfect alignment.The scripts 1-5 (preprocessing anatomical scan, preprocessing functional scan, running registration, running segmentation, running nuisance signal regression) are running fine without any error message.

BUT there is a warning message during the preprocessing functional scan run:

"*+ WARNING:   If you are performing spatial transformations on an oblique dset,
  such as Bloemer_after_r_func.nii.gz,
  or viewing/combining it with volumes of differing obliquity,
  you should consider running:
     3dWarp -deoblique
  on this and  other oblique datasets in the same session.
 See 3dWarp -help for details."

Is it recommended to use the 3dWarp -deoblique AFNI-function on the functional data?

Thanks for any suggestions!

Daniel
Mar 30, 2011  01:03 PM | Maarten Mennes
RE: some small questions
Hi Daniel,

1) the deoblique warning is not a big deal and is handled by I think the second step in the functional preprocessing. That step changes the header of the image so it is recognized as oblique.

2) 3_registration does indeed do the registration :) You can use the registration and apply that to your image. If you run 5_nuisance your is XXX_res_2standard.nii.gz. Which are the residuals in standard space. Are you using that one for melodic? Or are you using XXX_res.nii.gz, or rather XXX_pp.nii.gz?

What is the original orientation of your image in the header and is that correct? Looking at your example_func2standard1.png it seems some saggital images are plotted on the coronal view...

Maarten
Apr 4, 2011  06:04 PM | Daniel Keeser
RE: some small questions
Hi Maarten,

I have the same impression that saggital and coronal images are confused. I had a deeper look on the raw data and yes the Anterior-Posterior view is different between the mprage (anatomical scan) and the epi (functional scan). However, MELODIC is running fine even with these different orientation if I use the raw data.

I re-run the script after re-orienting the functional raw data using the command 'fslswapdim LR PA IS> . Thereafter both raw files are looking identical. However, the registration problem remains >>> The attached file. I also posted the script processing documentation and the registration after using MELODIC without using the script.

Is there maybe an ordering problem within the script?

Certainly, I also could run all pre-processing steps using FSL (GUI and command line) but the script would simplify my work as my new project has a large sample size (n = 120).



Moreover, I would really like to get the scripts run, so that I could share my completed research projects with the community (three projects are finished).


PS: The only changes I did on the scripts was the usage of the MNI152_T1_2mm_brain.nii.gz-template instead of the 3mm-template and I didn't used the 3mm tissuepriors but the other priors in the folder.

PPS: If you like I can upload you the raw data files?


Apr 7, 2011  11:04 AM | Daniel Keeser
RE: some small questions
Hi Maarten,

Unfortunately, I didn't used the XXX_pp.nii.gz-File. With this file everything is fine and perfect registrated!! Thanks a lot for all of your help...

Best,

Daniel
Apr 7, 2011  01:04 PM | Maarten Mennes
RE: some small questions
Hi Daniel,

sorry, I meant to reply that, but obviously failed to do so :s

The cause of the problem is that during the nuisance regression step, after demeaning, 100 is added back to the image to prevent some problems later on. Since 100 is added to the whole image, not just to the brain, creating a mask for this image will be problematic. That is what flirt chokes on when trying to register this image.

The solution is indeed to use the rest_pp.nii.gz image. More so for another, more important reason. It makes more sense to let melodic take care of the nuisance regression for you. The ICA will likely identify components that are noise/breathing/heartbeat-related, which you can then remove from your data. For instance, take a look at this message on the FSL board: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;aa093b1f.1003

Again, sorry for the delay!
Best,
Maarten
Apr 28, 2011  01:04 PM | Daniel Keeser
RE: some small questions
Hi Maarten,

Just to finish this thread: I tried to delete 100 in the script using zero or 1 but this did not change the results in melodic. The problem also occured as I did the segmentation by myself using FAST and FSL alone (I used a mask with only grey matter). So it wasn't the connectome script but FSL. FSL has registration problems if you use only GM for the ICA computation. It doesn't matter how many DOF you choose in the gui. The solution: If you use melodic by the command line it does not register again to the MNI template (the res2standard Files are already registrated) and everything is fine!

Thanks a lot for your help!

Daniel