help > How to analyze the data preprocessed from other software?
Showing 1-7 of 7 posts
Display:
Results per page:
Jan 7, 2019  09:01 PM | Masaki Yoneta - Keio University School of Medicine
How to analyze the data preprocessed from other software?
Hi,

I would like to analyze the data preprocessed by Freesurfer and AFNI with CONN.
However, we did not know how to insert each parameter in the item "Covariates 1st-level" and it could not be executed. For example, I do not know the format of "art_regression *" .mat used for QA_timesiries and scrubbing.

For these reasons, I do not know how to register the data obtained by previous preprocessing and proceed to the next analysis.

Can you tell me how to analyze preprocessed data from other software with CONN?

Best regards,
Masaki
Jan 8, 2019  12:01 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to analyze the data preprocessed from other software?
Hi,

After you have imported your structural and functional files into Conn, you can then include the six motion parameters as a text file into Conn. This would essentially be a text file with six columns corresponding to the three translation parameters and three rotation parameters. The number of rows would be the same as the number of scans that you have (number of volumes). Typically, SPM style motion parameter file contains translation parameters in mm and rotations in radians. There is a chance that Conn can read other types of motion parameter file but I haven't tested that.

As far as scrubbing parameters go, you can simply run the "functional Outlier detection (ART-based identification of outlier scans for scrubbing)" step from the preprocessing menu. Do note that in the default preprocessing pipeline, this step is run immediately after realignment (and slice timing correction if you have done that). If you have already detected outliers using other approaches (such as DVARS/FD/FSL's motion outliers), you could include them as "scrubbing" as a first level covariate. This is typically a .mat file with a variable named "R" containing a matrix of 1's and 0's with each column having a single value of 1 for the volume that has been marked as outlier and everything else in that column as zero. This is similar to the output from FSL's motion outliers. This is the format for the art_regression_outliers*.mat file.

Finally, as far as I can make out, the QC_timeseries variable in the first level contains standardized values (z scores) of global signal and motion parameters (though I am not 100% sure about this part).

As an alternate, type "art" on the MATLAB command prompt to launch the ART GUI.


Hope this helps


P.S: If you are importing FreeSurfer data into Conn, you might want to change some of the preprocessing options


Best
Pravesh

Originally posted by Masaki Yoneta:
Hi,

I would like to analyze the data preprocessed by Freesurfer and AFNI with CONN.
However, we did not know how to insert each parameter in the item "Covariates 1st-level" and it could not be executed. For example, I do not know the format of "art_regression *" .mat used for QA_timesiries and scrubbing.

For these reasons, I do not know how to register the data obtained by previous preprocessing and proceed to the next analysis.

Can you tell me how to analyze preprocessed data from other software with CONN?

Best regards,
Masaki
Jan 8, 2019  02:01 AM | Masaki Yoneta - Keio University School of Medicine
RE: How to analyze the data preprocessed from other software?
Hi Pravesh,

Thanks to you I was able to register realignment parameters and I was able to move on to the next step. And now I am facing the following two problems.

1. ROI mask error
I could not use ROI mask of CSF created with FreeSurfer (MNI converted by AFNI) and I do not know what the meaning of the error message.
By executing without including ROI mask of CSF, we can move on to the Denoising step. Moreover, ROI mask of gray matter and white matter seems to be able to process without problems, so I think that there is a problem with the CSF ROI mask.
I'd like to use mask created with FreeSurfer as much as possible, could you tell your advice about this problem for me?
These are error messages bellow.
___
ERROR DESCRIPTION:

エラー: conn_process (line 660)
No suprathreshold voxels in ROI file /Users/mrimac/Documents/MRIshell/data/compute_IFC/IFC0820QKZDb2/FT.11.bandpass.results/data4conn/roi_fsvent.nii after erosion (original file contained 234 suprathreshold voxels)
エラー: conn_process (line 16)
case 'setup', disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
エラー: conn (line 4439)
else conn_process('setup'); ispending=false;
エラー: conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN v.17.f
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018a
storage: 675.2Gb available
spm @ /Users/mrimac/Documents/MATLAB/spm12
conn @ /Users/mrimac/Documents/MATLAB/conn
# "roi_fsvent.nii" is CSF ROI mask.
___

2. (probably) the result of incorrect functional Outlier detection

Thank you for telling me about scrubbing. However strange result was obtained from CONN, so I would like to consult with you. I will attach a file of screenshot. Scrubbing result looks like a correlation matrix, and it is different from usuall CONN's result. This result seems to be incorrect, but is there a way to fix it?

Thank you for your help in advance.

Masaki
Jan 8, 2019  04:01 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to analyze the data preprocessed from other software?
Hi Masaki,

Regarding error 1, Conn reads the WM and CSF masks and erodes it so that only voxels belonging to that tissue class are retained. The error message indicates that the CSF mask after erosion did not have any voxels which survived the erosion process. It also mentions that the original file only had 234 voxels which is quite strange. Does the CSF mask cover whole brain or is it restricted to ventricles or something like that?

The CSF and WM masks are important for the implementation of aCompCor approach which Conn uses so you might want to look at this step carefully to ensure that everything looks okay. Maybe you want to upload a snapshot of your structural data and the same slice containing WM and CSF masks?

For the second point that you raised: the snapshot shows that there are way too many scans detected as outliers.Specifically, 238 scans out of the 240 that you have are being detected as outliers. That does not seem okay.

Let us say that for a given subject you have 240 volumes. Now, you want to "scrub" 4 volumes out of these: say volume #6, #7, #8, and #9. The .mat file will consist of a variable named "R". This dimensions of this variable will be 240x4 where 240 is the number of volumes and 4 is the number of volumes that you want to scrub. This matrix will be all zeros except the following entries:

row 6, col 1 = 1 (corresponding to volume 6 that needs to be scrubbed)
row 7, col 2 = 1 (corresponding to volume 7 that needs to be scrubbed)
row 8, col 3 = 1 (corresponding to volume 8 that needs to be scrubbed)
row 9, col 4 = 1 (corresponding to volume 9 that needs to be scrubbed)

Is your matrix designed in a similar way?


Hope this helps


Best
Pravesh
Jan 8, 2019  06:01 PM | Masaki Yoneta - Keio University School of Medicine
RE: How to analyze the data preprocessed from other software?
Hi Pravesh,

Thank you for your advice. I understood error massages about error 1.
The CSF mask does not cover whole brain, but only ventricles. Is there a difference between the shape of the segmentation mask in FreeSurfer and CONN in the first place? FreeSurfer's mask has only ventricles data.

And now I noticed I had a big misunderstanding, that my original purpose is learning how to analyze the data preprocessed from other software with CONN. I already have data of preprocessed T1 and fMRI, So I need only ROI analyses without preprocessing and denoising steps. In denoising session, I can remove MASK auto-created by CONN from Confounds, but can I skip all denoising session such as bandpass filtering?

I have used Freesurfer and AFNI so far, but I would like to use CONN's interface and 2nd-analysis in the future. Also I would like to compare results from CONN or FreeSurfer and AFNI, from the view of preprocessing. Therefore I have these question. Thank you for your advice.


Regarding error 2, due to the above misunderstanding, I thought that a large amount of abnormal value was detected by scrubbing the data after preprocessing. I understood "R" in mat file, thank you for your lecture.

Thank you for your help in advance.

Best regards,
Masaki
Jan 9, 2019  08:01 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to analyze the data preprocessed from other software?
Hi Masaki,

The usual FSL/SPM style CSF mask covers the entire brain. I have attached a snapshot as an example. Conn uses SPM segmentation mask by default for each subject. The attached file is the partial volume map; this would be binarized and eroded before time series extraction for regression during denoising.

If you just want to use Conn without the details of denoising, you could specify the bandpass filter as Inf to include the time series as such. You could also remove the WM/CSF masks to prevent their time series from being regressed. Optionally, you could also remove the scrubbing volumes if you do not wish these volumes to be regressed (just specify an empty "R" variable). By default, Conn also includes second order derivatives for the six regression parameters. This can be changed to only include the six parameters.

Hope this helps


Best
Pravesh
Attachment: CSF_snapshot.png
Feb 7, 2019  10:02 PM | Masaki Yoneta - Keio University School of Medicine
RE: How to analyze the data preprocessed from other software?
Hi Pravesh,

It's been a long time since we talk before.
However, about my question, how to analyze the data preprocessed from other software, was solved. Furthermore, thanks to your previous help, we could try various analyses on MATLAB by applying your advice.

I again realized CONN is very useful for MATLAB user.
I appreciate you giving me your great advice.

Regards,
Masaki