help > Explanation of Outputs
Showing 1-11 of 11 posts
Sep 26, 2016 03:09 PM | Kevin Mann - Robarts Research Institute
Explanation of Outputs
Hello Alfonso and CONN users,
I am looking for an explanation of the outputs of CONN (ie. data and results folders and their various outputs)
I want to extract the time series from a particular ROI per subject for further analysis and I want to be sure I am using the proper matrix.
Thanks in advance for helping me with this quick question!
-Kevin
I am looking for an explanation of the outputs of CONN (ie. data and results folders and their various outputs)
I want to extract the time series from a particular ROI per subject for further analysis and I want to be sure I am using the proper matrix.
Thanks in advance for helping me with this quick question!
-Kevin
Sep 26, 2016 06:09 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Explanation of Outputs
Hi Kevin,
I will try and be as comprehensive as possible here, though its possible that I might miss out on some of the names/naming convention. Most of these have been addressed at various places on this forum before and I have linked some of the forum posts which I have personally kept track of/asked at/replied to (though there might be other threads with similar content):
Let's say your structural scan is named "t1.nii".
Upon preprocessing, the files are stored in the same folder from which it is read. They are named as follows (borrowed from here):
ct1 ---> centered T1
c1ct1 ---> segmented centered T1 (grey matter mask)
c2ct1 ---> segmented centered T1 (white matter mask)
c3ct1 ---> segmented centered T1 (CSF)
centering_t1.mat ---> contains the rotation matrix applied to center (bring the origin closer to ACPC plane)
ct1_seg8.mat ---> matrix generated while segmentation module was running. If you load it in MATLAB, you would see several variables in your workspace. They include, among other things, the original image, warping parameters, rotation matrix, the location for the TPMs, etc.
uxxx.nii ---> unwarped
auxxx.nii ---> slice timing corrected, unwarped
wauxxx.nii ---> normalized, slice timing corrected, unwarped
swauxxx.nii ---> smoothed, normalized, slice timing corrected, unwarped
rp_xxx file ---> output from realignment step
y_ and iy_ are the deformation fields (instead of the older sn_.mat files), "which contain three image volumes encoding the x, y and z coordinates (in mm) of where each voxel maps to" (SPM 12 release notes). You would have these for structural and functional images.
When you open your Conn project folder there are two folders: data and results.
Data folder:
COND_Subjectxxx_Sessionxxx.mat files ---> most likely (not sure) contains the HRF weights for each condition
COV_subjectxxx_Sessionxxx.mat:
data: cell type containing realignment parameters, scrubbing parameters, and main effects of the condition(s) (in that order; "names" cell contains the names of these)
DATA_Subjectxxx_Sessionxxx.mat ---> image properties like bounding box, number of voxels, voxel size, etc.
REX_Subjectxxx_ROIx.mat ---> time series from different ROIs (name of the ROI is mentioned inside the params structure), including the number of PCA components to be extracted from each of the ROIs (params.ROIdata would have the time series from that ROI)
ROI_Subjectxxx_Sessionxxx.mat:
data: time series from ALL ROIs (including WM/CSF etc)
names: the names (in order) of the ROIs mentioned in the data field
xyz: the x, y, and z coordinates of the ROIs
In the Results/preprocessing folder:
_list_conditions: names of the conditions
DATA_Subjectxxx_Conditionxxx,mat ---> voxel level data post denoising
niftiDATA_Subjectxxx_Conditionxxx.nii ---> nifti file after denoising [check this forum post]
ROI_Subejctxxx_Conditionxxx: same as above, but data is after denoising
In the Results/firstlevel folder: ANALYSIS_** refers to the analysis number (right side in the first level analyses Conn GUI; you can run multiple analyses on the same set of subjects without having to do the same steps again. For example: using correlation coefficient, and semi partial correlation as different analyses).
Inside each ANALYSIS_xx folder:
_list_conditions: names of conditions
_list_sources: names of the sources (note that WM/CSF et al are not included, unlike before)
_list_sources: the same, with the full ROI name corresponding to the source number
BETA_Subjectxxx_Conditionxxx_Sourcexxx.nii: nifti files for each source (i.e. ROI), each condition, each session, each subject (the BETA would be based on your analysis choice.
Each resultsROI_Subjectxxx_Conditionxxx.mat file contains the following fields:
DOF: degrees of freedom
names: names of source ROIs
names2: names of target ROIs (note that Grey Matter is included as a target, hence number of names2 elements = number of names elements+1)
regressors: if you are using higher order time series derivatives etc. (not too sure about this)
SE: (most likely) the standard error
xyz: x, y, and z coordinates of each "target" ROI (Grey Matter is still included)
Z: Fisher transformed correlation coefficients (from each source to each target; could be a different value depending on the choice of analysis)
se_Subjectxxx_Conditionxxx.nii: no idea about this file (sorry!; some first level map maybe?)
For results/secondlevel folder (again, different ANALYSIS_xx folders): If you have defined contrast(s), they will have folders of their own inside the ANALYSIS folder. Each contrast folder has a "condition" folder inside (or condition contrast folder):
ROI.mat: contains the following fields: (borrowed from here):
- xX has the details of the subjects selected
- y has the correlation values of all subjects (if correlation is the measure of functional connectivity selected at first level)
- names has the names of the source ROIs
- xyz has centroid of the source ROI
- names2 has the names of target ROIs
- xyz2 has centroids of traget ROIs
- h is the average of the y values for the particular pair of ROIs (essentially, the beta displayed in the results window)
- F has the appropriate statistical value (T value for example)
- p has the one sided uncorrected p value
- dof is the degrees of freedom
- statname is the name of statistic being calculated (T/F)
Note that the p value is just one sided and not corrected for multiple comparison. Use p_twosided = 2*min(p_onesided, 1-p_onesided) to convert to two sided p values (also, check this post for a discussion on how to do FDR correction by calling conn_fdr).
Also, check this post for some more insight on this ROI.mat variable and the calculation of error bars, etc.
From your post, I think you are trying to extract denoised time series. Here is a quick compilation of some related posts about the same:
conn*/results/preprocessing/ROI_Subject*_Condition*.mat will give you the denoised time series. Then, condition specific time series can be obtained by:
w = max(0,conditionweights{1});
idx = find( w>0 );
data_reduced = cellfun(@(x)x(idx,:), data, 'uni',0);
w_reduced = w(idx);
"data_reduced" and "w_reduced" variables represent, respectively, the timeseries and weights that will be used for computing weighted-GLM measures (e.g. weighted correlation) [check this post]
Finally, weighted_ts = conn_wdemean(data_reduced, w_reduced).*w_reduced;
You can then calculate correlation coefficients (for example) between all the weighted_ts (followed by Fisher's transform: atanh).
Hope the above helps!
P.S: Do note that not all files mentioned above would be available on default run. Most of the REX and .nii files are optional output (for example, this post).
Best,
Pravesh
I will try and be as comprehensive as possible here, though its possible that I might miss out on some of the names/naming convention. Most of these have been addressed at various places on this forum before and I have linked some of the forum posts which I have personally kept track of/asked at/replied to (though there might be other threads with similar content):
Let's say your structural scan is named "t1.nii".
Upon preprocessing, the files are stored in the same folder from which it is read. They are named as follows (borrowed from here):
ct1 ---> centered T1
c1ct1 ---> segmented centered T1 (grey matter mask)
c2ct1 ---> segmented centered T1 (white matter mask)
c3ct1 ---> segmented centered T1 (CSF)
centering_t1.mat ---> contains the rotation matrix applied to center (bring the origin closer to ACPC plane)
ct1_seg8.mat ---> matrix generated while segmentation module was running. If you load it in MATLAB, you would see several variables in your workspace. They include, among other things, the original image, warping parameters, rotation matrix, the location for the TPMs, etc.
uxxx.nii ---> unwarped
auxxx.nii ---> slice timing corrected, unwarped
wauxxx.nii ---> normalized, slice timing corrected, unwarped
swauxxx.nii ---> smoothed, normalized, slice timing corrected, unwarped
rp_xxx file ---> output from realignment step
y_ and iy_ are the deformation fields (instead of the older sn_.mat files), "which contain three image volumes encoding the x, y and z coordinates (in mm) of where each voxel maps to" (SPM 12 release notes). You would have these for structural and functional images.
When you open your Conn project folder there are two folders: data and results.
Data folder:
COND_Subjectxxx_Sessionxxx.mat files ---> most likely (not sure) contains the HRF weights for each condition
COV_subjectxxx_Sessionxxx.mat:
data: cell type containing realignment parameters, scrubbing parameters, and main effects of the condition(s) (in that order; "names" cell contains the names of these)
DATA_Subjectxxx_Sessionxxx.mat ---> image properties like bounding box, number of voxels, voxel size, etc.
REX_Subjectxxx_ROIx.mat ---> time series from different ROIs (name of the ROI is mentioned inside the params structure), including the number of PCA components to be extracted from each of the ROIs (params.ROIdata would have the time series from that ROI)
ROI_Subjectxxx_Sessionxxx.mat:
data: time series from ALL ROIs (including WM/CSF etc)
names: the names (in order) of the ROIs mentioned in the data field
xyz: the x, y, and z coordinates of the ROIs
In the Results/preprocessing folder:
_list_conditions: names of the conditions
DATA_Subjectxxx_Conditionxxx,mat ---> voxel level data post denoising
niftiDATA_Subjectxxx_Conditionxxx.nii ---> nifti file after denoising [check this forum post]
ROI_Subejctxxx_Conditionxxx: same as above, but data is after denoising
In the Results/firstlevel folder: ANALYSIS_** refers to the analysis number (right side in the first level analyses Conn GUI; you can run multiple analyses on the same set of subjects without having to do the same steps again. For example: using correlation coefficient, and semi partial correlation as different analyses).
Inside each ANALYSIS_xx folder:
_list_conditions: names of conditions
_list_sources: names of the sources (note that WM/CSF et al are not included, unlike before)
_list_sources: the same, with the full ROI name corresponding to the source number
BETA_Subjectxxx_Conditionxxx_Sourcexxx.nii: nifti files for each source (i.e. ROI), each condition, each session, each subject (the BETA would be based on your analysis choice.
Each resultsROI_Subjectxxx_Conditionxxx.mat file contains the following fields:
DOF: degrees of freedom
names: names of source ROIs
names2: names of target ROIs (note that Grey Matter is included as a target, hence number of names2 elements = number of names elements+1)
regressors: if you are using higher order time series derivatives etc. (not too sure about this)
SE: (most likely) the standard error
xyz: x, y, and z coordinates of each "target" ROI (Grey Matter is still included)
Z: Fisher transformed correlation coefficients (from each source to each target; could be a different value depending on the choice of analysis)
se_Subjectxxx_Conditionxxx.nii: no idea about this file (sorry!; some first level map maybe?)
For results/secondlevel folder (again, different ANALYSIS_xx folders): If you have defined contrast(s), they will have folders of their own inside the ANALYSIS folder. Each contrast folder has a "condition" folder inside (or condition contrast folder):
ROI.mat: contains the following fields: (borrowed from here):
- xX has the details of the subjects selected
- y has the correlation values of all subjects (if correlation is the measure of functional connectivity selected at first level)
- names has the names of the source ROIs
- xyz has centroid of the source ROI
- names2 has the names of target ROIs
- xyz2 has centroids of traget ROIs
- h is the average of the y values for the particular pair of ROIs (essentially, the beta displayed in the results window)
- F has the appropriate statistical value (T value for example)
- p has the one sided uncorrected p value
- dof is the degrees of freedom
- statname is the name of statistic being calculated (T/F)
Note that the p value is just one sided and not corrected for multiple comparison. Use p_twosided = 2*min(p_onesided, 1-p_onesided) to convert to two sided p values (also, check this post for a discussion on how to do FDR correction by calling conn_fdr).
Also, check this post for some more insight on this ROI.mat variable and the calculation of error bars, etc.
From your post, I think you are trying to extract denoised time series. Here is a quick compilation of some related posts about the same:
conn*/results/preprocessing/ROI_Subject*_Condition*.mat will give you the denoised time series. Then, condition specific time series can be obtained by:
w = max(0,conditionweights{1});
idx = find( w>0 );
data_reduced = cellfun(@(x)x(idx,:), data, 'uni',0);
w_reduced = w(idx);
"data_reduced" and "w_reduced" variables represent, respectively, the timeseries and weights that will be used for computing weighted-GLM measures (e.g. weighted correlation) [check this post]
Finally, weighted_ts = conn_wdemean(data_reduced, w_reduced).*w_reduced;
You can then calculate correlation coefficients (for example) between all the weighted_ts (followed by Fisher's transform: atanh).
Hope the above helps!
P.S: Do note that not all files mentioned above would be available on default run. Most of the REX and .nii files are optional output (for example, this post).
Best,
Pravesh
Sep 26, 2016 06:09 PM | Kevin Mann - Robarts Research Institute
RE: Explanation of Outputs
I can't thank you enough, Pravesh, for the prompt and detailed
reply. This is exactly what I needed.
Best regards,
Kevin
Best regards,
Kevin
Sep 27, 2016 08:09 PM | Alfonso Nieto-Castanon - Boston University
RE: Explanation of Outputs
Hi Pravesh,
That was an impressively comprehensive response, I wish I could +1 your post!
Thanks!!
Alfonso
That was an impressively comprehensive response, I wish I could +1 your post!
Thanks!!
Alfonso
Sep 14, 2017 09:09 PM | Anant Shinde
RE: Explanation of Outputs
HiPravesh,
When I check the data variable (timeseries) in the data folder file ROI_SubjectXXX_SessionXXX it has 300 time points as expected (My data is Resting state with 300 time points).
But ROI_SubjectXXX_SessionXXX file n directory Results/Preprocessing has 900 time points.
Why is that? Is Denoising step oversamples the data?
Thanks,
Anant
When I check the data variable (timeseries) in the data folder file ROI_SubjectXXX_SessionXXX it has 300 time points as expected (My data is Resting state with 300 time points).
But ROI_SubjectXXX_SessionXXX file n directory Results/Preprocessing has 900 time points.
Why is that? Is Denoising step oversamples the data?
Thanks,
Anant
Sep 15, 2017 10:09 PM | Jason Craggs - University of Missouri
RE: Explanation of Outputs
Hi Alfonso and Pravesh,
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
Sep 16, 2017 09:09 PM | Alfonso Nieto-Castanon - Boston University
RE: Explanation of Outputs
Hi Jason,
That is a good idea, thanks for the recommendation! with Pravesh permission I will add this to the documentation
Best
Alfonso
Originally posted by Jason Craggs:
That is a good idea, thanks for the recommendation! with Pravesh permission I will add this to the documentation
Best
Alfonso
Originally posted by Jason Craggs:
Hi Alfonso and Pravesh,
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
Sep 16, 2017 10:09 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Explanation of Outputs
Hi,
Sorry I just saw the messages on this thread.
Anant: are you doing some sort of PPI modeling?
Jason: thanks for the idea! I am happy to hear that the post has been helpful
Dr. Alfonso: by all means, please go ahead! Most of the content in the post are based on your suggestions :)
Regards
Pravesh
Originally posted by Alfonso Nieto-Castanon:
Sorry I just saw the messages on this thread.
Anant: are you doing some sort of PPI modeling?
Jason: thanks for the idea! I am happy to hear that the post has been helpful
Dr. Alfonso: by all means, please go ahead! Most of the content in the post are based on your suggestions :)
Regards
Pravesh
Originally posted by Alfonso Nieto-Castanon:
Hi
Jason,
That is a good idea, thanks for the recommendation! with Pravesh permission I will add this to the documentation
Best
Alfonso
Originally posted by Jason Craggs:
That is a good idea, thanks for the recommendation! with Pravesh permission I will add this to the documentation
Best
Alfonso
Originally posted by Jason Craggs:
Hi Alfonso and Pravesh,
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
As a new user, I have been searching for this exact information. Perhaps it could become an official appendix to the manual?!? Having this information readily available from the beginning would be great for people just starting out and/or those who just need to double check something for the sake of their sanity!
Cheers,
Jason
Dec 16, 2017 12:12 AM | Daniel Berge - Hospital del Mar Medical Research Institute (IMIM)
RE: Explanation of Outputs (folders)
Regarding outputs, is there a way to send the output images
(realigned, normalised, etc..) directly to a different folder from
the original ones? This is because I want to preprocess the same
subjects using different QA thresholds and then compare them.
Otherwise I think I just could replicate the original images in
different folders and start each time from one of these folders.
Note: I do not know if this question should correspond to a new post or not.
Note 2: As a relateively new user in conn I am impressed of how active and helpful this forum is. Thanks developers and users!
Originally posted by Pravesh Parekh:
Note: I do not know if this question should correspond to a new post or not.
Note 2: As a relateively new user in conn I am impressed of how active and helpful this forum is. Thanks developers and users!
Originally posted by Pravesh Parekh:
Hi Kevin,
I will try and be as comprehensive as possible here, though its possible that I might miss out on some of the names/naming convention. Most of these have been addressed at various places on this forum before and I have linked some of the forum posts which I have personally kept track of/asked at/replied to (though there might be other threads with similar content):
Let's say your structural scan is named "t1.nii".
Upon preprocessing, the files are stored in the same folder from which it is read. They are named as follows (borrowed from here):
ct1 ---> centered T1
c1ct1 ---> segmented centered T1 (grey matter mask)
c2ct1 ---> segmented centered T1 (white matter mask)
c3ct1 ---> segmented centered T1 (CSF)
centering_t1.mat ---> contains the rotation matrix applied to center (bring the origin closer to ACPC plane)
ct1_seg8.mat ---> matrix generated while segmentation module was running. If you load it in MATLAB, you would see several variables in your workspace. They include, among other things, the original image, warping parameters, rotation matrix, the location for the TPMs, etc.
uxxx.nii ---> unwarped
auxxx.nii ---> slice timing corrected, unwarped
wauxxx.nii ---> normalized, slice timing corrected, unwarped
swauxxx.nii ---> smoothed, normalized, slice timing corrected, unwarped
rp_xxx file ---> output from realignment step
y_ and iy_ are the deformation fields (instead of the older sn_.mat files), "which contain three image volumes encoding the x, y and z coordinates (in mm) of where each voxel maps to" (SPM 12 release notes). You would have these for structural and functional images.
When you open your Conn project folder there are two folders: data and results.
Data folder:
COND_Subjectxxx_Sessionxxx.mat files ---> most likely (not sure) contains the HRF weights for each condition
COV_subjectxxx_Sessionxxx.mat:
data: cell type containing realignment parameters, scrubbing parameters, and main effects of the condition(s) (in that order; "names" cell contains the names of these)
DATA_Subjectxxx_Sessionxxx.mat ---> image properties like bounding box, number of voxels, voxel size, etc.
REX_Subjectxxx_ROIx.mat ---> time series from different ROIs (name of the ROI is mentioned inside the params structure), including the number of PCA components to be extracted from each of the ROIs (params.ROIdata would have the time series from that ROI)
ROI_Subjectxxx_Sessionxxx.mat:
data: time series from ALL ROIs (including WM/CSF etc)
names: the names (in order) of the ROIs mentioned in the data field
xyz: the x, y, and z coordinates of the ROIs
In the Results/preprocessing folder:
_list_conditions: names of the conditions
DATA_Subjectxxx_Conditionxxx,mat ---> voxel level data post denoising
niftiDATA_Subjectxxx_Conditionxxx.nii ---> nifti file after denoising [check this forum post]
ROI_Subejctxxx_Conditionxxx: same as above, but data is after denoising
In the Results/firstlevel folder: ANALYSIS_** refers to the analysis number (right side in the first level analyses Conn GUI; you can run multiple analyses on the same set of subjects without having to do the same steps again. For example: using correlation coefficient, and semi partial correlation as different analyses).
Inside each ANALYSIS_xx folder:
_list_conditions: names of conditions
_list_sources: names of the sources (note that WM/CSF et al are not included, unlike before)
_list_sources: the same, with the full ROI name corresponding to the source number
BETA_Subjectxxx_Conditionxxx_Sourcexxx.nii: nifti files for each source (i.e. ROI), each condition, each session, each subject (the BETA would be based on your analysis choice.
Each resultsROI_Subjectxxx_Conditionxxx.mat file contains the following fields:
DOF: degrees of freedom
names: names of source ROIs
names2: names of target ROIs (note that Grey Matter is included as a target, hence number of names2 elements = number of names elements+1)
regressors: if you are using higher order time series derivatives etc. (not too sure about this)
SE: (most likely) the standard error
xyz: x, y, and z coordinates of each "target" ROI (Grey Matter is still included)
Z: Fisher transformed correlation coefficients (from each source to each target; could be a different value depending on the choice of analysis)
se_Subjectxxx_Conditionxxx.nii: no idea about this file (sorry!; some first level map maybe?)
For results/secondlevel folder (again, different ANALYSIS_xx folders): If you have defined contrast(s), they will have folders of their own inside the ANALYSIS folder. Each contrast folder has a "condition" folder inside (or condition contrast folder):
ROI.mat: contains the following fields: (borrowed from here):
- xX has the details of the subjects selected
- y has the correlation values of all subjects (if correlation is the measure of functional connectivity selected at first level)
- names has the names of the source ROIs
- xyz has centroid of the source ROI
- names2 has the names of target ROIs
- xyz2 has centroids of traget ROIs
- h is the average of the y values for the particular pair of ROIs (essentially, the beta displayed in the results window)
- F has the appropriate statistical value (T value for example)
- p has the one sided uncorrected p value
- dof is the degrees of freedom
- statname is the name of statistic being calculated (T/F)
Note that the p value is just one sided and not corrected for multiple comparison. Use p_twosided = 2*min(p_onesided, 1-p_onesided) to convert to two sided p values (also, check this post for a discussion on how to do FDR correction by calling conn_fdr).
Also, check this post for some more insight on this ROI.mat variable and the calculation of error bars, etc.
From your post, I think you are trying to extract denoised time series. Here is a quick compilation of some related posts about the same:
conn*/results/preprocessing/ROI_Subject*_Condition*.mat will give you the denoised time series. Then, condition specific time series can be obtained by:
w = max(0,conditionweights{1});
idx = find( w>0 );
data_reduced = cellfun(@(x)x(idx,:), data, 'uni',0);
w_reduced = w(idx);
"data_reduced" and "w_reduced" variables represent, respectively, the timeseries and weights that will be used for computing weighted-GLM measures (e.g. weighted correlation) [check this post]
Finally, weighted_ts = conn_wdemean(data_reduced, w_reduced).*w_reduced;
You can then calculate correlation coefficients (for example) between all the weighted_ts (followed by Fisher's transform: atanh).
Hope the above helps!
P.S: Do note that not all files mentioned above would be available on default run. Most of the REX and .nii files are optional output (for example, this post).
Best,
Pravesh
I will try and be as comprehensive as possible here, though its possible that I might miss out on some of the names/naming convention. Most of these have been addressed at various places on this forum before and I have linked some of the forum posts which I have personally kept track of/asked at/replied to (though there might be other threads with similar content):
Let's say your structural scan is named "t1.nii".
Upon preprocessing, the files are stored in the same folder from which it is read. They are named as follows (borrowed from here):
ct1 ---> centered T1
c1ct1 ---> segmented centered T1 (grey matter mask)
c2ct1 ---> segmented centered T1 (white matter mask)
c3ct1 ---> segmented centered T1 (CSF)
centering_t1.mat ---> contains the rotation matrix applied to center (bring the origin closer to ACPC plane)
ct1_seg8.mat ---> matrix generated while segmentation module was running. If you load it in MATLAB, you would see several variables in your workspace. They include, among other things, the original image, warping parameters, rotation matrix, the location for the TPMs, etc.
uxxx.nii ---> unwarped
auxxx.nii ---> slice timing corrected, unwarped
wauxxx.nii ---> normalized, slice timing corrected, unwarped
swauxxx.nii ---> smoothed, normalized, slice timing corrected, unwarped
rp_xxx file ---> output from realignment step
y_ and iy_ are the deformation fields (instead of the older sn_.mat files), "which contain three image volumes encoding the x, y and z coordinates (in mm) of where each voxel maps to" (SPM 12 release notes). You would have these for structural and functional images.
When you open your Conn project folder there are two folders: data and results.
Data folder:
COND_Subjectxxx_Sessionxxx.mat files ---> most likely (not sure) contains the HRF weights for each condition
COV_subjectxxx_Sessionxxx.mat:
data: cell type containing realignment parameters, scrubbing parameters, and main effects of the condition(s) (in that order; "names" cell contains the names of these)
DATA_Subjectxxx_Sessionxxx.mat ---> image properties like bounding box, number of voxels, voxel size, etc.
REX_Subjectxxx_ROIx.mat ---> time series from different ROIs (name of the ROI is mentioned inside the params structure), including the number of PCA components to be extracted from each of the ROIs (params.ROIdata would have the time series from that ROI)
ROI_Subjectxxx_Sessionxxx.mat:
data: time series from ALL ROIs (including WM/CSF etc)
names: the names (in order) of the ROIs mentioned in the data field
xyz: the x, y, and z coordinates of the ROIs
In the Results/preprocessing folder:
_list_conditions: names of the conditions
DATA_Subjectxxx_Conditionxxx,mat ---> voxel level data post denoising
niftiDATA_Subjectxxx_Conditionxxx.nii ---> nifti file after denoising [check this forum post]
ROI_Subejctxxx_Conditionxxx: same as above, but data is after denoising
In the Results/firstlevel folder: ANALYSIS_** refers to the analysis number (right side in the first level analyses Conn GUI; you can run multiple analyses on the same set of subjects without having to do the same steps again. For example: using correlation coefficient, and semi partial correlation as different analyses).
Inside each ANALYSIS_xx folder:
_list_conditions: names of conditions
_list_sources: names of the sources (note that WM/CSF et al are not included, unlike before)
_list_sources: the same, with the full ROI name corresponding to the source number
BETA_Subjectxxx_Conditionxxx_Sourcexxx.nii: nifti files for each source (i.e. ROI), each condition, each session, each subject (the BETA would be based on your analysis choice.
Each resultsROI_Subjectxxx_Conditionxxx.mat file contains the following fields:
DOF: degrees of freedom
names: names of source ROIs
names2: names of target ROIs (note that Grey Matter is included as a target, hence number of names2 elements = number of names elements+1)
regressors: if you are using higher order time series derivatives etc. (not too sure about this)
SE: (most likely) the standard error
xyz: x, y, and z coordinates of each "target" ROI (Grey Matter is still included)
Z: Fisher transformed correlation coefficients (from each source to each target; could be a different value depending on the choice of analysis)
se_Subjectxxx_Conditionxxx.nii: no idea about this file (sorry!; some first level map maybe?)
For results/secondlevel folder (again, different ANALYSIS_xx folders): If you have defined contrast(s), they will have folders of their own inside the ANALYSIS folder. Each contrast folder has a "condition" folder inside (or condition contrast folder):
ROI.mat: contains the following fields: (borrowed from here):
- xX has the details of the subjects selected
- y has the correlation values of all subjects (if correlation is the measure of functional connectivity selected at first level)
- names has the names of the source ROIs
- xyz has centroid of the source ROI
- names2 has the names of target ROIs
- xyz2 has centroids of traget ROIs
- h is the average of the y values for the particular pair of ROIs (essentially, the beta displayed in the results window)
- F has the appropriate statistical value (T value for example)
- p has the one sided uncorrected p value
- dof is the degrees of freedom
- statname is the name of statistic being calculated (T/F)
Note that the p value is just one sided and not corrected for multiple comparison. Use p_twosided = 2*min(p_onesided, 1-p_onesided) to convert to two sided p values (also, check this post for a discussion on how to do FDR correction by calling conn_fdr).
Also, check this post for some more insight on this ROI.mat variable and the calculation of error bars, etc.
From your post, I think you are trying to extract denoised time series. Here is a quick compilation of some related posts about the same:
conn*/results/preprocessing/ROI_Subject*_Condition*.mat will give you the denoised time series. Then, condition specific time series can be obtained by:
w = max(0,conditionweights{1});
idx = find( w>0 );
data_reduced = cellfun(@(x)x(idx,:), data, 'uni',0);
w_reduced = w(idx);
"data_reduced" and "w_reduced" variables represent, respectively, the timeseries and weights that will be used for computing weighted-GLM measures (e.g. weighted correlation) [check this post]
Finally, weighted_ts = conn_wdemean(data_reduced, w_reduced).*w_reduced;
You can then calculate correlation coefficients (for example) between all the weighted_ts (followed by Fisher's transform: atanh).
Hope the above helps!
P.S: Do note that not all files mentioned above would be available on default run. Most of the REX and .nii files are optional output (for example, this post).
Best,
Pravesh
Nov 26, 2019 05:11 PM | Sebastian Speer - Rotterdam School of Management
RE: Explanation of Outputs
Dear Experts,
I was wondering where the secondlevel covariates such as the QC_InvalidScans, QC_MeanGSChange, QC_MeanMotion are saved ? I am planning to use these covariates for additional analyses in python and have not be able to locate them in any of the folders or in the otherwise very helpful list provided in this thread. I also haven't been able to find a related question somewhere else on the forum.
Thank you very much for your help,
Sebastian
I was wondering where the secondlevel covariates such as the QC_InvalidScans, QC_MeanGSChange, QC_MeanMotion are saved ? I am planning to use these covariates for additional analyses in python and have not be able to locate them in any of the folders or in the otherwise very helpful list provided in this thread. I also haven't been able to find a related question somewhere else on the forum.
Thank you very much for your help,
Sebastian
Dec 30, 2020 08:12 PM | David Fischer
RE: Explanation of Outputs
Hello,
I'm trying to find the output file which contains the time series for each voxel, after denoising. In the 1st level analysis in the GUI, I have the option of clicking on a given voxel for a given subject, and CONN will display the time series for that voxel, for that subject. I'm looking for that file which that GUI function is based on (or looking for another way of extracting the time series on a voxel-by-voxel basis).
From the thread above, it would seem that file would be: niftiDATA_Subjectxxx_Conditionxxx.nii
However, I only see niftiNORMS_Subjectxxx_Conditionxxx.nii in the results/preprocessing directory.
Any thoughts?
Thanks!
David
I'm trying to find the output file which contains the time series for each voxel, after denoising. In the 1st level analysis in the GUI, I have the option of clicking on a given voxel for a given subject, and CONN will display the time series for that voxel, for that subject. I'm looking for that file which that GUI function is based on (or looking for another way of extracting the time series on a voxel-by-voxel basis).
From the thread above, it would seem that file would be: niftiDATA_Subjectxxx_Conditionxxx.nii
However, I only see niftiNORMS_Subjectxxx_Conditionxxx.nii in the results/preprocessing directory.
Any thoughts?
Thanks!
David