Attachment 'aa_user_fmri.m'
Download 1 % Automatic analysis
2 % User master script based on
3 % github.com/rhodricusack/automaticanalysis/wiki/Manual:
4 % Example (aa version 4.*)
5 %
6 % Tibor Auer, MRC-CBSU
7 % 09-12-2013
8
9 %% INITIALISE
10 clear
11
12 aa_ver4_nocloud
13
14 %% DEFINE SPECIFIC PARAMETERS
15 % Default recipe without model
16 aap=aarecipe('aap_parameters_defaults_CBSU.xml','aap_tasklist_fmri.xml');
17
18 % Modify standard recipe module selection here if you'd like
19 aap.options.wheretoprocess = 'qsub'; % queuing system % typical value localsingle
20 aap.options.autoidentifyfieldmaps=1; % typical value 1
21 aap.options.NIFTI4D = 1; % typical value 0
22 aap.options.email='All.Knowing@mrc-cbu.cam.ac.uk';
23 % Set slice order for slice timing correction
24 aap.tasksettings.aamod_slicetiming.sliceorder=[32:-1:1]; % descending
25 aap.tasksettings.aamod_slicetiming.refslice = 16; % reference slice (first acquired)
26 aap.tasksettings.aamod_firstlevel_model.xBF.UNITS = 'secs'; % OPTIONS: 'scans'|'secs' for onsets and durations, typical value 'secs'
27 aap.tasksettings.aamod_firstlevel_model.includemovementpars = 0;% Include/exclude Moco params in/from DM, typical value 1
28
29 %% STUDY
30 % Directory for analysed data
31 aap.acq_details.root = '/imaging/xy00/World_Universe_and_Everything';
32 aap.directory_conventions.analysisid = 'Nature_Paper';
33
34 % Add data
35 aap = aas_addsubject(aap,90952,[7]);
36 aap = aas_addsession(aap,'Loc');
37 aap = aas_addsubject(aap,90971,[7]);
38 aap = aas_addsession(aap,'Loc');
39
40 % Add model
41 % Obtain TR from the first session
42 h = dicominfo(mri_finddcm(aap, 90952,7));
43 TR = h.RepetitionTime/1000; % in seconds
44
45 aap = aas_addevent(aap,'aamod_firstlevel_model',mri_findvol(aap,90973),'*',...
46 'REST',... % name
47 [30.0560 100.1620 160.2800 200.3700 280.5340 340.6670]-aap.acq_details.numdummies*TR,... % onsets
48 [10.0070 10.0230 10.0230 10.0220 10.0210 10.0230]); % durations
49 aap = aas_addevent(aap,'aamod_firstlevel_model',mri_findvol(aap,90973),'*',...
50 'RIGHTFINGER',... % name
51 [70.0960 140.2360 170.3030 240.4600 320.6220 350.6890]-aap.acq_details.numdummies*TR,... % onsets
52 [10.0220 10.0220 10.0220 10.0220 10.0230 10.0230]); % durations
53
54 aap = aas_addevent(aap,'aamod_firstlevel_model',mri_findvol(aap,90979),'*',...
55 'REST',... % name
56 [30.0570 100.1310 160.1990 200.2380 270.3610 330.4300]-aap.acq_details.numdummies*TR,... % onsets
57 [10.0070 10.0220 10.0060 10.0220 10.0070 10.0220]); % durations
58 aap = aas_addevent(aap,'aamod_firstlevel_model',mri_findvol(aap,90979),'*',...
59 'RIGHTFINGER',... % name
60 [70.0970 140.1860 170.2050 240.3110 310.4020 340.4510]-aap.acq_details.numdummies*TR,... % onsets
61 [10.0060 10.0070 10.0210 10.0220 10.0210 10.0220]); % durations
62
63 aap = aas_addcontrast(aap,'aamod_firstlevel_contrasts','*','singlesession:Loc',[-1 1],'Loc_RightFinger-Rest','T');
64
65 %% DO ANALYSIS
66 aa_doprocessing(aap);
67 aa_report(fullfile(aas_getstudypath(aap),aap.directory_conventions.analysisid));
68 aas_garbagecollection(aap,true);
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.