Quantcast
Channel: NITRC CONN : functional connectivity toolbox Forum: help
Viewing all 6899 articles
Browse latest View live

first level statistics: follow up +++

$
0
0
Hello,

In order to compare the BETAS (ie Fisher transformed R values) of a seed-to-voxel analysis, in a single subject, between two different conditions, I just subtracted the two BETA maps, and divided by 0.198, which was the SD of the difference sqrt(1/(DOF1-1) + 1/(DOF2-3)), with DOF1 and 2=54, as provided by CONN in the "denoising" panel. the result is, I believe, a map of Z values, which I can threshold statistically (eg >3.02 for p<0.001). I then asked your advice, and you confirmed that it was OK, particularly the use of the DOF after denoising.

So far, so good. Now, I did exactly the same thing, but not with the BETAS from a seed-to-voxel analysis, but from the Global Correlation voxel-to-voxel analysis. I assumed that it was legitimate, as values are supposed to be just averages of R values with "all other voxels". It worked very well, in the sense that I get nice results. Almost too nice, ie with very high Z values. It may correct, but I have my doubts. So...

Do you think it is OK to do that, particularly
- is the same DOF still OK?
- do the options "Normalization" and "Dimensional reduction" in the computation of Global correlation change anything?
- ???

Thank you very much in advance

Laurent

read_hdr error

$
0
0
Dear Conn expert,

in preprocessing part of our data analysis i have these error. 

ERROR DESCRIPTION:

Error using read_hdr (line 32)
Error reading header file "/hydradb/hydra_io/vypocty/ADAMEK/ART_DMN_conn/Source/cARTDM_C01490_20171002_1541_1/0019_t1_sag_mpr_3D_CONNECTOM/20171002_154109t1sagmpr3DCONNECTOMs019a1001.nii".
Error in nifti (line 26)
vol = read_hdr(fname);
Error in spm_get_space (line 18)
N = nifti(P);
Error in conn_setup_preproc (line 2145)
spm_get_space(temp,M);
Error in conn (line 894)
ok=conn_setup_preproc('',varargin{2:end});
Error in 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.2015b
storage: 5107.9Gb available
spm @ /home/adamek/matlab/spm12
conn @ /home/adamek/matlab/conn_17f

i found older forum thread https://www.nitrc.org/forum/forum.php?thread_id=4994&forum_id=1144 but the solution not work. I try to change conn version from 17f to 18b, and the error is still the same. The main part of all these problem is in the data file path. Conn add "c" prefix to the name of folder not to the file. 

conn try to found file in these path with non existe folder with "c" prefix (red c in path):
"/hydradb/hydra_io/vypocty/ADAMEK/ART_DMN_conn/Source/[color=#ff0000]c[/color]ARTDM_C01490_20171002_1541_1/0019_t1_sag_mpr_3D_CONNECTOM/20171002_154109t1sagmpr3DCONNECTOMs019a1001.nii".

but the right path for these file is:
"/hydradb/hydra_io/vypocty/ADAMEK/ART_DMN_conn/Source/ARTDM_C01490_20171002_1541_1/0019_t1_sag_mpr_3D_CONNECTOM/20171002_154109t1sagmpr3DCONNECTOMs019a1001.nii".
with out c prefix. 

im not able to found right solution. 

Thank you Petr

RE: Summary Dynamic variability measures

$
0
0
Hello,

I had the same question as Olusola, but it looks like it has not yet been answered. Any guidance would be greatly appreciated!

We are looking to see if conn provides a summary stat for the dynamic variability in seed-based connectivity (dvSBC) and the Dynamic variability in ROI-to-ROI connectivity (dvRRC)? For example, say I want to know the dynamic variability of default mode connectivity across 14 sliding windows.

 It would be great to know if this is implemented in conn, so that additional scripts outside of the conn environment are not needed!

Thanks,

Emily

RE: first level threshold

$
0
0
[color=#000000]Hello -- this is a follow up on the post below. I have used the Matlab code provided by Alfonso to compute FDR-corrected p-value maps on individual subjects. However, they look completely different from the CONN GUI first-level analyses tab display (see screenshot attached: LEFT: 1-tail FDR-corrected p-value from Alfonso's Matlab code previously posted below, MIDDLE: 2-tail FDR-corrected p-value map from Matlab code posted below, RIGHT: CONN GUI first-level display).[/color]

This does not inspire confidence and makes me think I have messed up somewhere. Shouldn't the standalone Matlab code and the CONN first-level GUI agree?

Thanks -- Bastien

[i]Originally posted by Alfonso Nieto-Castanon:[/i][quote]Hi Sarah,

One simple general way I could recommend to obtain seed-to-voxel first-level connectivity maps corrected for multiple comparisons would be to use Fisher approximation to the standard error of correlation coefficient estimates to obtain first uncorrected p-values for each voxel, and then apply an FDR-correction to obtain FDR-corrected p-values. The simplest way to approximate the standard error of the seed-to-voxel correlations would be assuming non-colored noise over the (typically small) frequency band defined during the preprocessing step (this is the same approach used by the previous version of the toolbox when using fixed-effect analyses; alternatively you could also use Welch-Satterthwaite approximation for a more precise result but that would require estimating the spectra of the residuals first).

In any way, if you have already run the setup/preprocessing/first-level analyses (and obtained in this way fisher-transformed BETA_Subject*_Condition*_Source*.nii files; one map for each source/condition/subject), you could easily transform these files to the associated uncorrected and FDR-corrected p-values (following the approach described above) using the following script:


nsub=1;       % subject number
ncondition=1; % condition number
nroi=1;       % source/seed number
nanalysis=1;  % analysis number

global CONN_x;
filepath=CONN_x.folders.preprocessing;
filepathresults=fullfile(CONN_x.folders.firstlevel,CONN_x.Analyses(nanalysis).name);
filename=fullfile(filepath,['DATA_Subject',num2str(nsub,'%03d'),'_Condition',num2str(ncondition,'%03d'),'.mat']);
Y=conn_vol(filename);
DOF=max(0,Y.size.Nt*(min(1/(2*CONN_x.Setup.RT),CONN_x.Preproc.filter(2))-max(0,CONN_x.Preproc.filter(1)))*(2*CONN_x.Setup.RT)+1);
filename=fullfile(filepathresults,['BETA_Subject',num2str(nsub),'_Condition',num2str(ncondition,'%03d'),'_Source',num2str(nroi,'%03d'),'.nii']);
a=spm_vol(filename);
Z=spm_read_vols(a);          % fisher-transformed correlation values
z=Z*max(0,sqrt(DOF-3));    % z-scores
p=spm_Ncdf(z);                  % p-values from normal distribution
p=2*min(p,1-p);                 % note: two-sided tests (remove this line for one-sided tests; i.e. only positive correlations)
P=p;
P(:)=conn_fdr(p(:));            % FDR-corrected p-values
a.fname=fullfile(filepathresults,['p_Subject',num2str(nsub),'_Condition',num2str(ncondition,'%03d'),'_Source',num2str(nroi,'%03d'),'.nii']);
spm_write_vol(a,p);
a.fname=fullfile(filepathresults,['pFDR_Subject',num2str(nsub),'_Condition',num2str(ncondition,'%03d'),'_Source',num2str(nroi,'%03d'),'.nii']);
spm_write_vol(a,P);


This will create two files:

   p_Subject1_Condition1_Source1.nii 
   pFDR_Subject1_Condition1_Source1.nii

with the uncorrected and FDR-corrected p-values, respectively, of the seed-to-voxel maps for the first subject/condition/source (edit the first four lines to change the subject/condition/source numbers of interest)

Hope this helps, and let me know if this addresses your question. You might need to do something more complex if you want to look instead at more complex contrasts across conditions or sources, let me know.

Best
Alfonso

[i]Originally posted by Sarah Buetof:[/i][quote]Hi Alfonso,
Thanks for your quick answer.
We are planning to use the first level r-maps in another analysis and they should be corrected for multiple comparisons.
The fixed-effect analysis in 12 does not work and I get following error message:

Step 1/2: Functional data second-level analyses
62.5% ??? Reference to non-existent field 'csources'.

Error in ==> conn_process at 1467
                    csources=SPMall(n1).connvols.csources;

Error in ==> conn_process at 18
        case 'results',         conn_process(14:15,varargin{:});

Error in ==> conn at 1601
                conn_process('results');

Error in ==> conn_menumanager at 112
                            feval(MM.MENU{n0}.callback{n1}{1},MM.MENU{n0}.callback{n1}{2:end});
??? Error while evaluating figure WindowButtonUpFcn


Somebody else already mentioned that error and you provided another conn_process.m file that should solve the problem. But that didn't work for me, too.
We could implement a threshold in the script for our further analysis, but therefore we need the p-values.
Do you have any suggestions how to deal with that issue?
Does it makes more sense to try to fix the problem with version 12 or to do the statitics with matlab with the 13-results? Since I am not very familiar with matlab yet, I would prefer the first way, if that provides the results I am looking for.

Thanks[/quote][/quote]

viewing SPM on CONN

$
0
0
Hi all, 

Is there any way to just use the different display options available in CONN in order to view the SPM_T map ? I finished the analysis using SPM and would love to view them using CONN

RE: How to analyze the data preprocessed from other software?

$
0
0
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

CONN compatibility with BIDS and fmriprep output

$
0
0
Dear Alfonso,

Many researchers in the field (including myself) started to use BIDS for formatting and organization their datasets and also fmriprep (https://fmriprep.readthedocs.io/en/stable/usage.html) for data preprocessing. How compatible is CONN with BIDS formatting and fmriprep output?

Is this possible in the future releases of CONN to allow users to load fmriprep output directly into CONN?

Best,
Karolina

RE: Seed to Voxel Analysis

$
0
0
Were you able to solve your issue?

Error in seed to voxel analysis: Source not found in global source list.

$
0
0
Hello,

I am attempting to run a seed to voxel analysis, and I previously ran a ROI to ROI analysis with the same ROIs. Now, when trying to run the seed to voxel analysis, I am receiving the error message shown below in the second level analysis. 


ERROR DESCRIPTION:

Error using conn (line 7186)
Source aal.Hippocampus R not found in global source list. Please re-run first-level analyses
Error in 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 cat12 conn
Matlab v.2016a
storage: 815.5Gb available
spm @ L:\spm12\spm12
conn @ L:\spm12\spm12\toolbox\conn17f\conn



When I try to enter the following command in the MATLAB window (recomended by Alfonso in a previous post):

global CONN_x CONN_x.Analyses(1).sourcenames=CONN_x.Analyses(1).source

and to run again the seed to voxel analysis, I am receiving this error message:

ERROR DESCRIPTION:

Error using spm_vol>spm_vol_hdr (line 80)
File "K:\CON-PCS-analysis\conn_project01\results\firstlevel\ANALYSIS_01\BETA_Subject001_Condition001_Source001.nii" does not exist.
Error in spm_vol (line 61)
v = spm_vol_hdr(deblank(P(i,:)));
Error in conn (line 7455)
CONN_h.menus.m_results.Y=spm_vol(char(filename));
Error in conn (line 6540)
if any(CONN_x.Analyses(CONN_x.Analysis).type==[2,3]), conn gui_results_s2v;
Error in 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 cat12 conn
Matlab v.2016a
storage: 815.5Gb available
spm @ L:\spm12\spm12
conn @ L:\spm12\spm12\toolbox\conn17f\conn


Thank you immensely for the help,

Gianpaolo

Functional Connectivity values for regression analyses

$
0
0
Dear experts,

i have performed a regression analysis between the functional connectivity of a seed (the premotor cortex) during a motor task and the clinical scores of patients. I have plotted the results (using the calculator tool) but I want to have access to the functional connectivity values (the values on the y axis in my plot). Can you please tell how to do that ?

Thanks in advance,
Nabila

Field mapping correction

$
0
0
Dear all, 

In CONN version 18b, there is an option to correct for field mapping. However, I want to make sure that I understood well this option:

1- So my output from the scanner are two nii files, I assume one is the phase and the other is the magnitude image. Should I merge them and load this 4D image? If yes, can I use the fslmerge or there are other better options?

2- Should I create vdm file in spm before or I just load the magnitude and phase images, and CONN automatically creates vdm?

3- where should I load these images, as far as I understood, I load them in the secondary data set, right?

Thank you so much for the help!

Dayana

RE: Questions about setup & within subject design

$
0
0
Hi,

Did you figure this out? I have a dataset where some participants are missing timepoint 2 or timepoint 1. In the conditions section, after selecting "allow missing data", the participants who are missing T1 appear fine, with a note in the design display saying that they have no data for T1. However, for the participants who are missing T2, I just get a message saying display not available for both timepoints.

Attached is the conditions section I get for a subject who has data for T1, but not T2.

Any help appreciated!

A

Distant-dependent ICC?

$
0
0
Would it be possible to add options to the voxel-to-voxel ICC metric to establish a distance threshold for examination of short vs. long degree centrality effects?  

Maybe something that could be based upon a distance between voxels calculation, like Dij = SQRT[(Xi - Xj)2 + (Yi - Yj)2 + (Zi - Zj)2] ??

Has anyone tried something like this?  It occurs to me that under the current ICC method that most analyses will probably be sensitized to changes or differences in the most distal and interconnected regions (i.e., DMN).

Thx,
Jeff

Seconlevel CON_subject images

$
0
0
Dear CONN users and developers,

I would like to extract contrasted connectivity images for different conditions, one for each subject, in order to enter them into machine learning analysis (BETA images at first level are not contrasted ).

I have 2 conditions and I performed a second level model just comparing these two conditions among the whole sample. Is the CON_subject.nii the comparison of BETA images between the two conditions and what does compA001 etc mean?

Any other suggestion to obtain contrasted images would be appreciated.

Best wishes
Benedetta

RE: Lesion Masks

$
0
0
Thanks Cole for your question and thanks Alfonso for answering

I would like to ask you  what I should modify in the TPM.
I've opened the default nii contained in the folder. My quesiton is now: what do you exactly mean when you suggest  to modify this TPM to include the lesion? how does this practically work? For instance: should I mask out the lesion from the standard TPM? 

Thanks a lot for your support

Gianluca

RE: Error in seed to voxel analysis: Source not found in global source list.

$
0
0
Hello,

I'm having the same problem.

I have a design with 5 conditions and entered them in the Setup step, but I'm interested in the connectivity matrix associated to each condition. However, when I try to run the first-level analysis doing exactly what Gianpaolo describes, I get to the same error. Any suggestions will be appreciated!

Sincerely,
Verónica

What is "V.voxels" in the struct DATA_*.mat?

$
0
0
Hello,

I want to know how many voxels are in the whole brain. I found "V.voxels" in DATA_*.mat, NORMS_*.mat, and so on.
I expect this field is whole brain's voxel numbers. Is it correct?

In addition, could you tell me if you know a homepage which described the detail of CONN's .mat files?

Thank you for your cooperation.

Masaki

Running a new analysis on a subsample from an already completed analysis

$
0
0
Dear CONN community,

I completed a patients vs controls comparison in CONN, and now I would like to compare two subgroups of patients from the same sample. I wanted to take advantage of the fact that preprocessing and denoising have been already completed in the first analysis, and not start everything from scratch.

Am I correct in assuming that I can just define a new contrast by going to Setup and then 2nd level Covariates, where I would give all controls a 0, and patients from one subgroup a 1, and those from the other a -1? Basically, I want to compare patient subgroup 1 to patient subgroup 2 while ignoring the controls, without starting a new CONN project.

Thanks in advance for your help.
Kind regards,
Darko

Installation fault

$
0
0
Hi, I am having an issue with the installation. It used to run perfectly fine, but today I tried updating to the newest version which had been out for a bit and I kept getting this error

""

ERROR DESCRIPTION:

Undefined function or variable 'conn_disp'.
Error in conn (line 606)
'output',[1 1 0]),...
Error in spm (line 1017)
evalin('base',xTB(i).prog);
CONN18.b
SPM12 + Anatomy DEM FieldMap MEEGtools cat12 conn
Matlab v.2018a
project: CONN18.b
spm @ /usr/local/MATLAB/R2018a/spm12
conn @ /usr/local/MATLAB/R2018a/spm12/toolbox/conn

""

I tried uninstalling and going back to the previous version, but the error persists. From the basic meaning in the error I get that I am doing something very surface level wrong and was assuming just a missing file, but I went over the installation process multiple times. Next I figured the PATH was the issue, but I checked that and *think* it is alright as well.

Can anyone point me in the right direction of what I have to do to get it back up and running?

Thanks in davance

RE: Error while doing seed-to-voxel analysis

$
0
0
Hi Dr. Castanon,

It worked. I basically removed the folders referring to the old version and just kept the new one and the error message hasn't come since. Thank you so much!
Viewing all 6899 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>