Print

Print


Hi,

Just following up on the thread below. I've reattached the X.mat file here (not sure if the mailing list will allow it to go through...).

Thank you,

Afsana

______________________________
Afsana Afzal
Clinical Research Coordinator
Massachusetts General Hospital
Division of Neurotherapeutics
Department of Psychiatry: Neurosciences
149 13th St, Room 2612
Charlestown, MA 02129
Phone: 617-643-5129
Fax: 617-726-4078
________________________________
From: Afsana Afzal [[log in to unmask]]
Sent: Thursday, May 26, 2016 12:45 PM
To: Donald McLaren
Cc: Afzal, Afsana; [log in to unmask]
Subject: Re: FW: [SPM] Changing fields in SPM.mat

Hi Donald,

The parfile path is being updated properly and does not cause an error.

It looks like the error is being caused because there are several absolute paths that are inherited from X.mat. For example, FSFAST2SPM is grabbing the value of config.params.runflac(jj).flac.mri.fspec directly from X.mat's runflac(jj).flac.mri.fspec field (which contains an absolute path to the preprocessed functional data). In this case, because the functional data directory was renamed to 'msit_001' from 'msit', the script errors out because it's using the absolute path stored in X.mat.

I've tried to replace all occurrences of the old filepath using spm_changepath but it didn't change all the fields that the FSFAST2SPM uses when filling in the config.params and SPM.mat structures. I've also tried to remove all dependencies on absolute paths but my familiarity with the code is limited and I wasn't able to catch all occurrences so I still kept running into similar errors.

I've attached the X.mat file for a given subject here for your inspection.

Thank you very much for your time,

Afsana


On Thu, May 26, 2016 at 12:34 PM, Afzal, Afsana <[log in to unmask]<mailto:[log in to unmask]>> wrote:



______________________________
Afsana Afzal
Clinical Research Coordinator
Massachusetts General Hospital
Division of Neurotherapeutics
Department of Psychiatry: Neurosciences
149 13th St, Room 2612
Charlestown, MA 02129
Phone: 617-643-5129<tel:617-643-5129>
Fax: 617-726-4078<tel:617-726-4078>
________________________________
From: MCLAREN, Donald [[log in to unmask]<mailto:[log in to unmask]>]
Sent: Tuesday, May 24, 2016 11:36 PM
To: Afzal, Afsana
Cc: [log in to unmask]<mailto:[log in to unmask]>
Subject: Re: [SPM] Changing fields in SPM.mat

Afsana,

FSFAST2SPM doesn't allow the data and models to be in different locations. The file X.mat doesn't actually contain the path to the data.

The current code assumes that the data can be found:

[config.Study filesep config.Subject filesep config.Subject_Subdirectory filesep config.params.runflac(1).flac.runlist(1,:) filesep config.params.runflac(1).flac.funcstem '.nii.']

It was setup this way because the X.mat file doesn't contain the directory information or at least I didn't know where the directory information was stored when I wrote the FSFAST2SPM program.

I would suggest create a mirror of the FSFAST directory tree in the new location, all that should be needed is (1) the X.mat file; and (2) config.params.runflac(jj).flac.parfile in the new locations. I don't have a current FSFAST analysis setup to test if moving the X.mat and parfiles to the new location will work, but I think it should work as the process doesn't need the results of the FSFAST model, it just needs to know where the inputs.


Best,

Donald

Best Regards,
Donald McLaren, PhD


On Tue, May 24, 2016 at 10:02 AM, Afzal, Afsana <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Hi Donald,

I'm actually trying to change the X.mat file that's created as a result of running the first-level analyses in FSFAST. It seems like spm_changepath is not changing all of the paths in the mat file because I'm getting the following error when running gPPI on the fsfast analysis:

Error using spm_vol>subfunc (line 101)
File "/autofs/space/lilli_004/users/DARPA-MSIT/hc001/msit/001/fmcpr.sm4.fsaverage.lh.b0dc.nii" does not exist.

Error in spm_vol>subfunc1 (line 77)
    v = subfunc(P(i,:));

Error in spm_vol>subfunc2 (line 69)
    V = subfunc1(P);

Error in spm_vol (line 54)
V = subfunc2(P);

Error in FSFAST2SPM (line 304)
    SPM.xY.VY=spm_vol(SPM.xY.P);

Error in msit_ppi_wrapper (line 33)
    FSFAST2SPM(config)

I'm not sure which field has remained unchanged and is causing the error.

Thanks for you help,

Afsana
______________________________
Afsana Afzal
Clinical Research Coordinator
Massachusetts General Hospital
Division of Neurotherapeutics
Department of Psychiatry: Neurosciences
149 13th St, Room 2612
Charlestown, MA 02129
Phone: 617-643-5129<tel:617-643-5129>
Fax: 617-726-4078<tel:617-726-4078>
________________________________
From: Donald McLaren [[log in to unmask]<mailto:[log in to unmask]>]
Sent: Thursday, May 19, 2016 1:50 PM
To: Afzal, Afsana
Cc: [log in to unmask]<mailto:[log in to unmask]>
Subject: Re: [SPM] Changing fields in SPM.mat

You can do that with spm_changepath.

On May 19, 2016, at 10:55 AM, Afzal, Afsana <[log in to unmask]<mailto:[log in to unmask]>> wrote:

Hi everyone,

Because of space constraints, I had to move my preprocessed data to a different location. I'm trying to change the filepath information stored in the SPM.mat files to reflect the location change. Is there an easy way to iterate through the matfile and change all the paths (this would save me from having to re-run all of my analyses).

Thanks for your help,

Afsana


______________________________
Afsana Afzal
Clinical Research Coordinator
Massachusetts General Hospital
Division of Neurotherapeutics
Department of Psychiatry: Neurosciences
149 13th St, Room 2612
Charlestown, MA 02129
Phone: 617-643-5129<tel:617-643-5129>
Fax: 617-726-4078<tel:617-726-4078>

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.




--

______________________________
Afsana Afzal
Clinical Research Coordinator
Massachusetts General Hospital
Division of Neurotherapeutics
Department of Psychiatry: Neurosciences
149 13th St, Room 2612
Charlestown, MA 02129
Phone: 617-643-5129
Fax: 617-726-4078
[log in to unmask]<mailto:[log in to unmask]>