[Homer-users] sharing automated scripts for preprocessing and analyzing fNIRS data

tyler bonnen bonnen at mit.edu
Wed Jun 8 20:29:10 EDT 2016
Search archives:

hey everyone,

i've been working on a family of scripts to automate fNIRS preprocessing
and data analysis, built around functions that are used by the homer GUI.
i'd like to make these scripts available to the community, but before i do
that i wanted to get some feedback on the best way to format things. what
i've written below is, first, requesting information that will help me make
this a valuable resource for anyone interested, and second, a sketch of how
someone would use the scripts now, just to give you an idea.

it would be great to get some feedback about how i should go about
formatting things, the dependencies i should build into the pipeline, and
what additional functions i might include. for example:

-- what functions and default parameters are you using in the homer
scripts? a list would be great, or you could just send me the 'procInput'
struct that you get in the .nirs files after preprocessing.
-- what kind of readout/record of steps within the processing pipeline
would be helpful?
-- what format does your data need to be in to be analyzed? example code
would be really helpful.
-- what are some of the optional formats for inputs you'd like to use? for
example: "I don't want to list all the subject names in the data folder."
-- are there standard methods you'd want to have built into the pipeline
for after preprocessing?
-- are there other methods you use that you'd want to make freely available
for the community? could you provide me with example code?


at this point, the scripts run through a preprocessing pipeline with just a
couple lines of code in matlab. it can be as simple as

folder  =  'dataFolder';                  % point towards folder where
subject data is located
data = preprocessingfNIRS(folder);      % run analysis


if this is all the info given, the scripts will use the default parameters,
homer2 functions, output folders, etc., that are set in a cfg file, as well
as bringing the results into the workspace. all of those options can be
changed by updating the file containing those defaults, or they can be
changed from the command window in matlab. if you want to change the PCA
filter strength, set the functions and their order, only work on certain
subjects, and specify which output folder data should be saved to, to name
a few options:

inputs.folder  =  'dataFolder';
inputs.subjectList = {'s02'};

inputs.cfg.PCA  = .95;     % set PCA filter strength

inputs.cfg.results.saveDir = '/path/to/outputFolder';
inputs.cfg.steps =
{'hmrIntensity2OD', 'enPruneChannels',  'enPCAFilter',
'hmrMotionArtifactByChannel', 'hmrBandpassFilt',  'hmrOD2Conc',
'hmrBlockAvg'};

data = preprocessingfNIRS(inputs);


if you have any suggestions, or want to help me tailor the script,
definitely let me know.
tyler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/homer-users/attachments/20160608/0ae09ed1/attachment.html 


More information about the Homer-users mailing list